Subject: [PATCH] powerpc/imc-pmu: Use the correct spinlock initializer.
From: Sebastian Andrzej Siewior <[email-masked]>
Date: Thu, 9 Mar 2023 09:09:01 +0100

The macro __SPIN_LOCK_INITIALIZER() is implementation specific. Users
that desire to initialize a spinlock in a struct must use
__SPIN_LOCK_UNLOCKED().

Use __SPIN_LOCK_UNLOCKED() for the spinlock_t in imc_global_refc.

Fixes: 76d588dddc459 ("powerpc/imc-pmu: Fix use of mutex in IRQs disabled section")
Signed-off-by: Sebastian Andrzej Siewior <[email-masked]>
Link: https://lore.kernel.org/[email-masked]
---
 arch/powerpc/perf/imc-pmu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-6.3.0-rt11/arch/powerpc/perf/imc-pmu.c
===================================================================
--- linux-6.3.0-rt11.orig/arch/powerpc/perf/imc-pmu.c
+++ linux-6.3.0-rt11/arch/powerpc/perf/imc-pmu.c
@@ -51,7 +51,7 @@ static int trace_imc_mem_size;
  * core and trace-imc
  */
 static struct imc_pmu_ref imc_global_refc = {
-	.lock = __SPIN_LOCK_INITIALIZER(imc_global_refc.lock),
+	.lock = __SPIN_LOCK_UNLOCKED(imc_global_refc.lock),
 	.id = 0,
 	.refc = 0,
 };