aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci_sun4v.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/pci_sun4v.c')
-rw-r--r--arch/sparc64/kernel/pci_sun4v.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c
index ea51ade43b8b..13b611db0583 100644
--- a/arch/sparc64/kernel/pci_sun4v.c
+++ b/arch/sparc64/kernel/pci_sun4v.c
@@ -954,19 +954,20 @@ static void pci_sun4v_pbm_init(struct pci_controller_info *p, int prom_node, u32
954 err = prom_getproperty(prom_node, "interrupt-map", 954 err = prom_getproperty(prom_node, "interrupt-map",
955 (char *)pbm->pbm_intmap, 955 (char *)pbm->pbm_intmap,
956 sizeof(pbm->pbm_intmap)); 956 sizeof(pbm->pbm_intmap));
957 if (err != -1) { 957 if (err == 0 || err == -1) {
958 pbm->num_pbm_intmap = (err / sizeof(struct linux_prom_pci_intmap)); 958 prom_printf("%s: Fatal error, no interrupt-map property.\n",
959 err = prom_getproperty(prom_node, "interrupt-map-mask", 959 pbm->name);
960 (char *)&pbm->pbm_intmask, 960 prom_halt();
961 sizeof(pbm->pbm_intmask)); 961 }
962 if (err == -1) { 962
963 prom_printf("%s: Fatal error, no " 963 pbm->num_pbm_intmap = (err / sizeof(struct linux_prom_pci_intmap));
964 "interrupt-map-mask.\n", pbm->name); 964 err = prom_getproperty(prom_node, "interrupt-map-mask",
965 prom_halt(); 965 (char *)&pbm->pbm_intmask,
966 } 966 sizeof(pbm->pbm_intmask));
967 } else { 967 if (err == 0 || err == -1) {
968 pbm->num_pbm_intmap = 0; 968 prom_printf("%s: Fatal error, no interrupt-map-mask.\n",
969 memset(&pbm->pbm_intmask, 0, sizeof(pbm->pbm_intmask)); 969 pbm->name);
970 prom_halt();
970 } 971 }
971 972
972 pci_sun4v_get_bus_range(pbm); 973 pci_sun4v_get_bus_range(pbm);