Commit 5331aaca authored by Zeng Heng's avatar Zeng Heng
Browse files

fs/resctrl: Move rdtgroup_setup_default() out of init.text section

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



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

rdtgroup_setup_default() is declared at .init.text section, but will be
called by resctrl_init() located in the .text section, which will lead to
incorrect reference.

Here is the compilation error message reported by linker:
WARNING: modpost: vmlinux: section mismatch in reference:
resctrl_init+0x6c (section: .text) -> rdtgroup_setup_default (section: .init.text)

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


Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent bd3178be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3758,7 +3758,7 @@ static void rdtgroup_destroy_root(void)
	rdtgroup_default.kn = NULL;
}

static void __init rdtgroup_setup_default(void)
static void rdtgroup_setup_default(void)
{
	mutex_lock(&rdtgroup_mutex);