[PATCH]powerpc/xmon: Dump XIVE information for online-only processors.

Cédric Le Goater clg at kaod.org
Thu Jan 6 01:39:30 AEDT 2022


On 1/5/22 15:17, Sachin Sant wrote:
> 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 at linux.vnet.ibm.com>

Looks good to me. We should do the same for :

   /sys/kernel/debug/powerpc/xive/ipis

Reviewed-by: Cédric Le Goater <clg at kaod.org>

Thanks,

C.


> ---
> diff -Naurp a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
> --- a/arch/powerpc/xmon/xmon.c	2022-01-05 08:52:59.480118166 -0500
> +++ b/arch/powerpc/xmon/xmon.c	2022-01-05 08:56:18.469589555 -0500
> @@ -2817,12 +2817,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);
>   }
>   
> 



More information about the Linuxppc-dev mailing list