Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/arch/powerpc/pic Pull up following revision(s) (reque...



details:   https://anonhg.NetBSD.org/src/rev/71fb1ff3f3c8
branches:  netbsd-6
changeset: 774579:71fb1ff3f3c8
user:      riz <riz%NetBSD.org@localhost>
date:      Mon Sep 03 19:11:30 2012 +0000

description:
Pull up following revision(s) (requested by macallan in ticket #535):
        sys/arch/powerpc/pic/intr.c: revision 1.23
when calculating per-IPL virq masks, take into account that shared =20
IRQs may
request different IPLs
fixes vr(4)-related problems seen on ofppc

diffstat:

 sys/arch/powerpc/pic/intr.c |  21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diffs (64 lines):

diff -r 3c9cd6f9bb3c -r 71fb1ff3f3c8 sys/arch/powerpc/pic/intr.c
--- a/sys/arch/powerpc/pic/intr.c       Mon Sep 03 19:09:41 2012 +0000
+++ b/sys/arch/powerpc/pic/intr.c       Mon Sep 03 19:11:30 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.20.2.1 2012/06/12 19:35:46 riz Exp $ */
+/*     $NetBSD: intr.c,v 1.20.2.2 2012/09/03 19:11:30 riz Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.20.2.1 2012/06/12 19:35:46 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.20.2.2 2012/09/03 19:11:30 riz Exp $");
 
 #include "opt_interrupt.h"
 #include "opt_multiprocessor.h"
@@ -352,8 +352,9 @@
 static void
 intr_calculatemasks(void)
 {
-       imask_t newmask[NIPL] = { [IPL_NONE...IPL_HIGH] = 0 };
+       imask_t newmask[NIPL];
        struct intr_source *is;
+       struct intrhand *ih;
        int irq;
 
        for (u_int ipl = IPL_NONE; ipl < NIPL; ipl++) {
@@ -362,7 +363,9 @@
 
        /* First, figure out which ipl each IRQ uses. */
        for (irq = 0, is = intrsources; irq < NVIRQ; irq++, is++) {
-               newmask[is->is_ipl] |= PIC_VIRQ_TO_MASK(irq);
+               for (ih = is->is_hand; ih != NULL; ih = ih->ih_next) {
+                       newmask[ih->ih_ipl] |= PIC_VIRQ_TO_MASK(irq);
+               }
        }
 
        /*
@@ -379,7 +382,7 @@
                newmask[ipl] |= newmask[ipl - 1];
        }
 
-#ifdef DEBUG_IPL
+#ifdef PIC_DEBUG
        for (u_int ipl = 0; ipl < NIPL; ipl++) {
                printf("%u: %08x -> %08x\n", ipl, imask[ipl], newmask[ipl]);
        }
@@ -661,10 +664,10 @@
 void
 genppc_cpu_configure(void)
 {
-       aprint_normal("biomask %x netmask %x ttymask %x\n",
-           (u_int)imask[IPL_BIO] & 0x1fffffff,
-           (u_int)imask[IPL_NET] & 0x1fffffff,
-           (u_int)imask[IPL_TTY] & 0x1fffffff);
+       aprint_normal("vmmask %x schedmask %x highmask %x\n",
+           (u_int)imask[IPL_VM] & 0x7fffffff,
+           (u_int)imask[IPL_SCHED] & 0x7fffffff,
+           (u_int)imask[IPL_HIGH] & 0x7fffffff);
 
        spl0();
 }



Home | Main Index | Thread Index | Old Index