summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2023-03-09 14:48:31 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2023-10-20 08:11:59 +0200
commit007240d59c11f87ac4f6cfc6a1d116630b6b634c (patch)
treee9f488fbcd0455da1e419cf7a4c807d602b68cf6
parentpowerpc/vas: Limit open window failure messages in log bufffer (diff)
downloadlinux-007240d59c11f87ac4f6cfc6a1d116630b6b634c.tar.xz
linux-007240d59c11f87ac4f6cfc6a1d116630b6b634c.zip
powerpc/imc-pmu: Use the correct spinlock initializer.
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 <bigeasy@linutronix.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230309134831.Nz12nqsU@linutronix.de
-rw-r--r--arch/powerpc/perf/imc-pmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c
index 2016aee27037..5d12ca386c1f 100644
--- a/arch/powerpc/perf/imc-pmu.c
+++ b/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,
};