mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: James Morse <james.morse@arm.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: arch/arm64/kernel/proton-pack.c:557:13: warning: no previous prototype for 'smccc_patch_fw_mitigation_conduit'
Date: Sun, 24 Jul 2022 04:59:13 +0800	[thread overview]
Message-ID: <202207240421.4mJ1IiTh-lkp@intel.com> (raw)

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@intel.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

             reply	other threads:[~2022-07-23 20:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23 20:59 kernel test robot [this message]
2022-10-29  7:20 kernel test robot

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 \
    --in-reply-to=202207240421.4mJ1IiTh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    /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

all inboxes | Powered by JetHome®