aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci_schizo.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/pci_schizo.c')
-rw-r--r--arch/sparc64/kernel/pci_schizo.c51
1 files changed, 25 insertions, 26 deletions
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c
index a0da7f2c344e..72743acecbc0 100644
--- a/arch/sparc64/kernel/pci_schizo.c
+++ b/arch/sparc64/kernel/pci_schizo.c
@@ -531,28 +531,28 @@ static irqreturn_t schizo_ue_intr(int irq, void *dev_id)
531 schizo_write(afsr_reg, error_bits); 531 schizo_write(afsr_reg, error_bits);
532 532
533 /* Log the error. */ 533 /* Log the error. */
534 printk("PCI%d: Uncorrectable Error, primary error type[%s]\n", 534 printk("%s: Uncorrectable Error, primary error type[%s]\n",
535 p->index, 535 pbm->name,
536 (((error_bits & SCHIZO_UEAFSR_PPIO) ? 536 (((error_bits & SCHIZO_UEAFSR_PPIO) ?
537 "PIO" : 537 "PIO" :
538 ((error_bits & SCHIZO_UEAFSR_PDRD) ? 538 ((error_bits & SCHIZO_UEAFSR_PDRD) ?
539 "DMA Read" : 539 "DMA Read" :
540 ((error_bits & SCHIZO_UEAFSR_PDWR) ? 540 ((error_bits & SCHIZO_UEAFSR_PDWR) ?
541 "DMA Write" : "???"))))); 541 "DMA Write" : "???")))));
542 printk("PCI%d: bytemask[%04lx] qword_offset[%lx] SAFARI_AID[%02lx]\n", 542 printk("%s: bytemask[%04lx] qword_offset[%lx] SAFARI_AID[%02lx]\n",
543 p->index, 543 pbm->name,
544 (afsr & SCHIZO_UEAFSR_BMSK) >> 32UL, 544 (afsr & SCHIZO_UEAFSR_BMSK) >> 32UL,
545 (afsr & SCHIZO_UEAFSR_QOFF) >> 30UL, 545 (afsr & SCHIZO_UEAFSR_QOFF) >> 30UL,
546 (afsr & SCHIZO_UEAFSR_AID) >> 24UL); 546 (afsr & SCHIZO_UEAFSR_AID) >> 24UL);
547 printk("PCI%d: partial[%d] owned_in[%d] mtag[%lx] mtag_synd[%lx] ecc_sync[%lx]\n", 547 printk("%s: partial[%d] owned_in[%d] mtag[%lx] mtag_synd[%lx] ecc_sync[%lx]\n",
548 p->index, 548 pbm->name,
549 (afsr & SCHIZO_UEAFSR_PARTIAL) ? 1 : 0, 549 (afsr & SCHIZO_UEAFSR_PARTIAL) ? 1 : 0,
550 (afsr & SCHIZO_UEAFSR_OWNEDIN) ? 1 : 0, 550 (afsr & SCHIZO_UEAFSR_OWNEDIN) ? 1 : 0,
551 (afsr & SCHIZO_UEAFSR_MTAG) >> 13UL, 551 (afsr & SCHIZO_UEAFSR_MTAG) >> 13UL,
552 (afsr & SCHIZO_UEAFSR_MTAGSYND) >> 16UL, 552 (afsr & SCHIZO_UEAFSR_MTAGSYND) >> 16UL,
553 (afsr & SCHIZO_UEAFSR_ECCSYND) >> 0UL); 553 (afsr & SCHIZO_UEAFSR_ECCSYND) >> 0UL);
554 printk("PCI%d: UE AFAR [%016lx]\n", p->index, afar); 554 printk("%s: UE AFAR [%016lx]\n", pbm->name, afar);
555 printk("PCI%d: UE Secondary errors [", p->index); 555 printk("%s: UE Secondary errors [", pbm->name);
556 reported = 0; 556 reported = 0;
557 if (afsr & SCHIZO_UEAFSR_SPIO) { 557 if (afsr & SCHIZO_UEAFSR_SPIO) {
558 reported++; 558 reported++;
@@ -593,7 +593,6 @@ static irqreturn_t schizo_ue_intr(int irq, void *dev_id)
593static irqreturn_t schizo_ce_intr(int irq, void *dev_id) 593static irqreturn_t schizo_ce_intr(int irq, void *dev_id)
594{ 594{
595 struct pci_pbm_info *pbm = dev_id; 595 struct pci_pbm_info *pbm = dev_id;
596 struct pci_controller_info *p = pbm->parent;
597 unsigned long afsr_reg = pbm->controller_regs + SCHIZO_CE_AFSR; 596 unsigned long afsr_reg = pbm->controller_regs + SCHIZO_CE_AFSR;
598 unsigned long afar_reg = pbm->controller_regs + SCHIZO_CE_AFAR; 597 unsigned long afar_reg = pbm->controller_regs + SCHIZO_CE_AFAR;
599 unsigned long afsr, afar, error_bits; 598 unsigned long afsr, afar, error_bits;
@@ -620,8 +619,8 @@ static irqreturn_t schizo_ce_intr(int irq, void *dev_id)
620 schizo_write(afsr_reg, error_bits); 619 schizo_write(afsr_reg, error_bits);
621 620
622 /* Log the error. */ 621 /* Log the error. */
623 printk("PCI%d: Correctable Error, primary error type[%s]\n", 622 printk("%s: Correctable Error, primary error type[%s]\n",
624 p->index, 623 pbm->name,
625 (((error_bits & SCHIZO_CEAFSR_PPIO) ? 624 (((error_bits & SCHIZO_CEAFSR_PPIO) ?
626 "PIO" : 625 "PIO" :
627 ((error_bits & SCHIZO_CEAFSR_PDRD) ? 626 ((error_bits & SCHIZO_CEAFSR_PDRD) ?
@@ -632,20 +631,20 @@ static irqreturn_t schizo_ce_intr(int irq, void *dev_id)
632 /* XXX Use syndrome and afar to print out module string just like 631 /* XXX Use syndrome and afar to print out module string just like
633 * XXX UDB CE trap handler does... -DaveM 632 * XXX UDB CE trap handler does... -DaveM
634 */ 633 */
635 printk("PCI%d: bytemask[%04lx] qword_offset[%lx] SAFARI_AID[%02lx]\n", 634 printk("%s: bytemask[%04lx] qword_offset[%lx] SAFARI_AID[%02lx]\n",
636 p->index, 635 pbm->name,
637 (afsr & SCHIZO_UEAFSR_BMSK) >> 32UL, 636 (afsr & SCHIZO_UEAFSR_BMSK) >> 32UL,
638 (afsr & SCHIZO_UEAFSR_QOFF) >> 30UL, 637 (afsr & SCHIZO_UEAFSR_QOFF) >> 30UL,
639 (afsr & SCHIZO_UEAFSR_AID) >> 24UL); 638 (afsr & SCHIZO_UEAFSR_AID) >> 24UL);
640 printk("PCI%d: partial[%d] owned_in[%d] mtag[%lx] mtag_synd[%lx] ecc_sync[%lx]\n", 639 printk("%s: partial[%d] owned_in[%d] mtag[%lx] mtag_synd[%lx] ecc_sync[%lx]\n",
641 p->index, 640 pbm->name,
642 (afsr & SCHIZO_UEAFSR_PARTIAL) ? 1 : 0, 641 (afsr & SCHIZO_UEAFSR_PARTIAL) ? 1 : 0,
643 (afsr & SCHIZO_UEAFSR_OWNEDIN) ? 1 : 0, 642 (afsr & SCHIZO_UEAFSR_OWNEDIN) ? 1 : 0,
644 (afsr & SCHIZO_UEAFSR_MTAG) >> 13UL, 643 (afsr & SCHIZO_UEAFSR_MTAG) >> 13UL,
645 (afsr & SCHIZO_UEAFSR_MTAGSYND) >> 16UL, 644 (afsr & SCHIZO_UEAFSR_MTAGSYND) >> 16UL,
646 (afsr & SCHIZO_UEAFSR_ECCSYND) >> 0UL); 645 (afsr & SCHIZO_UEAFSR_ECCSYND) >> 0UL);
647 printk("PCI%d: CE AFAR [%016lx]\n", p->index, afar); 646 printk("%s: CE AFAR [%016lx]\n", pbm->name, afar);
648 printk("PCI%d: CE Secondary errors [", p->index); 647 printk("%s: CE Secondary errors [", pbm->name);
649 reported = 0; 648 reported = 0;
650 if (afsr & SCHIZO_CEAFSR_SPIO) { 649 if (afsr & SCHIZO_CEAFSR_SPIO) {
651 reported++; 650 reported++;
@@ -864,10 +863,10 @@ static irqreturn_t schizo_pcierr_intr(int irq, void *dev_id)
864 */ 863 */
865 if (error_bits & (SCHIZO_PCIAFSR_PTA | SCHIZO_PCIAFSR_STA)) { 864 if (error_bits & (SCHIZO_PCIAFSR_PTA | SCHIZO_PCIAFSR_STA)) {
866 schizo_check_iommu_error(p, PCI_ERR); 865 schizo_check_iommu_error(p, PCI_ERR);
867 pci_scan_for_target_abort(p, pbm, pbm->pci_bus); 866 pci_scan_for_target_abort(pbm, pbm->pci_bus);
868 } 867 }
869 if (error_bits & (SCHIZO_PCIAFSR_PMA | SCHIZO_PCIAFSR_SMA)) 868 if (error_bits & (SCHIZO_PCIAFSR_PMA | SCHIZO_PCIAFSR_SMA))
870 pci_scan_for_master_abort(p, pbm, pbm->pci_bus); 869 pci_scan_for_master_abort(pbm, pbm->pci_bus);
871 870
872 /* For excessive retries, PSYCHO/PBM will abort the device 871 /* For excessive retries, PSYCHO/PBM will abort the device
873 * and there is no way to specifically check for excessive 872 * and there is no way to specifically check for excessive
@@ -877,7 +876,7 @@ static irqreturn_t schizo_pcierr_intr(int irq, void *dev_id)
877 */ 876 */
878 877
879 if (error_bits & (SCHIZO_PCIAFSR_PPERR | SCHIZO_PCIAFSR_SPERR)) 878 if (error_bits & (SCHIZO_PCIAFSR_PPERR | SCHIZO_PCIAFSR_SPERR))
880 pci_scan_for_parity_error(p, pbm, pbm->pci_bus); 879 pci_scan_for_parity_error(pbm, pbm->pci_bus);
881 880
882 return IRQ_HANDLED; 881 return IRQ_HANDLED;
883} 882}
@@ -932,14 +931,14 @@ static irqreturn_t schizo_safarierr_intr(int irq, void *dev_id)
932 errlog & ~(SAFARI_ERRLOG_ERROUT)); 931 errlog & ~(SAFARI_ERRLOG_ERROUT));
933 932
934 if (!(errlog & BUS_ERROR_UNMAP)) { 933 if (!(errlog & BUS_ERROR_UNMAP)) {
935 printk("PCI%d: Unexpected Safari/JBUS error interrupt, errlog[%016lx]\n", 934 printk("%s: Unexpected Safari/JBUS error interrupt, errlog[%016lx]\n",
936 p->index, errlog); 935 pbm->name, errlog);
937 936
938 return IRQ_HANDLED; 937 return IRQ_HANDLED;
939 } 938 }
940 939
941 printk("PCI%d: Safari/JBUS interrupt, UNMAPPED error, interrogating IOMMUs.\n", 940 printk("%s: Safari/JBUS interrupt, UNMAPPED error, interrogating IOMMUs.\n",
942 p->index); 941 pbm->name);
943 schizo_check_iommu_error(p, SAFARI_ERR); 942 schizo_check_iommu_error(p, SAFARI_ERR);
944 943
945 return IRQ_HANDLED; 944 return IRQ_HANDLED;
@@ -1464,6 +1463,8 @@ static void schizo_pbm_init(struct pci_controller_info *p,
1464 pbm->scan_bus = schizo_scan_bus; 1463 pbm->scan_bus = schizo_scan_bus;
1465 pbm->pci_ops = &schizo_ops; 1464 pbm->pci_ops = &schizo_ops;
1466 1465
1466 pbm->index = pci_num_pbms++;
1467
1467 pbm->portid = portid; 1468 pbm->portid = portid;
1468 pbm->parent = p; 1469 pbm->parent = p;
1469 pbm->prom_node = dp; 1470 pbm->prom_node = dp;
@@ -1536,8 +1537,6 @@ static void __schizo_init(struct device_node *dp, char *model_name, int chip_typ
1536 1537
1537 p->pbm_B.iommu = iommu; 1538 p->pbm_B.iommu = iommu;
1538 1539
1539 p->index = pci_num_controllers++;
1540
1541 /* Like PSYCHO we have a 2GB aligned area for memory space. */ 1540 /* Like PSYCHO we have a 2GB aligned area for memory space. */
1542 pci_memspace_mask = 0x7fffffffUL; 1541 pci_memspace_mask = 0x7fffffffUL;
1543 1542