powerpc/pseries/eeh: use correct API for error log size
rtas-error-log-max is not the name of an RTAS function, so rtas_token()
is not the appropriate API for retrieving its value. We already have
rtas_get_error_log_max() which returns a sensible value if the property
is absent for any reason, so use that instead.
Fixes: 8d633291b4
("powerpc/eeh: pseries platform EEH error log retrieval")
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
[mpe: Drop no-longer possible error handling as noticed by ajd]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221118150751.469393-6-nathanl@linux.ibm.com
This commit is contained in:
parent
6c606e57ee
commit
9aafbfa5f5
@ -848,16 +848,7 @@ static int __init eeh_pseries_init(void)
|
||||
}
|
||||
|
||||
/* Initialize error log size */
|
||||
eeh_error_buf_size = rtas_token("rtas-error-log-max");
|
||||
if (eeh_error_buf_size == RTAS_UNKNOWN_SERVICE) {
|
||||
pr_info("%s: unknown EEH error log size\n",
|
||||
__func__);
|
||||
eeh_error_buf_size = 1024;
|
||||
} else if (eeh_error_buf_size > RTAS_ERROR_LOG_MAX) {
|
||||
pr_info("%s: EEH error log size %d exceeds the maximal %d\n",
|
||||
__func__, eeh_error_buf_size, RTAS_ERROR_LOG_MAX);
|
||||
eeh_error_buf_size = RTAS_ERROR_LOG_MAX;
|
||||
}
|
||||
eeh_error_buf_size = rtas_get_error_log_max();
|
||||
|
||||
/* Set EEH probe mode */
|
||||
eeh_add_flag(EEH_PROBE_MODE_DEVTREE | EEH_ENABLE_IO_FOR_LOG);
|
||||
|
Loading…
Reference in New Issue
Block a user