Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 Make dubious code that skips a few ...



details:   https://anonhg.NetBSD.org/src/rev/e7bffef51357
branches:  trunk
changeset: 787862:e7bffef51357
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Jul 09 20:32:11 2013 +0000

description:
Make dubious code that skips a few interrupts hardcoded print a verbose
message asking the user to mail us details. This will also alarm us
should the strange test sometimes in the future trigger eroneously
on newer hardware.

diffstat:

 sys/arch/sparc64/sparc64/ofw_machdep.c |  17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diffs (40 lines):

diff -r d1183ea7aff2 -r e7bffef51357 sys/arch/sparc64/sparc64/ofw_machdep.c
--- a/sys/arch/sparc64/sparc64/ofw_machdep.c    Tue Jul 09 18:44:41 2013 +0000
+++ b/sys/arch/sparc64/sparc64/ofw_machdep.c    Tue Jul 09 20:32:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofw_machdep.c,v 1.39 2013/07/08 17:01:05 mhitch Exp $  */
+/*     $NetBSD: ofw_machdep.c,v 1.40 2013/07/09 20:32:11 martin Exp $  */
 
 /*
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -34,7 +34,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.39 2013/07/08 17:01:05 mhitch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.40 2013/07/09 20:32:11 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -701,9 +701,20 @@
        /* 
         * Don't try to map interrupts for onboard devices, or if the
         * interrupt is already fully specified.
+        * XXX This should be done differently (i.e. by matching
+        * the node name) - but we need access to a machine where
+        * a change is testable - hence the printf below.
         */
-       if (*interrupt & 0x20 || *interrupt & 0x7c0)
+       if (*interrupt & 0x20 || *interrupt & 0x7c0) {
+               char name[40];
+
+               OF_getprop(node, "name", &name, sizeof(name));
+               printf("\nATTENTION: if you see this message, please mail "
+                   "the output of \"dmesg\" and \"ofctl -p\" to "
+                   "port-sparc64%NetBSD.org@localhost!\n"
+                   "Not mapping interrupt for node %s (%x)\n", name, node);
                return validlen;
+       }
 
        /*
         * If there is no interrupt map in the bus node, we 



Home | Main Index | Thread Index | Old Index