When building ppc64_defconfig:
arch/powerpc/platforms/powermac/smp.c:664:26: warning: unused variable 'core99_l2_cache' [-Wunused-variable]
volatile static long int core99_l2_cache;
^
arch/powerpc/platforms/powermac/smp.c:665:26: warning: unused variable 'core99_l3_cache' [-Wunused-variable]
volatile static long int core99_l3_cache;
^
2 warnings generated.
Unless I am missing something, I think this is the fix...
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index f95fbdee6efe..33ae1b736255 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -661,12 +661,12 @@ static void smp_core99_gpio_tb_freeze(int freeze)
#endif /* !CONFIG_PPC64 */
/* L2 and L3 cache settings to pass from CPU0 to CPU1 on G4 cpus */
-volatile static long int core99_l2_cache;
-volatile static long int core99_l3_cache;
-
static void core99_init_caches(int cpu)
{
#ifndef CONFIG_PPC64
+ volatile long int core99_l2_cache;
+ volatile long int core99_l3_cache;
+
if (!cpu_has_feature(CPU_FTR_L2CR))
return;
I think these need to be preserved across function calls, thus cannot be local. At a glance, this should happen:
core99_init_caches(0); // sets the variables from cpu 0
core99_init_caches(N); // uses the variables for cpu N
This is obvious from the implementations of smp_core99_probe and smp_core99_setup_cpu in that same file.
Sent patch. https://lore.kernel.org/lkml/[email protected]/
time to reping that thread
Merged into mainline: https://git.kernel.org/linus/9451c79bc39e610882bdd12370f01af5004a3c4f
Most helpful comment
Sent patch. https://lore.kernel.org/lkml/[email protected]/