RE: [PATCH v3 1/2] cacheinfo: Add function to get cacheinfo for a given (cpu, cachelevel)

From: Luck, Tony
Date: Thu Jun 06 2024 - 15:02:51 EST


+ lockdep_assert_cpus_held();
+

lkp says this breaks riscv-allnoconfig and riscv-defconfig

In file included from arch/riscv/include/asm/cacheinfo.h:9:
>> include/linux/cacheinfo.h:126:2: error: call to undeclared function 'lockdep_assert_cpus_held'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
126 | lockdep_assert_cpus_held();

but I'm not really sure why. I added "#include <linux/cpu.h>" to <linux/cpuinfo,h> to deal with similar warning when building for x86.

-Tony