Commit 91713ac3 authored by Nathan Lynch's avatar Nathan Lynch Committed by Michael Ellerman

powerpc/rtasd: simplify handle_rtas_event(), emit message on events

prrn_is_enabled() always returns false/0, so handle_rtas_event() can
be simplified and some dead code can be removed. Use machine_is()
instead of #ifdef to run this code only on pseries, and add an
informational ratelimited message that we are ignoring the
events. PRRN events are relatively rare in normal operation and
usually arise from operator-initiated actions such as a DPO (Dynamic
Platform Optimizer) run.

Eventually we do want to consume these events and update the device
tree, but that needs more care to be safe vs LPM and DLPAR.
Signed-off-by: default avatarNathan Lynch <nathanl@linux.ibm.com>
Reviewed-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200612051238.1007764-13-nathanl@linux.ibm.com
parent 1835303e
......@@ -273,37 +273,15 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal)
}
}
#ifdef CONFIG_PPC_PSERIES
static void handle_prrn_event(s32 scope)
{
/*
* For PRRN, we must pass the negative of the scope value in
* the RTAS event.
*/
pseries_devicetree_update(-scope);
numa_update_cpu_topology(false);
}
static void handle_rtas_event(const struct rtas_error_log *log)
{
if (rtas_error_type(log) != RTAS_TYPE_PRRN || !prrn_is_enabled())
if (!machine_is(pseries))
return;
/* For PRRN Events the extended log length is used to denote
* the scope for calling rtas update-nodes.
*/
handle_prrn_event(rtas_error_extended_log_length(log));
if (rtas_error_type(log) == RTAS_TYPE_PRRN)
pr_info_ratelimited("Platform resource reassignment ignored.\n");
}
#else
static void handle_rtas_event(const struct rtas_error_log *log)
{
return;
}
#endif
static int rtas_log_open(struct inode * inode, struct file * file)
{
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment