From fd3de4b179d22119656b32aeb01e23d409deb3de Mon Sep 17 00:00:00 2001
From: Sachin Sant <sachinp@linux.vnet.ibm.com>
Date: Wed, 5 Jan 2022 19:47:48 +0530
Subject: [PATCH] powerpc/xmon: Dump XIVE information for online-only
processors.
References: bsc#1193482 ltc#195600
Patch-mainline: v5.17-rc1
Git-commit: f1aa0e47c29268776205698f2453dc07fab49855
dxa command in XMON debugger iterates through all possible processors.
As a result, empty lines are printed even for processors which are not
online.
CPU 47:pp=00 CPPR=ff IPI=0x0040002f PQ=-- EQ idx=699 T=0 00000000 00000000
CPU 48:
CPU 49:
Restrict XIVE information(dxa) to be displayed for online processors only.
Signed-off-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
Acked-by: Michal Suchanek <msuchanek@suse.de>
---
arch/powerpc/xmon/xmon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 8b28ff9d98d1..6617824bc05d 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2809,12 +2809,12 @@ static void dump_all_xives(void)
{
int cpu;
- if (num_possible_cpus() == 0) {
+ if (num_online_cpus() == 0) {
printf("No possible cpus, use 'dx #' to dump individual cpus\n");
return;
}
- for_each_possible_cpu(cpu)
+ for_each_online_cpu(cpu)
dump_one_xive(cpu);
}
--
2.31.1