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: Nathan Lynch <[email protected]>
---
 arch/powerpc/kernel/rtasd.c | 28 +++-------------------------
 1 file changed, 3 insertions(+), 25 deletions(-)

diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c
index 89b798f8f656..8561dfb33f24 100644
--- a/arch/powerpc/kernel/rtasd.c
+++ b/arch/powerpc/kernel/rtasd.c
@@ -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;
-- 
2.25.4

Reply via email to