diff options
Diffstat (limited to 'arch/powerpc/platforms/powernv/eeh-ioda.c')
-rw-r--r-- | arch/powerpc/platforms/powernv/eeh-ioda.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c index 8184ef5ccb1a..d7ddcee7feb8 100644 --- a/arch/powerpc/platforms/powernv/eeh-ioda.c +++ b/arch/powerpc/platforms/powernv/eeh-ioda.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include "powernv.h" | 36 | #include "powernv.h" |
37 | #include "pci.h" | 37 | #include "pci.h" |
38 | 38 | ||
39 | static char *hub_diag = NULL; | ||
40 | static int ioda_eeh_nb_init = 0; | 39 | static int ioda_eeh_nb_init = 0; |
41 | 40 | ||
42 | static int ioda_eeh_event(struct notifier_block *nb, | 41 | static int ioda_eeh_event(struct notifier_block *nb, |
@@ -140,15 +139,6 @@ static int ioda_eeh_post_init(struct pci_controller *hose) | |||
140 | ioda_eeh_nb_init = 1; | 139 | ioda_eeh_nb_init = 1; |
141 | } | 140 | } |
142 | 141 | ||
143 | /* We needn't HUB diag-data on PHB3 */ | ||
144 | if (phb->type == PNV_PHB_IODA1 && !hub_diag) { | ||
145 | hub_diag = (char *)__get_free_page(GFP_KERNEL | __GFP_ZERO); | ||
146 | if (!hub_diag) { | ||
147 | pr_err("%s: Out of memory !\n", __func__); | ||
148 | return -ENOMEM; | ||
149 | } | ||
150 | } | ||
151 | |||
152 | #ifdef CONFIG_DEBUG_FS | 142 | #ifdef CONFIG_DEBUG_FS |
153 | if (phb->dbgfs) { | 143 | if (phb->dbgfs) { |
154 | debugfs_create_file("err_injct_outbound", 0600, | 144 | debugfs_create_file("err_injct_outbound", 0600, |
@@ -633,11 +623,10 @@ static void ioda_eeh_hub_diag_common(struct OpalIoP7IOCErrorData *data) | |||
633 | static void ioda_eeh_hub_diag(struct pci_controller *hose) | 623 | static void ioda_eeh_hub_diag(struct pci_controller *hose) |
634 | { | 624 | { |
635 | struct pnv_phb *phb = hose->private_data; | 625 | struct pnv_phb *phb = hose->private_data; |
636 | struct OpalIoP7IOCErrorData *data; | 626 | struct OpalIoP7IOCErrorData *data = &phb->diag.hub_diag; |
637 | long rc; | 627 | long rc; |
638 | 628 | ||
639 | data = (struct OpalIoP7IOCErrorData *)ioda_eeh_hub_diag; | 629 | rc = opal_pci_get_hub_diag_data(phb->hub_id, data, sizeof(*data)); |
640 | rc = opal_pci_get_hub_diag_data(phb->hub_id, data, PAGE_SIZE); | ||
641 | if (rc != OPAL_SUCCESS) { | 630 | if (rc != OPAL_SUCCESS) { |
642 | pr_warning("%s: Failed to get HUB#%llx diag-data (%ld)\n", | 631 | pr_warning("%s: Failed to get HUB#%llx diag-data (%ld)\n", |
643 | __func__, phb->hub_id, rc); | 632 | __func__, phb->hub_id, rc); |