Skip to contentSkip to conversation

powerpc: Fix build error in paravirt.h

PATCH Applied Michal Suchanek 2 participants 2 messages Jan 20, 2021 – Feb 3, 2021

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

PATCH 1/1 powerpc: Fix build error in paravirt.h

./arch/powerpc/include/asm/paravirt.h:83:44: error: implicit declaration of function 'smp_processor_id'; did you mean 'raw_smp_processor_id'?

smp_processor_id is defined in linux/smp.h but it is not included.

The build error happens only when the patch is applied to 5.3 kernel but it only works by chance in mainline.

Fixes ca3f969dcb11 ("powerpc/paravirt: Use is_kvm_guest() in vcpu_is_preempted()")
---
 arch/powerpc/include/asm/paravirt.h | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/include/asm/paravirt.h +1 -0
index edc08f04aef7..5d1726bb28e7 100644
@@ -10,6 +10,7 @@
 #endif
 
 #ifdef CONFIG_PPC_SPLPAR
+#include <linux/smp.h>
 #include <asm/kvm_guest.h>
 #include <asm/cputhreads.h>
 
Signature · 1 line
2.26.2
#1 lore raw
Quoted 7 lines · Michal Suchanek

./arch/powerpc/include/asm/paravirt.h:83:44: error: implicit declaration of function 'smp_processor_id'; did you mean 'raw_smp_processor_id'?

smp_processor_id is defined in linux/smp.h but it is not included.

The build error happens only when the patch is applied to 5.3 kernel but it only works by chance in mainline.

Applied to powerpc/next.

[1/1] powerpc: Fix build error in paravirt.h

      https://git.kernel.org/powerpc/c/9899a56f1eca964cd0de21008a9fa1523a571231

cheers