Re: [PATCH] powerpc/imc-pmu: Use the correct spinlock initializer.

2023-10-27 Thread Michael Ellerman
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


[PATCH] powerpc/imc-pmu: Use the correct spinlock initializer.

2023-03-09 Thread Sebastian Andrzej Siewior
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 
---
 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