Skip to contentSkip to conversation

powerpc/shared: Fix build problem

PATCH In review Guenter Roeck 2 participants 2 messages Dec 25, 2019 – Dec 26, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/shared: Fix build problem

Since commit 656c21d6af5d ("powerpc/shared: Use static key to detect shared processor") and 14c73bd344da ("powerpc/vcpu: Assume dedicated processors as non-preempt"), powerpc test builds may fail with the following build errors.

./arch/powerpc/include/asm/spinlock.h:39:1: error:
type defaults to ‘int’ in declaration of ‘DECLARE_STATIC_KEY_FALSE’
./arch/powerpc/include/asm/spinlock.h: In function ‘vcpu_is_preempted’:
./arch/powerpc/include/asm/spinlock.h:44:7: error:
implicit declaration of function ‘static_branch_unlikely’
./arch/powerpc/include/asm/spinlock.h:44:31: error:
‘shared_processor’ undeclared

The offending commits use static_branch_unlikely and shared_processor without adding the include file declaring it.

Cc Srikar Dronamraju <[email protected]>
Cc Phil Auld <[email protected]>
Cc Waiman Long <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Juri Lelli <[email protected]>
Fixes 656c21d6af5d ("powerpc/shared: Use static key to detect shared processor")
Fixes 14c73bd344da ("powerpc/vcpu: Assume dedicated processors as non-preempt")
---
 arch/powerpc/include/asm/spinlock.h | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/include/asm/spinlock.h +1 -0
index 1b55fc08f853..5ddd48616b1c 100644
@@ -16,6 +16,7 @@
  * (the type definitions are in asm/spinlock_types.h)
  */
 #include <linux/irqflags.h>
+#include <linux/jump_label.h>
 #ifdef CONFIG_PPC64
 #include <asm/paca.h>
 #include <asm/hvcall.h>
Signature · 1 line
2.17.1
#1 lore raw
Quoted 13 lines · Guenter Roeck

Since commit 656c21d6af5d ("powerpc/shared: Use static key to detect shared processor") and 14c73bd344da ("powerpc/vcpu: Assume dedicated processors as non-preempt"), powerpc test builds may fail with the following build errors.

./arch/powerpc/include/asm/spinlock.h:39:1: error:
type defaults to ???int??? in declaration of ???DECLARE_STATIC_KEY_FALSE???
./arch/powerpc/include/asm/spinlock.h: In function ???vcpu_is_preempted???:
./arch/powerpc/include/asm/spinlock.h:44:7: error:
implicit declaration of function ???static_branch_unlikely???
./arch/powerpc/include/asm/spinlock.h:44:31: error:
???shared_processor??? undeclared

Quoted 2 lines

The offending commits use static_branch_unlikely and shared_processor without adding the include file declaring it.

Thanks for reporting but same fix was already posted
http://lkml.kernel.org/r/[email protected]

Signature · 2 lines
Thanks and Regards
Srikar Dronamraju