Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/pic Use ENABLE_INTERRUPT() / DISABLE_INTERRUPT(...



details:   https://anonhg.NetBSD.org/src/rev/d9ebecf860f9
branches:  trunk
changeset: 951937:d9ebecf860f9
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Feb 07 21:18:37 2021 +0000

description:
Use ENABLE_INTERRUPT() / DISABLE_INTERRUPT() instead of cpsie()/cpsid() in
places where we don't care about the cpsie() return value.

diffstat:

 sys/arch/arm/pic/pic.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r 6668c8352f14 -r d9ebecf860f9 sys/arch/arm/pic/pic.c
--- a/sys/arch/arm/pic/pic.c    Sun Feb 07 21:15:40 2021 +0000
+++ b/sys/arch/arm/pic/pic.c    Sun Feb 07 21:18:37 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pic.c,v 1.61 2020/11/01 14:42:05 jmcneill Exp $        */
+/*     $NetBSD: pic.c,v 1.62 2021/02/07 21:18:37 jmcneill 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.61 2020/11/01 14:42:05 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.62 2021/02/07 21:18:37 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -447,13 +447,14 @@
                        atomic_and_32(ipending, ~__BIT(irq));
                        is = pic->pic_sources[irq_base + irq];
                        if (is != NULL) {
-                               cpsie(I32_bit);
+                               ENABLE_INTERRUPT();
                                pic_dispatch(is, frame);
-                               cpsid(I32_bit);
+                               DISABLE_INTERRUPT();
 #if PIC_MAXSOURCES > 32
                                /*
                                 * There is a possibility of interrupting
-                                * from cpsie() to cpsid().
+                                * from ENABLE_INTERRUPT() to
+                                * DISABLE_INTERRUPT().
                                 */
                                poi = 1;
 #endif



Home | Main Index | Thread Index | Old Index