All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]powerpc/xmon: Dump XIVE information for online-only processors.
@ 2022-01-05 14:17 Sachin Sant
  2022-01-05 14:39 ` Cédric Le Goater
  2022-01-10  1:51 ` Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Sachin Sant @ 2022-01-05 14:17 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Sachin Sant, clg

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>
---
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);
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]powerpc/xmon: Dump XIVE information for online-only processors.
  2022-01-05 14:17 [PATCH]powerpc/xmon: Dump XIVE information for online-only processors Sachin Sant
@ 2022-01-05 14:39 ` Cédric Le Goater
  2022-01-06  5:29   ` Sachin Sant
  2022-01-10  1:51 ` Michael Ellerman
  1 sibling, 1 reply; 4+ messages in thread
From: Cédric Le Goater @ 2022-01-05 14:39 UTC (permalink / raw)
  To: Sachin Sant, linuxppc-dev

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@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@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);
>   }
>   
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]powerpc/xmon: Dump XIVE information for online-only processors.
  2022-01-05 14:39 ` Cédric Le Goater
@ 2022-01-06  5:29   ` Sachin Sant
  0 siblings, 0 replies; 4+ messages in thread
From: Sachin Sant @ 2022-01-06  5:29 UTC (permalink / raw)
  To: Cédric Le Goater; +Cc: linuxppc-dev


> On 05-Jan-2022, at 8:09 PM, Cédric Le Goater <clg@kaod.org> wrote:
> 
> 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@linux.vnet.ibm.com>
> 
> Looks good to me. We should do the same for :
> 
>  /sys/kernel/debug/powerpc/xive/ipis

Thanks for the pointer. Will send a separate patch for this issue.

- Sachin

> 
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
> 
> Thanks,
> 
> C.
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]powerpc/xmon: Dump XIVE information for online-only processors.
  2022-01-05 14:17 [PATCH]powerpc/xmon: Dump XIVE information for online-only processors Sachin Sant
  2022-01-05 14:39 ` Cédric Le Goater
@ 2022-01-10  1:51 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2022-01-10  1:51 UTC (permalink / raw)
  To: Sachin Sant, linuxppc-dev; +Cc: clg

On Wed, 05 Jan 2022 19:47:48 +0530, 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:
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/xmon: Dump XIVE information for online-only processors.
      https://git.kernel.org/powerpc/c/f1aa0e47c29268776205698f2453dc07fab49855

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-10  1:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 14:17 [PATCH]powerpc/xmon: Dump XIVE information for online-only processors Sachin Sant
2022-01-05 14:39 ` Cédric Le Goater
2022-01-06  5:29   ` Sachin Sant
2022-01-10  1:51 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.