Module Name:    src
Committed By:   martin
Date:           Tue Jul  9 20:32:11 UTC 2013

Modified Files:
        src/sys/arch/sparc64/sparc64: ofw_machdep.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/sparc64/sparc64/ofw_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc64/sparc64/ofw_machdep.c
diff -u src/sys/arch/sparc64/sparc64/ofw_machdep.c:1.39 src/sys/arch/sparc64/sparc64/ofw_machdep.c:1.40
--- src/sys/arch/sparc64/sparc64/ofw_machdep.c:1.39	Mon Jul  8 17:01:05 2013
+++ src/sys/arch/sparc64/sparc64/ofw_machdep.c	Tue Jul  9 20:32:11 2013
@@ -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 @@ OF_mapintr(int node, int *interrupt, int
 	/* 
 	 * 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 "
+		    "[email protected]!\n"
+		    "Not mapping interrupt for node %s (%x)\n", name, node);
 		return validlen;
+	}
 
 	/*
 	 * If there is no interrupt map in the bus node, we 

Reply via email to