All of lore.kernel.org
 help / color / mirror / Atom feed
* [frederic-dynticks:preempt/arm-v2 2/4] arch/arm64/kernel/patching.c:93:6: warning: no previous prototype for 'arch_static_call_transform'
@ 2021-10-26  5:15 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-26  5:15 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: kbuild-all, linux-kernel, Frederic Weisbecker

[-- Attachment #1: Type: text/plain, Size: 2994 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git preempt/arm-v2
head:   5700542b609d9ab640210d7dd93621c7967688e6
commit: ede0a4b67ffccf492192c29ee88076d2abb8119b [2/4] arm64: implement support for static call trampolines
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.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/frederic/linux-dynticks.git/commit/?id=ede0a4b67ffccf492192c29ee88076d2abb8119b
        git remote add frederic-dynticks https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
        git fetch --no-tags frederic-dynticks preempt/arm-v2
        git checkout ede0a4b67ffccf492192c29ee88076d2abb8119b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> arch/arm64/kernel/patching.c:93:6: warning: no previous prototype for 'arch_static_call_transform' [-Wmissing-prototypes]
      93 | void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/arch_static_call_transform +93 arch/arm64/kernel/patching.c

    92	
  > 93	void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
    94	{
    95		/*
    96		 * -0x8	<literal>
    97		 *  0x0	bti c		<--- trampoline entry point
    98		 *  0x4	<branch or nop>
    99		 *  0x8	ldr x16, <literal>
   100		 *  0xc	cbz x16, 20
   101		 * 0x10	br x16
   102		 * 0x14	ret
   103		 */
   104		struct {
   105			u64	literal;
   106			__le32	insn[2];
   107		} insns;
   108		u32 insn;
   109		int ret;
   110	
   111		insn = aarch64_insn_gen_hint(AARCH64_INSN_HINT_BTIC);
   112		insns.literal = (u64)func;
   113		insns.insn[0] = cpu_to_le32(insn);
   114	
   115		if (!func) {
   116			insn = aarch64_insn_gen_branch_reg(AARCH64_INSN_REG_LR,
   117							   AARCH64_INSN_BRANCH_RETURN);
   118		} else {
   119			insn = aarch64_insn_gen_branch_imm((u64)tramp + 4, (u64)func,
   120							   AARCH64_INSN_BRANCH_NOLINK);
   121	
   122			/*
   123			 * Use a NOP if the branch target is out of range, and rely on
   124			 * the indirect call instead.
   125			 */
   126			if (insn == AARCH64_BREAK_FAULT)
   127				insn = aarch64_insn_gen_hint(AARCH64_INSN_HINT_NOP);
   128		}
   129		insns.insn[1] = cpu_to_le32(insn);
   130	
   131		ret = __aarch64_insn_write(tramp - 8, &insns, sizeof(insns));
   132		if (!WARN_ON(ret))
   133			caches_clean_inval_pou((u64)tramp - 8, sizeof(insns));
   134	}
   135	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 55997 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [frederic-dynticks:preempt/arm-v2 2/4] arch/arm64/kernel/patching.c:93:6: warning: no previous prototype for 'arch_static_call_transform'
@ 2021-10-26  5:15 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-26  5:15 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3071 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git preempt/arm-v2
head:   5700542b609d9ab640210d7dd93621c7967688e6
commit: ede0a4b67ffccf492192c29ee88076d2abb8119b [2/4] arm64: implement support for static call trampolines
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.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/frederic/linux-dynticks.git/commit/?id=ede0a4b67ffccf492192c29ee88076d2abb8119b
        git remote add frederic-dynticks https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
        git fetch --no-tags frederic-dynticks preempt/arm-v2
        git checkout ede0a4b67ffccf492192c29ee88076d2abb8119b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> arch/arm64/kernel/patching.c:93:6: warning: no previous prototype for 'arch_static_call_transform' [-Wmissing-prototypes]
      93 | void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/arch_static_call_transform +93 arch/arm64/kernel/patching.c

    92	
  > 93	void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
    94	{
    95		/*
    96		 * -0x8	<literal>
    97		 *  0x0	bti c		<--- trampoline entry point
    98		 *  0x4	<branch or nop>
    99		 *  0x8	ldr x16, <literal>
   100		 *  0xc	cbz x16, 20
   101		 * 0x10	br x16
   102		 * 0x14	ret
   103		 */
   104		struct {
   105			u64	literal;
   106			__le32	insn[2];
   107		} insns;
   108		u32 insn;
   109		int ret;
   110	
   111		insn = aarch64_insn_gen_hint(AARCH64_INSN_HINT_BTIC);
   112		insns.literal = (u64)func;
   113		insns.insn[0] = cpu_to_le32(insn);
   114	
   115		if (!func) {
   116			insn = aarch64_insn_gen_branch_reg(AARCH64_INSN_REG_LR,
   117							   AARCH64_INSN_BRANCH_RETURN);
   118		} else {
   119			insn = aarch64_insn_gen_branch_imm((u64)tramp + 4, (u64)func,
   120							   AARCH64_INSN_BRANCH_NOLINK);
   121	
   122			/*
   123			 * Use a NOP if the branch target is out of range, and rely on
   124			 * the indirect call instead.
   125			 */
   126			if (insn == AARCH64_BREAK_FAULT)
   127				insn = aarch64_insn_gen_hint(AARCH64_INSN_HINT_NOP);
   128		}
   129		insns.insn[1] = cpu_to_le32(insn);
   130	
   131		ret = __aarch64_insn_write(tramp - 8, &insns, sizeof(insns));
   132		if (!WARN_ON(ret))
   133			caches_clean_inval_pou((u64)tramp - 8, sizeof(insns));
   134	}
   135	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 55997 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-26  5:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26  5:15 [frederic-dynticks:preempt/arm-v2 2/4] arch/arm64/kernel/patching.c:93:6: warning: no previous prototype for 'arch_static_call_transform' kernel test robot
2021-10-26  5:15 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.