Date: Fri, 6 Nov 2015 17:12:33 +0000 (UTC) From: Svatopluk Kraus <skra@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290457 - head/sys/arm/broadcom/bcm2835 Message-ID: <201511061712.tA6HCX7f085057@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: skra Date: Fri Nov 6 17:12:33 2015 New Revision: 290457 URL: https://svnweb.freebsd.org/changeset/base/290457 Log: Make interrupt dispatching MP safe. Use GPU interrupt bit in per-core interrupt status register to process shared interrupts only if the bit is active and only on core to which they are routed. Reviewed by: imp, loos Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D3723 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_intr.c head/sys/arm/broadcom/bcm2835/bcm2836.c head/sys/arm/broadcom/bcm2835/bcm2836.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_intr.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_intr.c Fri Nov 6 16:57:23 2015 (r290456) +++ head/sys/arm/broadcom/bcm2835/bcm2835_intr.c Fri Nov 6 17:12:33 2015 (r290457) @@ -163,7 +163,9 @@ arm_get_next_irq(int last_irq) irq = 0; #ifdef SOC_BCM2836 - if ((ret = bcm2836_get_next_irq(irq)) >= 0) + if ((ret = bcm2836_get_next_irq(irq)) < 0) + return (-1); + if (ret != BCM2836_GPU_IRQ) return (ret + BANK3_START); #endif Modified: head/sys/arm/broadcom/bcm2835/bcm2836.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2836.c Fri Nov 6 16:57:23 2015 (r290456) +++ head/sys/arm/broadcom/bcm2835/bcm2836.c Fri Nov 6 17:12:33 2015 (r290457) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #define ARM_LOCAL_INT_TIMER(n) (0x40 + (n) * 4) #define ARM_LOCAL_INT_MAILBOX(n) (0x50 + (n) * 4) #define ARM_LOCAL_INT_PENDING(n) (0x60 + (n) * 4) -#define INT_PENDING_MASK 0x01f +#define INT_PENDING_MASK 0x011f #define MAILBOX0_IRQ 4 #define MAILBOX0_IRQEN (1 << 0) Modified: head/sys/arm/broadcom/bcm2835/bcm2836.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2836.h Fri Nov 6 16:57:23 2015 (r290456) +++ head/sys/arm/broadcom/bcm2835/bcm2836.h Fri Nov 6 17:12:33 2015 (r290457) @@ -30,6 +30,8 @@ #ifndef _BCM2815_BCM2836_H #define _BCM2815_BCM2836_H +#define BCM2836_GPU_IRQ 8 + int bcm2836_get_next_irq(int); void bcm2836_mask_irq(uintptr_t); void bcm2836_unmask_irq(uintptr_t);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511061712.tA6HCX7f085057>