diff options
author | Richard A. Lary <rlary@linux.vnet.ibm.com> | 2011-04-06 08:50:45 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-27 00:18:54 -0400 |
commit | 65f47f1339dfcffcd5837a307172fb41aa39e479 (patch) | |
tree | 74e6f83f32c26bffcceaac6a611b33cbc534ecb6 | |
parent | 44ae3ab3358e962039c36ad4ae461ae9fb29596c (diff) |
powerpc/eeh: Add support for ibm,configure-pe RTAS call
Added support for ibm,configure-pe RTAS call introduced with
PAPR 2.2.
Signed-off-by: Richard A. Lary <rlary@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 89649173d3a3..229373053864 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -93,6 +93,7 @@ static int ibm_slot_error_detail; | |||
93 | static int ibm_get_config_addr_info; | 93 | static int ibm_get_config_addr_info; |
94 | static int ibm_get_config_addr_info2; | 94 | static int ibm_get_config_addr_info2; |
95 | static int ibm_configure_bridge; | 95 | static int ibm_configure_bridge; |
96 | static int ibm_configure_pe; | ||
96 | 97 | ||
97 | int eeh_subsystem_enabled; | 98 | int eeh_subsystem_enabled; |
98 | EXPORT_SYMBOL(eeh_subsystem_enabled); | 99 | EXPORT_SYMBOL(eeh_subsystem_enabled); |
@@ -261,6 +262,8 @@ void eeh_slot_error_detail(struct pci_dn *pdn, int severity) | |||
261 | pci_regs_buf[0] = 0; | 262 | pci_regs_buf[0] = 0; |
262 | 263 | ||
263 | rtas_pci_enable(pdn, EEH_THAW_MMIO); | 264 | rtas_pci_enable(pdn, EEH_THAW_MMIO); |
265 | rtas_configure_bridge(pdn); | ||
266 | eeh_restore_bars(pdn); | ||
264 | loglen = gather_pci_data(pdn, pci_regs_buf, EEH_PCI_REGS_LOG_LEN); | 267 | loglen = gather_pci_data(pdn, pci_regs_buf, EEH_PCI_REGS_LOG_LEN); |
265 | 268 | ||
266 | rtas_slot_error_detail(pdn, severity, pci_regs_buf, loglen); | 269 | rtas_slot_error_detail(pdn, severity, pci_regs_buf, loglen); |
@@ -895,13 +898,20 @@ rtas_configure_bridge(struct pci_dn *pdn) | |||
895 | { | 898 | { |
896 | int config_addr; | 899 | int config_addr; |
897 | int rc; | 900 | int rc; |
901 | int token; | ||
898 | 902 | ||
899 | /* Use PE configuration address, if present */ | 903 | /* Use PE configuration address, if present */ |
900 | config_addr = pdn->eeh_config_addr; | 904 | config_addr = pdn->eeh_config_addr; |
901 | if (pdn->eeh_pe_config_addr) | 905 | if (pdn->eeh_pe_config_addr) |
902 | config_addr = pdn->eeh_pe_config_addr; | 906 | config_addr = pdn->eeh_pe_config_addr; |
903 | 907 | ||
904 | rc = rtas_call(ibm_configure_bridge,3,1, NULL, | 908 | /* Use new configure-pe function, if supported */ |
909 | if (ibm_configure_pe != RTAS_UNKNOWN_SERVICE) | ||
910 | token = ibm_configure_pe; | ||
911 | else | ||
912 | token = ibm_configure_bridge; | ||
913 | |||
914 | rc = rtas_call(token, 3, 1, NULL, | ||
905 | config_addr, | 915 | config_addr, |
906 | BUID_HI(pdn->phb->buid), | 916 | BUID_HI(pdn->phb->buid), |
907 | BUID_LO(pdn->phb->buid)); | 917 | BUID_LO(pdn->phb->buid)); |
@@ -1077,6 +1087,7 @@ void __init eeh_init(void) | |||
1077 | ibm_get_config_addr_info = rtas_token("ibm,get-config-addr-info"); | 1087 | ibm_get_config_addr_info = rtas_token("ibm,get-config-addr-info"); |
1078 | ibm_get_config_addr_info2 = rtas_token("ibm,get-config-addr-info2"); | 1088 | ibm_get_config_addr_info2 = rtas_token("ibm,get-config-addr-info2"); |
1079 | ibm_configure_bridge = rtas_token ("ibm,configure-bridge"); | 1089 | ibm_configure_bridge = rtas_token ("ibm,configure-bridge"); |
1090 | ibm_configure_pe = rtas_token("ibm,configure-pe"); | ||
1080 | 1091 | ||
1081 | if (ibm_set_eeh_option == RTAS_UNKNOWN_SERVICE) | 1092 | if (ibm_set_eeh_option == RTAS_UNKNOWN_SERVICE) |
1082 | return; | 1093 | return; |