Module Name:    src
Committed By:   skrll
Date:           Sun Oct 31 16:29:18 UTC 2021

Modified Files:
        src/sys/arch/arm/pic: pic.c

Log Message:
Only perform pic_unblock_percpu if all of the following are true
- mp_online, i.e. APs are running.
- is_mpsafe, i.e. the interrupt handler is MP safe
- is_percpu, i.e. the interrupt actually requires it!

The last one (is_percpu) is true for GIC PPI+SGI only.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/arm/pic/pic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/pic/pic.c
diff -u src/sys/arch/arm/pic/pic.c:1.74 src/sys/arch/arm/pic/pic.c:1.75
--- src/sys/arch/arm/pic/pic.c:1.74	Sun Oct 31 16:24:47 2021
+++ src/sys/arch/arm/pic/pic.c	Sun Oct 31 16:29:18 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic.c,v 1.74 2021/10/31 16:24:47 skrll Exp $	*/
+/*	$NetBSD: pic.c,v 1.75 2021/10/31 16:29:18 skrll Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +33,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.74 2021/10/31 16:24:47 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.75 2021/10/31 16:29:18 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -792,7 +792,7 @@ pic_establish_intr(struct pic_softc *pic
 	(*pic->pic_ops->pic_establish_irq)(pic, is);
 
 unblock:
-	if (!mp_online || !is->is_mpsafe) {
+	if (!mp_online || !is->is_mpsafe || !is->is_percpu) {
 		(*pic->pic_ops->pic_unblock_irqs)(pic, is->is_irq & ~0x1f,
 		    __BIT(is->is_irq & 0x1f));
 	} else {

Reply via email to