[Differential] [Request, 11 lines] D5183: Proper attachment for MIPS ticker when using INTRNG
Sgalabov_gmail.com (Stanislav Galabov)
phabric-noreply at FreeBSD.org
Thu Feb 4 07:16:25 UTC 2016
Sgalabov_gmail.com created this revision.
Sgalabov_gmail.com added reviewers: MIPS, adrian, kan.
Sgalabov_gmail.com added a subscriber: freebsd-mips-list.
Sgalabov_gmail.com set the repository for this revision to rS FreeBSD src repository.
Sgalabov_gmail.com added a project: MIPS.
Herald added a subscriber: imp.
REVISION SUMMARY
This patch allows the MIPS ticker to attach itself properly when using INTRNG
REPOSITORY
rS FreeBSD src repository
REVISION DETAIL
https://reviews.freebsd.org/D5183
AFFECTED FILES
sys/mips/mips/tick.c
CHANGE DETAILS
diff --git a/sys/mips/mips/tick.c
b/sys/mips/mips/tick.c
--- a/sys/mips/mips/tick.c
+++ b/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, MIPS, adrian, kan
Cc: imp, freebsd-mips-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5183.12992.patch
Type: text/x-patch
Size: 1023 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-mips/attachments/20160204/f6296360/attachment.bin>
More information about the freebsd-mips
mailing list