[PATCH] arm64: export this_cpu_has_cap

Jackie Liu liu.yun at linux.dev
Wed Nov 10 19:21:38 PST 2021


From: Jackie Liu <liuyun01 at kylinos.cn>

After commit 8a1065127d95 ("coresight: trbe: Add infrastructure for Errata handling"),
driver coresight use this_cpu_has_cap for check feature, but if we compile it
as a module, it will cause a compilation error.

[...]
ERROR: modpost: "this_cpu_has_cap" [drivers/hwtracing/coresight/coresight-trbe.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:134: modules-only.symvers] Error 1
make[1]: *** Deleting file 'modules-only.symvers'
make: *** [Makefile:1765: modules] Error 2
make: *** Waiting for unfinished jobs....
[...]

Fixes: 8a1065127d95 ("coresight: trbe: Add infrastructure for Errata handling")
Reported-by: kernelbot <kernel-bot at kylinos.cn>
Signed-off-by: Jackie Liu <liuyun01 at kylinos.cn>
---
 arch/arm64/kernel/cpufeature.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index ecbdff795f5e..646662407a07 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -2864,6 +2864,7 @@ bool this_cpu_has_cap(unsigned int n)
 
 	return false;
 }
+EXPORT_SYMBOL_GPL(this_cpu_has_cap);
 
 /*
  * This helper function is used in a narrow window when,
-- 
2.25.1




More information about the linux-arm-kernel mailing list