OSDN Git Service

[SPARC64]: Make lack of interrupt-map-* a fatal error on SUN4V.
authorDavid S. Miller <davem@sunset.davemloft.net>
Wed, 15 Feb 2006 06:20:41 +0000 (22:20 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 20 Mar 2006 09:13:00 +0000 (01:13 -0800)
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/pci_sun4v.c

index ea51ade..13b611d 100644 (file)
@@ -954,19 +954,20 @@ static void pci_sun4v_pbm_init(struct pci_controller_info *p, int prom_node, u32
        err = prom_getproperty(prom_node, "interrupt-map",
                               (char *)pbm->pbm_intmap,
                               sizeof(pbm->pbm_intmap));
-       if (err != -1) {
-               pbm->num_pbm_intmap = (err / sizeof(struct linux_prom_pci_intmap));
-               err = prom_getproperty(prom_node, "interrupt-map-mask",
-                                      (char *)&pbm->pbm_intmask,
-                                      sizeof(pbm->pbm_intmask));
-               if (err == -1) {
-                       prom_printf("%s: Fatal error, no "
-                                   "interrupt-map-mask.\n", pbm->name);
-                       prom_halt();
-               }
-       } else {
-               pbm->num_pbm_intmap = 0;
-               memset(&pbm->pbm_intmask, 0, sizeof(pbm->pbm_intmask));
+       if (err == 0 || err == -1) {
+               prom_printf("%s: Fatal error, no interrupt-map property.\n",
+                           pbm->name);
+               prom_halt();
+       }
+
+       pbm->num_pbm_intmap = (err / sizeof(struct linux_prom_pci_intmap));
+       err = prom_getproperty(prom_node, "interrupt-map-mask",
+                              (char *)&pbm->pbm_intmask,
+                              sizeof(pbm->pbm_intmask));
+       if (err == 0 || err == -1) {
+               prom_printf("%s: Fatal error, no interrupt-map-mask.\n",
+                           pbm->name);
+               prom_halt();
        }
 
        pci_sun4v_get_bus_range(pbm);