Re: dmesg and ofctl -p output as instructed
Julian Coleman <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.sparc64 |
|---|---|
| Message-ID | <[email protected]> |
Hi, > So, I guess that the code has to stay so that we can handle the E250/E450 > correctly, but we need to guard it with an extra test for the PCI controller > type at least. Maybe we should test explicitly for E250/E450 too, but I'm > not certain that that is a good idea. We already have code to find the PCI node (find_pci_host_node()), so how about the attached? (It should apply to 7.x as well.) Regards, J -- My other computer runs NetBSD too - http://www.netbsd.org/
ofw_machdep-diffs.text
(text/plain, 1.7 KB)
Index: src/sys/arch/sparc64/sparc64/ofw_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc64/sparc64/ofw_machdep.c,v
retrieving revision 1.44
diff -u -r1.44 ofw_machdep.c
--- src/sys/arch/sparc64/sparc64/ofw_machdep.c 2 Mar 2015 14:17:06 -0000 1.44
+++ src/sys/arch/sparc64/sparc64/ofw_machdep.c 19 Dec 2015 22:49:22 -0000
@@ -738,22 +738,22 @@
int phc_node;
int rc = -1;
+ phc_node = find_pci_host_node(node);
+
/*
- * 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.
+ * On machines with psycho PCI controllers, we don't need to map
+ * interrupts if they are already fully specified (0x20 to 0x3f
+ * for onboard devices and IGN 0x7c0 for psycho0/psycho1).
*/
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;
+ char model[40];
+
+ if (OF_getprop(phc_node, "model", &model, sizeof(model)) > 10
+ && !strcmp(model, "SUNW,psycho")) {
+ DPRINTF(("OF_mapintr: interrupt %x already mapped\n",
+ *interrupt));
+ return validlen;
+ }
}
/*
@@ -775,8 +775,6 @@
return (-1);
}
- phc_node = find_pci_host_node(node);
-
while (node) {
#ifdef DEBUG
char name[40];