Source-Changes-HG archive

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

[src/netbsd-7-0]: src/sys/arch/sparc64/sparc64 Pull up following revision(s) ...



details:   https://anonhg.NetBSD.org/src/rev/cbff395ffb5a
branches:  netbsd-7-0
changeset: 801121:cbff395ffb5a
user:      riz <riz%NetBSD.org@localhost>
date:      Tue Jan 26 04:56:56 2016 +0000

description:
Pull up following revision(s) (requested by jdc in ticket #1069):
        sys/arch/sparc64/sparc64/ofw_machdep.c: revision 1.45
Restrict the check for fully specified interrupts to machines with psycho
controllers only, and adjust comments to note this.
See also the mail thread starting at:
http://mail-index.NetBSD.org/port-sparc64/2015/12/03/msg002488.html

diffstat:

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

diffs (63 lines):

diff -r f7836324df7c -r cbff395ffb5a sys/arch/sparc64/sparc64/ofw_machdep.c
--- a/sys/arch/sparc64/sparc64/ofw_machdep.c    Tue Jan 26 04:50:37 2016 +0000
+++ b/sys/arch/sparc64/sparc64/ofw_machdep.c    Tue Jan 26 04:56:56 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofw_machdep.c,v 1.42 2014/05/04 09:05:39 martin Exp $  */
+/*     $NetBSD: ofw_machdep.c,v 1.42.4.1 2016/01/26 04:56:56 riz 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.42 2014/05/04 09:05:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.42.4.1 2016/01/26 04:56:56 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -707,22 +707,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 "
-                   "port-sparc64%NetBSD.org@localhost!\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;
+               }
        }
 
        /*
@@ -744,8 +744,6 @@
                return (-1);
        }
 
-       phc_node = find_pci_host_node(node);
-
        while (node) {
 #ifdef DEBUG
                char name[40];



Home | Main Index | Thread Index | Old Index