Skip to contentSkip to conversation

powerpc/xive: Export XIVE IPI information for online-only processors.

PATCH Applied Sachin Sant 3 participants 3 messages Jan 6, 2022 – Feb 15, 2022 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/xive: Export XIVE IPI information for online-only processors.

Cédric pointed out that XIVE IPI information exported via sysfs (debug/powerpc/xive) display empty lines for processors which are not online.

Switch to using for_each_online_cpu() so that information is displayed for online-only processors.

---

arch/powerpc/sysdev/xive/common.c +1 -1
diff -Naurp a/arch/p werpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
@@ -1791,7 +1791,7 @@ static int xive_ipi_debug_show(struct se
 	if (xive_ops->debug_show)
 		xive_ops->debug_show(m, private);
 
-	for_each_possible_cpu(cpu)
+	for_each_online_cpu(cpu)
 		xive_debug_show_ipi(m, cpu);
 	return 0;
 }
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Sachin Sant

Cédric pointed out that XIVE IPI information exported via sysfs (debug/powerpc/xive) display empty lines for processors which are not online.

Switch to using for_each_online_cpu() so that information is displayed for online-only processors.

Thanks,

C.

Quoted 14 lines

---
diff -Naurp a/arch/p werpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c

arch/powerpc/sysdev/xive/common.c +1 -1
@@ -1791,7 +1791,7 @@ static int xive_ipi_debug_show(struct se
  	if (xive_ops->debug_show)
  		xive_ops->debug_show(m, private);
 
-	for_each_possible_cpu(cpu)
+	for_each_online_cpu(cpu)
  		xive_debug_show_ipi(m, cpu);
  	return 0;
  }
#2 lore raw
In reply to Sachin Sant
Quoted 8 lines · Sachin Sant

Cédric pointed out that XIVE IPI information exported via sysfs (debug/powerpc/xive) display empty lines for processors which are not online.

Switch to using for_each_online_cpu() so that information is displayed for online-only processors.

[...]

Applied to powerpc/next.

[1/1] powerpc/xive: Export XIVE IPI information for online-only processors.

      https://git.kernel.org/powerpc/c/279d1a72c0f8021520f68ddb0a1346ff9ba1ea8c

cheers