Date: Thu, 11 Feb 2016 06:14:12 +0000 From: "adrian (Adrian Chadd)" <phabric-noreply@FreeBSD.org> To: freebsd-mips@freebsd.org Subject: [Differential] [Closed] D5183: Proper attachment for MIPS ticker when using INTRNG Message-ID: <606c9af147420d91f5adc8ced05c8fee@localhost.localdomain> In-Reply-To: <differential-rev-PHID-DREV-m73iatsu5iop4g4gyz2t-req@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] This revision was automatically updated to reflect the committed changes. Closed by commit rS295499: Teach the MIPS ticker to attach itself properly when using INTRNG. (authored by adrian). CHANGED PRIOR TO COMMIT https://reviews.freebsd.org/D5183?vs=12992&id=13205#toc REPOSITORY rS FreeBSD src repository CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D5183?vs=12992&id=13205 REVISION DETAIL https://reviews.freebsd.org/D5183 AFFECTED FILES head/sys/mips/mips/tick.c CHANGE DETAILS diff --git a/head/sys/mips/mips/tick.c b/head/sys/mips/mips/tick.c --- a/head/sys/mips/mips/tick.c +++ b/head/sys/mips/mips/tick.c @@ -51,6 +51,10 @@ #include <machine/locore.h> #include <machine/md_var.h> +#ifdef MIPS_INTRNG +#include <machine/intr.h> +#endif + uint64_t counter_freq; struct timecounter *platform_timecounter; @@ -324,12 +328,18 @@ 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 @@ 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; EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: Sgalabov_gmail.com, kan, adrian, MIPS Cc: imp, freebsd-mips-list [-- Attachment #2 --] diff --git a/head/sys/mips/mips/tick.c b/head/sys/mips/mips/tick.c --- a/head/sys/mips/mips/tick.c +++ b/head/sys/mips/mips/tick.c @@ -51,6 +51,10 @@ #include <machine/locore.h> #include <machine/md_var.h> +#ifdef MIPS_INTRNG +#include <machine/intr.h> +#endif + uint64_t counter_freq; struct timecounter *platform_timecounter; @@ -324,12 +328,18 @@ 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 @@ 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;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?606c9af147420d91f5adc8ced05c8fee>
