* [ardb:x86-remove-absolute-percpu 3/5] arch/x86/kernel/cpu/common.c:762:22: error: call to undeclared function 'per_cpu_offset'; ISO C99 and later do not support implicit function declarations
@ 2024-03-22 4:41 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-22 4:41 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: llvm, oe-kbuild-all
tree: git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git x86-remove-absolute-percpu
head: 811d6eeae9abffb646afa9c418d4658e6d91cdd6
commit: 82b7a620962b18edb7cb6eaca34fd0bd06073611 [3/5] x86/percpu: Get rid of absolute per-CPU variable placement
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20240322/202403221215.FeIdb2PC-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240322/202403221215.FeIdb2PC-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403221215.FeIdb2PC-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/x86/kernel/cpu/common.c:762:22: error: call to undeclared function 'per_cpu_offset'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
762 | wrmsrl(MSR_GS_BASE, per_cpu_offset(cpu));
| ^
1 error generated.
vim +/per_cpu_offset +762 arch/x86/kernel/cpu/common.c
733
734 /**
735 * switch_gdt_and_percpu_base - Switch to direct GDT and runtime per CPU base
736 * @cpu: The CPU number for which this is invoked
737 *
738 * Invoked during early boot to switch from early GDT and early per CPU to
739 * the direct GDT and the runtime per CPU area. On 32-bit the percpu base
740 * switch is implicit by loading the direct GDT. On 64bit this requires
741 * to update GSBASE.
742 */
743 void __init switch_gdt_and_percpu_base(int cpu)
744 {
745 load_direct_gdt(cpu);
746
747 #ifdef CONFIG_X86_64
748 /*
749 * No need to load %gs. It is already correct.
750 *
751 * Writing %gs on 64bit would zero GSBASE which would make any per
752 * CPU operation up to the point of the wrmsrl() fault.
753 *
754 * Set GSBASE to the new offset. Until the wrmsrl() happens the
755 * early mapping is still valid. That means the GSBASE update will
756 * lose any prior per CPU data which was not copied over in
757 * setup_per_cpu_areas().
758 *
759 * This works even with stackprotector enabled because the
760 * per CPU stack canary is 0 in both per CPU areas.
761 */
> 762 wrmsrl(MSR_GS_BASE, per_cpu_offset(cpu));
763 #else
764 /*
765 * %fs is already set to __KERNEL_PERCPU, but after switching GDT
766 * it is required to load FS again so that the 'hidden' part is
767 * updated from the new GDT. Up to this point the early per CPU
768 * translation is active. Any content of the early per CPU data
769 * which was not copied over in setup_per_cpu_areas() is lost.
770 */
771 loadsegment(fs, __KERNEL_PERCPU);
772 #endif
773 }
774
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-22 4:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-22 4:41 [ardb:x86-remove-absolute-percpu 3/5] arch/x86/kernel/cpu/common.c:762:22: error: call to undeclared function 'per_cpu_offset'; ISO C99 and later do not support implicit function declarations kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox