[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202207240421.4mJ1IiTh-lkp@intel.com>
Date: Sun, 24 Jul 2022 04:59:13 +0800
From: kernel test robot <lkp@...el.com>
To: James Morse <james.morse@....com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>
Subject: arch/arm64/kernel/proton-pack.c:557:13: warning: no previous
prototype for 'smccc_patch_fw_mitigation_conduit'
Hi James,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 515f71412bb73ebd7f41f90e1684fc80b8730789
commit: 1b33d4860deaecf1d8eec3061b7e7ed7ab0bae8d arm64: spectre: Rename spectre_v4_patch_fw_mitigation_conduit
date: 5 months ago
config: arm64-alldefconfig (https://download.01.org/0day-ci/archive/20220724/202207240421.4mJ1IiTh-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1b33d4860deaecf1d8eec3061b7e7ed7ab0bae8d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1b33d4860deaecf1d8eec3061b7e7ed7ab0bae8d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
Note: functions only called from assembly code should be annotated with the asmlinkage attribute
All warnings (new ones prefixed by >>):
arch/arm64/kernel/proton-pack.c:537:13: warning: no previous prototype for 'spectre_v4_patch_fw_mitigation_enable' [-Wmissing-prototypes]
537 | void __init spectre_v4_patch_fw_mitigation_enable(struct alt_instr *alt,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm64/kernel/proton-pack.c:557:13: warning: no previous prototype for 'smccc_patch_fw_mitigation_conduit' [-Wmissing-prototypes]
557 | void __init smccc_patch_fw_mitigation_conduit(struct alt_instr *alt,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/smccc_patch_fw_mitigation_conduit +557 arch/arm64/kernel/proton-pack.c
532
533 /*
534 * Patch a branch over the Spectre-v4 mitigation code with a NOP so that
535 * we fallthrough and check whether firmware needs to be called on this CPU.
536 */
> 537 void __init spectre_v4_patch_fw_mitigation_enable(struct alt_instr *alt,
538 __le32 *origptr,
539 __le32 *updptr, int nr_inst)
540 {
541 BUG_ON(nr_inst != 1); /* Branch -> NOP */
542
543 if (spectre_v4_mitigations_off())
544 return;
545
546 if (cpus_have_final_cap(ARM64_SSBS))
547 return;
548
549 if (spectre_v4_mitigations_dynamic())
550 *updptr = cpu_to_le32(aarch64_insn_gen_nop());
551 }
552
553 /*
554 * Patch a NOP in the Spectre-v4 mitigation code with an SMC/HVC instruction
555 * to call into firmware to adjust the mitigation state.
556 */
> 557 void __init smccc_patch_fw_mitigation_conduit(struct alt_instr *alt,
558 __le32 *origptr,
559 __le32 *updptr, int nr_inst)
560 {
561 u32 insn;
562
563 BUG_ON(nr_inst != 1); /* NOP -> HVC/SMC */
564
565 switch (arm_smccc_1_1_get_conduit()) {
566 case SMCCC_CONDUIT_HVC:
567 insn = aarch64_insn_get_hvc_value();
568 break;
569 case SMCCC_CONDUIT_SMC:
570 insn = aarch64_insn_get_smc_value();
571 break;
572 default:
573 return;
574 }
575
576 *updptr = cpu_to_le32(insn);
577 }
578
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists