diff options
author | gonzo <gonzo@FreeBSD.org> | 2012-03-22 17:47:52 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2012-03-22 17:47:52 +0000 |
commit | 5098cfd078d4a03c4f69d3128a2e665732b9a742 (patch) | |
tree | 953042faa29cbada3472b120aefe9623f030bf65 /sys/mips/atheros/apb.c | |
parent | c3a5f91cea1e0760c22991398988d50ede2348db (diff) | |
download | FreeBSD-src-5098cfd078d4a03c4f69d3128a2e665732b9a742.zip FreeBSD-src-5098cfd078d4a03c4f69d3128a2e665732b9a742.tar.gz |
Move PMC hook invocation to cpu_intr. The idea is the same as with ast()
call but there is no reason to implement it in assembler.
Diffstat (limited to 'sys/mips/atheros/apb.c')
-rw-r--r-- | sys/mips/atheros/apb.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/sys/mips/atheros/apb.c b/sys/mips/atheros/apb.c index 03eeb2f..085a7ec 100644 --- a/sys/mips/atheros/apb.c +++ b/sys/mips/atheros/apb.c @@ -348,7 +348,6 @@ apb_filter(void *arg) uint32_t reg, irq; struct thread *td; struct trapframe *tf; - register_t s; reg = ATH_READ_REG(AR71XX_MISC_INTR_STATUS); for (irq = 0; irq < APB_NIRQS; irq++) { @@ -373,28 +372,12 @@ apb_filter(void *arg) td = PCPU_GET(curthread); tf = td->td_intr_frame; - s = intr_disable(); + if (pmc_intr) + (*pmc_intr)(PCPU_GET(cpuid), tf); + mips_intrcnt_inc(sc->sc_intr_counter[irq]); - if (pmc_intr) { - /* - * Make sure at least one of counters - * generated this interrupt - */ - if (!(*pmc_intr)(PCPU_GET(cpuid), tf)) { - intr_restore(s); - continue; - } - } - - intr_restore(s); - - if (pmc_hook && (td->td_pflags & TDP_CALLCHAIN)) - pmc_hook(PCPU_GET(curthread), - PMC_FN_USER_CALLCHAIN, tf); - continue; - } /* Ignore timer interrupts */ if (irq != 0) |