Commit bd3178be authored by Zeng Heng's avatar Zeng Heng
Browse files

resctrl: fix undefined reference to lockdep_is_cpus_held()

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8T2RT



--------------------------------

lockdep_is_cpus_held() will only be compiled by the kernel when
CONFIG_HOTPLUG_CPU is defined. Otherwise, kernel test robot would report
the following compile error:

ld: vmlinux.o: in function `resctrl_get_domain_from_cpu':
include/linux/resctrl.h:291: undefined reference to `lockdep_is_cpus_held'

Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401252038.VOiTn1TA-lkp@intel.com/


Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent 091bfd85
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -300,7 +300,7 @@ resctrl_get_domain_from_cpu(int cpu, struct rdt_resource *r)
	 * about locks this thread holds will lead to false positives. Check
	 * someone is holding the CPUs lock.
	 */
	if (IS_ENABLED(CONFIG_LOCKDEP))
	if (IS_ENABLED(CONFIG_HOTPLUG_CPU) && IS_ENABLED(CONFIG_LOCKDEP))
		lockdep_is_cpus_held();

	list_for_each_entry_rcu(d, &r->domains, list) {