Commit f81f7861 authored by Randy Dunlap's avatar Randy Dunlap Committed by Palmer Dabbelt

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: 6abf32f1 ("cpuidle: Add RISC-V SBI CPU idle driver")
Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 31231092
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <asm/cpuidle.h> #include <asm/cpuidle.h>
#include <asm/sbi.h> #include <asm/sbi.h>
#include <asm/smp.h>
#include <asm/suspend.h> #include <asm/suspend.h>
#include "dt_idle_states.h" #include "dt_idle_states.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment