Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/broadcom IPIs should be IPL_HIGH according to r...
details: https://anonhg.NetBSD.org/src/rev/dd7ed4ce51fb
branches: trunk
changeset: 339496:dd7ed4ce51fb
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Jul 25 08:43:41 2015 +0000
description:
IPIs should be IPL_HIGH according to rmind@
Fix bcm2836mp_pic_{un,}block_irqs to handle timer AND mailbox interrupts
if they're both passed. Thanks to nat@ for finding this.
Sprinkle some KASSERTs
diffstat:
sys/arch/arm/broadcom/bcm2835_intr.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diffs (58 lines):
diff -r cd7450ff0f32 -r dd7ed4ce51fb sys/arch/arm/broadcom/bcm2835_intr.c
--- a/sys/arch/arm/broadcom/bcm2835_intr.c Sat Jul 25 08:36:44 2015 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_intr.c Sat Jul 25 08:43:41 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_intr.c,v 1.9 2015/04/12 23:25:57 jmcneill Exp $ */
+/* $NetBSD: bcm2835_intr.c,v 1.10 2015/07/25 08:43:41 skrll Exp $ */
/*-
* Copyright (c) 2012, 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.9 2015/04/12 23:25:57 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.10 2015/07/25 08:43:41 skrll Exp $");
#define _INTR_PRIVATE
@@ -361,7 +361,8 @@
BCM2836_LOCAL_TIMER_IRQ_CONTROL_BASE,
BCM2836_LOCAL_TIMER_IRQ_CONTROL_SIZE,
BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE);
- } else if (irq_mask & BCM2836MP_MAILBOX_IRQS) {
+ }
+ if (irq_mask & BCM2836MP_MAILBOX_IRQS) {
uint32_t mask = __SHIFTOUT(irq_mask, BCM2836MP_MAILBOX_IRQS);
uint32_t val = bus_space_read_4(al_iot, al_ioh,
BCM2836_LOCAL_MAILBOX_IRQ_CONTROLN(cpuid));
@@ -396,7 +397,8 @@
bus_space_write_4(al_iot, al_ioh,
BCM2836_LOCAL_TIMER_IRQ_CONTROLN(cpuid),
val);
- } else if (irq_mask & BCM2836MP_MAILBOX_IRQS) {
+ }
+ if (irq_mask & BCM2836MP_MAILBOX_IRQS) {
uint32_t mask = __SHIFTOUT(irq_mask, BCM2836MP_MAILBOX_IRQS);
uint32_t val = bus_space_read_4(al_iot, al_ioh,
BCM2836_LOCAL_MAILBOX_IRQ_CONTROLN(cpuid));
@@ -464,6 +466,10 @@
static void
bcm2836mp_send_ipi(struct pic_softc *pic, const kcpuset_t *kcp, u_long ipi)
{
+ KASSERT(pic != NULL);
+ KASSERT(pic != &bcm2835_pic);
+ KASSERT(pic->pic_cpus != NULL);
+
const cpuid_t cpuid = pic - &bcm2836mp_pic[0];
bus_space_write_4(al_iot, al_ioh,
@@ -522,7 +528,7 @@
pic->pic_cpus = ci->ci_kcpuset;
pic_add(pic, BCM2836_INT_BASECPUN(cpuid));
- intr_establish(BCM2836_INT_MAILBOX0_CPUN(cpuid), IPL_VM,
+ intr_establish(BCM2836_INT_MAILBOX0_CPUN(cpuid), IPL_HIGH,
IST_LEVEL | IST_MPSAFE, bcm2836mp_ipi_handler, NULL);
/* clock interrupt will attach with gtmr */
Home |
Main Index |
Thread Index |
Old Index