From: kernel test robot <[email protected]>
To: Thomas Gleixner <[email protected]>
Cc: [email protected], [email protected],
Ammar Faizi <[email protected]>,
GNU/Weeb Mailing List <[email protected]>,
[email protected]
Subject: [ammarfaizi2-block:tglx/devel/depthtracking 2/45] arch/x86/kernel/cpu/common.c:760:23: error: call to undeclared function 'cpu_kernelmode_gs_base'; ISO C99 and later do not support implicit function declarations
Date: Thu, 21 Jul 2022 18:11:13 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
tree: https://github.com/ammarfaizi2/linux-block tglx/devel/depthtracking
head: 714d29e3e7e3faac27142424ae2533163ddd3a46
commit: 3adc8d7057cc2f5e8dbbaa4b7d8b68f94dadb6ad [2/45] x86/cpu: Remove segment load from switch_to_new_gdt()
config: i386-randconfig-a003-20220718 (https://download.01.org/0day-ci/archive/20220721/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project dd5635541cd7bbd62cd59b6694dfb759b6e9a0d8)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/ammarfaizi2/linux-block/commit/3adc8d7057cc2f5e8dbbaa4b7d8b68f94dadb6ad
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block tglx/devel/depthtracking
git checkout 3adc8d7057cc2f5e8dbbaa4b7d8b68f94dadb6ad
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
All errors (new ones prefixed by >>):
>> arch/x86/kernel/cpu/common.c:760:23: error: call to undeclared function 'cpu_kernelmode_gs_base'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
wrmsrl(MSR_GS_BASE, cpu_kernelmode_gs_base(cpu));
^
1 error generated.
vim +/cpu_kernelmode_gs_base +760 arch/x86/kernel/cpu/common.c
730
731 /**
732 * switch_to_new_gdt - Switch form early GDT to the direct one
733 * @cpu: The CPU number for which this is invoked
734 *
735 * Invoked during early boot to switch from early GDT and early per CPU
736 * (%fs on 32bit, GS_BASE on 64bit) to the direct GDT and the runtime per
737 * CPU area.
738 */
739 void switch_to_new_gdt(int cpu)
740 {
741 load_direct_gdt(cpu);
742
743 /*
744 * No need to load the %gs (%fs for 32bit) segment. It is already
745 * correct, %gs is 0 on 64bit and %fs is __KERNEL_PERCPU on 32 bit.
746 *
747 * Writing %gs on 64bit would zero GSBASE which would make any per
748 * CPU operation up to the point of the wrmsrl() fault.
749 *
750 * 64bit requires to point GSBASE to the new offset. Until the
751 * wrmsrl() happens the early mapping is still valid. That means
752 * the GSBASE update will lose any prior per CPU data which was
753 * not copied over in setup_per_cpu_areas().
754 *
755 * For secondary CPUs this is not a problem because they start
756 * already with the direct GDT and the real GSBASE. This invocation
757 * is pointless and will be removed in a subsequent step.
758 */
759 if (IS_ENABLED(CONFIG_X86_64))
> 760 wrmsrl(MSR_GS_BASE, cpu_kernelmode_gs_base(cpu));
761 }
762
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-07-21 10:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox