Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/cortex Only target boot cpu for SPIs atm. Fix a...
details: https://anonhg.NetBSD.org/src/rev/e61cc27c6b9a
branches: trunk
changeset: 803483:e61cc27c6b9a
user: skrll <skrll%NetBSD.org@localhost>
date: Wed Oct 29 19:27:36 2014 +0000
description:
Only target boot cpu for SPIs atm. Fix a couple of bugs in the now
disabled code.
diffstat:
sys/arch/arm/cortex/gic.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (42 lines):
diff -r 1a92d8e7293f -r e61cc27c6b9a sys/arch/arm/cortex/gic.c
--- a/sys/arch/arm/cortex/gic.c Wed Oct 29 19:10:49 2014 +0000
+++ b/sys/arch/arm/cortex/gic.c Wed Oct 29 19:27:36 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gic.c,v 1.11 2014/10/29 14:14:14 skrll Exp $ */
+/* $NetBSD: gic.c,v 1.12 2014/10/29 19:27:36 skrll Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -34,7 +34,7 @@
#define _INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.11 2014/10/29 14:14:14 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.12 2014/10/29 19:27:36 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -350,11 +350,13 @@
* to the primary cpu.
*/
targets &= ~(0xff << byte_shift);
+#if 0
#ifdef MULTIPROCESSOR
if (is->is_mpsafe) {
- targets |= sc->sc_mptargets;
+ targets |= sc->sc_mptargets << byte_shift;
} else
#endif
+#endif
targets |= 1 << byte_shift;
gicd_write(sc, targets_reg, targets);
@@ -443,7 +445,7 @@
struct intrsource * const is = sc->sc_pic.pic_sources[irq];
const bus_size_t targets_reg = GICD_ITARGETSRn(irq / 4);
if (is != NULL && is->is_mpsafe) {
- const u_int byte_shift = 0xff << (8 * (irq & 3));
+ const u_int byte_shift = 8 * (irq & 3);
uint32_t targets = gicd_read(sc, targets_reg);
targets |= sc->sc_mptargets << byte_shift;
gicd_write(sc, targets_reg, targets);
Home |
Main Index |
Thread Index |
Old Index