aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/eeh.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/pseries/eeh.c')
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 093438b93bd9..5f3e6d8659fe 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -76,7 +76,7 @@
76 */ 76 */
77#define EEH_MAX_FAILS 2100000 77#define EEH_MAX_FAILS 2100000
78 78
79/* Time to wait for a PCI slot to retport status, in milliseconds */ 79/* Time to wait for a PCI slot to report status, in milliseconds */
80#define PCI_BUS_RESET_WAIT_MSEC (60*1000) 80#define PCI_BUS_RESET_WAIT_MSEC (60*1000)
81 81
82/* RTAS tokens */ 82/* RTAS tokens */
@@ -95,11 +95,18 @@ EXPORT_SYMBOL(eeh_subsystem_enabled);
95/* Lock to avoid races due to multiple reports of an error */ 95/* Lock to avoid races due to multiple reports of an error */
96static DEFINE_SPINLOCK(confirm_error_lock); 96static DEFINE_SPINLOCK(confirm_error_lock);
97 97
98/* Buffer for reporting slot-error-detail rtas calls */ 98/* Buffer for reporting slot-error-detail rtas calls. Its here
99 * in BSS, and not dynamically alloced, so that it ends up in
100 * RMO where RTAS can access it.
101 */
99static unsigned char slot_errbuf[RTAS_ERROR_LOG_MAX]; 102static unsigned char slot_errbuf[RTAS_ERROR_LOG_MAX];
100static DEFINE_SPINLOCK(slot_errbuf_lock); 103static DEFINE_SPINLOCK(slot_errbuf_lock);
101static int eeh_error_buf_size; 104static int eeh_error_buf_size;
102 105
106/* Buffer for reporting pci register dumps. Its here in BSS, and
107 * not dynamically alloced, so that it ends up in RMO where RTAS
108 * can access it.
109 */
103#define EEH_PCI_REGS_LOG_LEN 4096 110#define EEH_PCI_REGS_LOG_LEN 4096
104static unsigned char pci_regs_buf[EEH_PCI_REGS_LOG_LEN]; 111static unsigned char pci_regs_buf[EEH_PCI_REGS_LOG_LEN];
105 112
@@ -218,7 +225,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len)
218void eeh_slot_error_detail(struct pci_dn *pdn, int severity) 225void eeh_slot_error_detail(struct pci_dn *pdn, int severity)
219{ 226{
220 size_t loglen = 0; 227 size_t loglen = 0;
221 memset(pci_regs_buf, 0, EEH_PCI_REGS_LOG_LEN); 228 pci_regs_buf[0] = 0;
222 229
223 rtas_pci_enable(pdn, EEH_THAW_MMIO); 230 rtas_pci_enable(pdn, EEH_THAW_MMIO);
224 loglen = gather_pci_data(pdn, pci_regs_buf, EEH_PCI_REGS_LOG_LEN); 231 loglen = gather_pci_data(pdn, pci_regs_buf, EEH_PCI_REGS_LOG_LEN);