* [PATCH] powerpc/rtas: Use arch_spin_lock instead of arch_spin_lock_flags
@ 2017-10-18 11:51 Will Deacon
2017-10-18 13:19 ` [tip:locking/core] locking/arch, powerpc/rtas: Use arch_spin_lock() instead of arch_spin_lock_flags() tip-bot for Will Deacon
0 siblings, 1 reply; 2+ messages in thread
From: Will Deacon @ 2017-10-18 11:51 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel, Will Deacon, Peter Zijlstra
arch_spin_lock_flags is an internal part of the spinlock implementation
and is no longer available when SMP=n and DEBUG_SPINLOCK=y, so the PPC
RTAS code fails to compile in this configuration:
arch/powerpc/kernel/rtas.c: In function 'lock_rtas':
>> arch/powerpc/kernel/rtas.c:81:2: error: implicit declaration of function 'arch_spin_lock_flags' [-Werror=implicit-function-declaration]
arch_spin_lock_flags(&rtas.lock, flags);
^~~~~~~~~~~~~~~~~~~~
Since there's no good reason to use arch_spin_lock_flags here (the code
in question already calls local_irq_save(flags)), switch it over to
arch_spin_lock and get things building again.
Cc: Peter Zijlstra <peterz@infradead.org>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
This patch fixes build breakage in -next via the -tip tree.
arch/powerpc/kernel/rtas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 1643e9e53655..3f1c4fcbe0aa 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -78,7 +78,7 @@ static unsigned long lock_rtas(void)
local_irq_save(flags);
preempt_disable();
- arch_spin_lock_flags(&rtas.lock, flags);
+ arch_spin_lock(&rtas.lock);
return flags;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* [tip:locking/core] locking/arch, powerpc/rtas: Use arch_spin_lock() instead of arch_spin_lock_flags()
2017-10-18 11:51 [PATCH] powerpc/rtas: Use arch_spin_lock instead of arch_spin_lock_flags Will Deacon
@ 2017-10-18 13:19 ` tip-bot for Will Deacon
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Will Deacon @ 2017-10-18 13:19 UTC (permalink / raw)
To: linux-tip-commits
Cc: hpa, mingo, will.deacon, fengguang.wu, tglx, peterz, torvalds,
linux-kernel
Commit-ID: 58788a9b6060890e481c8111fac43d065560ebcb
Gitweb: https://git.kernel.org/tip/58788a9b6060890e481c8111fac43d065560ebcb
Author: Will Deacon <will.deacon@arm.com>
AuthorDate: Wed, 18 Oct 2017 12:51:09 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 18 Oct 2017 15:15:07 +0200
locking/arch, powerpc/rtas: Use arch_spin_lock() instead of arch_spin_lock_flags()
arch_spin_lock_flags() is an internal part of the spinlock implementation
and is no longer available when SMP=n and DEBUG_SPINLOCK=y, so the PPC
RTAS code fails to compile in this configuration:
arch/powerpc/kernel/rtas.c: In function 'lock_rtas':
>> arch/powerpc/kernel/rtas.c:81:2: error: implicit declaration of function 'arch_spin_lock_flags' [-Werror=implicit-function-declaration]
arch_spin_lock_flags(&rtas.lock, flags);
^~~~~~~~~~~~~~~~~~~~
Since there's no good reason to use arch_spin_lock_flags() here (the code
in question already calls local_irq_save(flags)), switch it over to
arch_spin_lock and get things building again.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1508327469-20231-1-git-send-email-will.deacon@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/powerpc/kernel/rtas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 1643e9e..3f1c4fc 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -78,7 +78,7 @@ static unsigned long lock_rtas(void)
local_irq_save(flags);
preempt_disable();
- arch_spin_lock_flags(&rtas.lock, flags);
+ arch_spin_lock(&rtas.lock);
return flags;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-18 13:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18 11:51 [PATCH] powerpc/rtas: Use arch_spin_lock instead of arch_spin_lock_flags Will Deacon
2017-10-18 13:19 ` [tip:locking/core] locking/arch, powerpc/rtas: Use arch_spin_lock() instead of arch_spin_lock_flags() tip-bot for Will Deacon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.