Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/apple Mask the bottom 5 bits in the standard pi...



details:   https://anonhg.NetBSD.org/src/rev/dab78edb6510
branches:  trunk
changeset: 1026502:dab78edb6510
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Nov 26 19:39:58 2021 +0000

description:
Mask the bottom 5 bits in the standard pic way. NFC.

diffstat:

 sys/arch/arm/apple/apple_intc.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r f67e7373ff3b -r dab78edb6510 sys/arch/arm/apple/apple_intc.c
--- a/sys/arch/arm/apple/apple_intc.c   Fri Nov 26 19:36:17 2021 +0000
+++ b/sys/arch/arm/apple/apple_intc.c   Fri Nov 26 19:39:58 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apple_intc.c,v 1.5 2021/11/26 19:36:17 skrll Exp $ */
+/* $NetBSD: apple_intc.c,v 1.6 2021/11/26 19:39:58 skrll Exp $ */
 
 /*-
  * Copyright (c) 2021 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -32,7 +32,7 @@
 #define        _INTR_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apple_intc.c,v 1.5 2021/11/26 19:36:17 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apple_intc.c,v 1.6 2021/11/26 19:39:58 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -291,9 +291,9 @@
 static void
 apple_intc_mark_pending(struct pic_softc *pic, u_int intno)
 {
-       const int group = intno / 32;
+       const int base = intno & ~0x1f;
        const uint32_t pending = __BIT(intno & 0x1f);
-       pic_mark_pending_sources(pic, group * 32, pending);
+       pic_mark_pending_sources(pic, base, pending);
 }
 
 static void



Home | Main Index | Thread Index | Old Index