Skip to content

Commit 007240d

Browse files
Sebastian Andrzej Siewiormpe
authored andcommitted
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: 76d588d ("powerpc/imc-pmu: Fix use of mutex in IRQs disabled section") Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
1 parent 73b2550 commit 007240d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/perf/imc-pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static int trace_imc_mem_size;
5151
* core and trace-imc
5252
*/
5353
static struct imc_pmu_ref imc_global_refc = {
54-
.lock = __SPIN_LOCK_INITIALIZER(imc_global_refc.lock),
54+
.lock = __SPIN_LOCK_UNLOCKED(imc_global_refc.lock),
5555
.id = 0,
5656
.refc = 0,
5757
};

0 commit comments

Comments
 (0)