From owner-svn-src-all@freebsd.org Thu Feb 11 06:13:55 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10FF9AA485B; Thu, 11 Feb 2016 06:13:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D752F9D0; Thu, 11 Feb 2016 06:13:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1B6DrF8051363; Thu, 11 Feb 2016 06:13:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1B6DrnY051362; Thu, 11 Feb 2016 06:13:53 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201602110613.u1B6DrnY051362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 11 Feb 2016 06:13:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295499 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2016 06:13:55 -0000 Author: adrian Date: Thu Feb 11 06:13:53 2016 New Revision: 295499 URL: https://svnweb.freebsd.org/changeset/base/295499 Log: Teach the MIPS ticker to attach itself properly when using INTRNG. Submitted by: Stanislav Galabov Reviewed by: kan Differential Revision: https://reviews.freebsd.org/D5183 Modified: head/sys/mips/mips/tick.c Modified: head/sys/mips/mips/tick.c ============================================================================== --- head/sys/mips/mips/tick.c Thu Feb 11 06:09:27 2016 (r295498) +++ head/sys/mips/mips/tick.c Thu Feb 11 06:13:53 2016 (r295499) @@ -51,6 +51,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef MIPS_INTRNG +#include +#endif + uint64_t counter_freq; struct timecounter *platform_timecounter; @@ -324,12 +328,18 @@ static int clock_attach(device_t dev) { struct clock_softc *sc; +#ifndef MIPS_INTRNG int error; +#endif if (device_get_unit(dev) != 0) panic("can't attach more clocks"); softc = sc = device_get_softc(dev); +#ifdef MIPS_INTRNG + cpu_establish_hardintr("clock", clock_intr, NULL, sc, 5, INTR_TYPE_CLK, + NULL); +#else sc->intr_rid = 0; sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->intr_rid, 5, 5, 1, RF_ACTIVE); @@ -343,6 +353,7 @@ clock_attach(device_t dev) device_printf(dev, "bus_setup_intr returned %d\n", error); return (error); } +#endif sc->tc.tc_get_timecount = counter_get_timecount; sc->tc.tc_counter_mask = 0xffffffff;