Skip to content

Commit f81f786

Browse files
rddunlappalmer-dabbelt
authored andcommitted
cpuidle: riscv: support non-SMP config
Add <asm/smp.h> for cpuid_to_hartid_map etc. This is needed for both SMP and non-SMP builds, but not having it causes a build error for non-SMP: drivers/cpuidle/cpuidle-riscv-sbi.c: In function 'sbi_cpuidle_init_cpu': drivers/cpuidle/cpuidle-riscv-sbi.c:350:26: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror=implicit-function-declaration] Fixes: 6abf32f ("cpuidle: Add RISC-V SBI CPU idle driver") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 3123109 commit f81f786

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/cpuidle/cpuidle-riscv-sbi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/pm_runtime.h>
2323
#include <asm/cpuidle.h>
2424
#include <asm/sbi.h>
25+
#include <asm/smp.h>
2526
#include <asm/suspend.h>
2627

2728
#include "dt_idle_states.h"

0 commit comments

Comments
 (0)