[PATCH] powerpc/shared: Fix build problem
From: Guenter Roeck
Date: Wed Dec 25 2019 - 11:06:35 EST
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 <srikar@xxxxxxxxxxxxxxxxxx>
Cc: Phil Auld <pauld@xxxxxxxxxx>
Cc: Waiman Long <longman@xxxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: Juri Lelli <juri.lelli@xxxxxxxxxx>
Fixes: 656c21d6af5d ("powerpc/shared: Use static key to detect shared processor")
Fixes: 14c73bd344da ("powerpc/vcpu: Assume dedicated processors as non-preempt")
Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
---
arch/powerpc/include/asm/spinlock.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/include/asm/spinlock.h b/arch/powerpc/include/asm/spinlock.h
index 1b55fc08f853..5ddd48616b1c 100644
--- a/arch/powerpc/include/asm/spinlock.h
+++ b/arch/powerpc/include/asm/spinlock.h
@@ -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>
--
2.17.1