linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/imc-pmu: Use the correct spinlock initializer.
@ 2023-03-09 13:48 Sebastian Andrzej Siewior
  2023-10-27  9:59 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2023-03-09 13:48 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Peter Zijlstra, Nicholas Piggin, Kajol Jain, Thomas Gleixner

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>
---
 arch/powerpc/perf/imc-pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c
index 9d229ef7f86ef..ada817c49b722 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,
 };
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc/imc-pmu: Use the correct spinlock initializer.
  2023-03-09 13:48 [PATCH] powerpc/imc-pmu: Use the correct spinlock initializer Sebastian Andrzej Siewior
@ 2023-10-27  9:59 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2023-10-27  9:59 UTC (permalink / raw)
  To: linuxppc-dev, Sebastian Andrzej Siewior
  Cc: Peter Zijlstra, Kajol Jain, Thomas Gleixner, Nicholas Piggin

On Thu, 09 Mar 2023 14:48:31 +0100, Sebastian Andrzej Siewior wrote:
> 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.
> 
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/imc-pmu: Use the correct spinlock initializer.
      https://git.kernel.org/powerpc/c/007240d59c11f87ac4f6cfc6a1d116630b6b634c

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-27 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-09 13:48 [PATCH] powerpc/imc-pmu: Use the correct spinlock initializer Sebastian Andrzej Siewior
2023-10-27  9:59 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).