From owner-svn-src-head@freebsd.org Fri Nov 6 17:12:34 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEF1CA26842; Fri, 6 Nov 2015 17:12:34 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F9DA1FD9; Fri, 6 Nov 2015 17:12:34 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6HCXoK085060; Fri, 6 Nov 2015 17:12:33 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6HCX7f085057; Fri, 6 Nov 2015 17:12:33 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201511061712.tA6HCX7f085057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Fri, 6 Nov 2015 17:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290457 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 17:12:34 -0000 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);