Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/pic treat IPIs like regular interrupts at I...
details: https://anonhg.NetBSD.org/src/rev/7857c4538e37
branches: trunk
changeset: 345434:7857c4538e37
user: macallan <macallan%NetBSD.org@localhost>
date: Thu May 26 17:38:05 2016 +0000
description:
treat IPIs like regular interrupts at IPL_HIGH
should fix port-powerpc/44387
tested by chuq
diffstat:
sys/arch/powerpc/pic/intr.c | 16 +++-------------
sys/arch/powerpc/pic/ipi_openpic.c | 14 +++-----------
sys/arch/powerpc/pic/pic_openpic.c | 6 +++---
3 files changed, 9 insertions(+), 27 deletions(-)
diffs (100 lines):
diff -r 6ff41c5b3bb0 -r 7857c4538e37 sys/arch/powerpc/pic/intr.c
--- a/sys/arch/powerpc/pic/intr.c Thu May 26 16:55:08 2016 +0000
+++ b/sys/arch/powerpc/pic/intr.c Thu May 26 17:38:05 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.23 2012/08/31 13:12:52 macallan Exp $ */
+/* $NetBSD: intr.c,v 1.24 2016/05/26 17:38:05 macallan Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.23 2012/08/31 13:12:52 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.24 2016/05/26 17:38:05 macallan Exp $");
#include "opt_interrupt.h"
#include "opt_multiprocessor.h"
@@ -548,18 +548,8 @@
const int pcpl = ci->ci_cpl;
do {
-#ifdef MULTIPROCESSOR
- /* THIS IS WRONG XXX */
- if (picirq == ipiops.ppc_ipi_vector) {
- ci->ci_cpl = IPL_HIGH;
- ipi_intr(NULL);
- ci->ci_cpl = pcpl;
- pic->pic_ack_irq(pic, picirq);
- continue;
- }
-#endif
+ const int virq = virq_map[picirq + pic->pic_intrbase];
- const int virq = virq_map[picirq + pic->pic_intrbase];
KASSERT(virq != 0);
KASSERT(picirq < pic->pic_numintrs);
imask_t v_imen = PIC_VIRQ_TO_MASK(virq);
diff -r 6ff41c5b3bb0 -r 7857c4538e37 sys/arch/powerpc/pic/ipi_openpic.c
--- a/sys/arch/powerpc/pic/ipi_openpic.c Thu May 26 16:55:08 2016 +0000
+++ b/sys/arch/powerpc/pic/ipi_openpic.c Thu May 26 17:38:05 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipi_openpic.c,v 1.7 2012/02/01 09:54:03 matt Exp $ */
+/* $NetBSD: ipi_openpic.c,v 1.8 2016/05/26 17:38:05 macallan Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipi_openpic.c,v 1.7 2012/02/01 09:54:03 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipi_openpic.c,v 1.8 2016/05/26 17:38:05 macallan Exp $");
#include "opt_multiprocessor.h"
#include <sys/param.h>
@@ -103,15 +103,7 @@
static void
openpic_establish_ipi(int type, int level, void *ih_args)
{
-/*
- * XXX
- * for now we catch IPIs early in pic_handle_intr() so no need to do anything
- * here
- */
-#if 0
- intr_establish(ipiops.ppc_ipi_vector, type, level, ppcipi_intr,
- ih_args);
-#endif
+ intr_establish(ipiops.ppc_ipi_vector, type, level, ipi_intr, ih_args);
}
#endif /*MULTIPROCESSOR*/
diff -r 6ff41c5b3bb0 -r 7857c4538e37 sys/arch/powerpc/pic/pic_openpic.c
--- a/sys/arch/powerpc/pic/pic_openpic.c Thu May 26 16:55:08 2016 +0000
+++ b/sys/arch/powerpc/pic/pic_openpic.c Thu May 26 17:38:05 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pic_openpic.c,v 1.8 2012/02/01 09:54:03 matt Exp $ */
+/* $NetBSD: pic_openpic.c,v 1.9 2016/05/26 17:38:05 macallan Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic_openpic.c,v 1.8 2012/02/01 09:54:03 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic_openpic.c,v 1.9 2016/05/26 17:38:05 macallan Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -67,7 +67,7 @@
"Supports %d CPUs and %d interrupt sources.\n",
x & 0xff, ((x & 0x1f00) >> 8) + 1, ((x & 0x07ff0000) >> 16) + 1);
- pic->pic_numintrs = ((x & 0x07ff0000) >> 16) + 1;
+ pic->pic_numintrs = ((x & 0x07ff0000) >> 16) + 2; /* one more slot for IPI */
pic->pic_cookie = addr;
pic->pic_enable_irq = opic_enable_irq;
pic->pic_reenable_irq = opic_enable_irq;
Home |
Main Index |
Thread Index |
Old Index