aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2014-09-29 22:39:04 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2014-09-30 03:15:16 -0400
commit4ba5a0fc6441194cf238e1a049f548b5d45760c8 (patch)
treef240274209fa46f55b4fff64761e0383bfbea1b7 /arch/powerpc/platforms/pseries
parent9372dddb189a7a7689b674ad2dd31117a407bfd5 (diff)
powerpc/pseries: Decrease message level on EEH initialization
As Anton suggested, the patch decreases the message level on EEH initialization to avoid unnecessary messages if required. Also, we have unified hint if any of needful RTAS calls is missed, and then we can check /proc/device-tree to figure out the missed RTAS calls. Suggested-by: Anton Blanchard <anton@samba.org> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-rw-r--r--arch/powerpc/platforms/pseries/eeh_pseries.c35
1 files changed, 10 insertions, 25 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
index 4fc5ff96f418..a6c7e19f5eb3 100644
--- a/arch/powerpc/platforms/pseries/eeh_pseries.c
+++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
@@ -88,29 +88,14 @@ static int pseries_eeh_init(void)
88 * and its variant since the old firmware probably support address 88 * and its variant since the old firmware probably support address
89 * of domain/bus/slot/function for EEH RTAS operations. 89 * of domain/bus/slot/function for EEH RTAS operations.
90 */ 90 */
91 if (ibm_set_eeh_option == RTAS_UNKNOWN_SERVICE) { 91 if (ibm_set_eeh_option == RTAS_UNKNOWN_SERVICE ||
92 pr_warn("%s: RTAS service <ibm,set-eeh-option> invalid\n", 92 ibm_set_slot_reset == RTAS_UNKNOWN_SERVICE ||
93 __func__); 93 (ibm_read_slot_reset_state2 == RTAS_UNKNOWN_SERVICE &&
94 return -EINVAL; 94 ibm_read_slot_reset_state == RTAS_UNKNOWN_SERVICE) ||
95 } else if (ibm_set_slot_reset == RTAS_UNKNOWN_SERVICE) { 95 ibm_slot_error_detail == RTAS_UNKNOWN_SERVICE ||
96 pr_warn("%s: RTAS service <ibm,set-slot-reset> invalid\n", 96 (ibm_configure_pe == RTAS_UNKNOWN_SERVICE &&
97 __func__); 97 ibm_configure_bridge == RTAS_UNKNOWN_SERVICE)) {
98 return -EINVAL; 98 pr_info("EEH functionality not supported\n");
99 } else if (ibm_read_slot_reset_state2 == RTAS_UNKNOWN_SERVICE &&
100 ibm_read_slot_reset_state == RTAS_UNKNOWN_SERVICE) {
101 pr_warn("%s: RTAS service <ibm,read-slot-reset-state2> and "
102 "<ibm,read-slot-reset-state> invalid\n",
103 __func__);
104 return -EINVAL;
105 } else if (ibm_slot_error_detail == RTAS_UNKNOWN_SERVICE) {
106 pr_warn("%s: RTAS service <ibm,slot-error-detail> invalid\n",
107 __func__);
108 return -EINVAL;
109 } else if (ibm_configure_pe == RTAS_UNKNOWN_SERVICE &&
110 ibm_configure_bridge == RTAS_UNKNOWN_SERVICE) {
111 pr_warn("%s: RTAS service <ibm,configure-pe> and "
112 "<ibm,configure-bridge> invalid\n",
113 __func__);
114 return -EINVAL; 99 return -EINVAL;
115 } 100 }
116 101
@@ -118,11 +103,11 @@ static int pseries_eeh_init(void)
118 spin_lock_init(&slot_errbuf_lock); 103 spin_lock_init(&slot_errbuf_lock);
119 eeh_error_buf_size = rtas_token("rtas-error-log-max"); 104 eeh_error_buf_size = rtas_token("rtas-error-log-max");
120 if (eeh_error_buf_size == RTAS_UNKNOWN_SERVICE) { 105 if (eeh_error_buf_size == RTAS_UNKNOWN_SERVICE) {
121 pr_warn("%s: unknown EEH error log size\n", 106 pr_info("%s: unknown EEH error log size\n",
122 __func__); 107 __func__);
123 eeh_error_buf_size = 1024; 108 eeh_error_buf_size = 1024;
124 } else if (eeh_error_buf_size > RTAS_ERROR_LOG_MAX) { 109 } else if (eeh_error_buf_size > RTAS_ERROR_LOG_MAX) {
125 pr_warn("%s: EEH error log size %d exceeds the maximal %d\n", 110 pr_info("%s: EEH error log size %d exceeds the maximal %d\n",
126 __func__, eeh_error_buf_size, RTAS_ERROR_LOG_MAX); 111 __func__, eeh_error_buf_size, RTAS_ERROR_LOG_MAX);
127 eeh_error_buf_size = RTAS_ERROR_LOG_MAX; 112 eeh_error_buf_size = RTAS_ERROR_LOG_MAX;
128 } 113 }