[lkml]   [2022]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH -next] 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: 6abf32f1d9c5 ("cpuidle: Add RISC-V SBI CPU idle driver")
Signed-off-by: Randy Dunlap <>
Reported-by: kernel test robot <>
Cc: Anup Patel <>
Cc: Anup Patel <>
Cc: Anup Patel <>
Cc: Atish Patra <>
Cc: Daniel Lezcano <>
Cc: "Rafael J. Wysocki" <>
Cc: Palmer Dabbelt <>
Cc: Paul Walmsley <>
Cc: Albert Ou <>
drivers/cpuidle/cpuidle-riscv-sbi.c | 1 +
1 file changed, 1 insertion(+)

--- linux-next-20220401.orig/drivers/cpuidle/cpuidle-riscv-sbi.c
+++ linux-next-20220401/drivers/cpuidle/cpuidle-riscv-sbi.c
@@ -22,6 +22,7 @@
#include <linux/pm_runtime.h>
#include <asm/cpuidle.h>
#include <asm/sbi.h>
+#include <asm/smp.h>
#include <asm/suspend.h>

#include "dt_idle_states.h"
 \ /
  Last update: 2022-04-03 05:14    [W:0.049 / U:1.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site