From: kernel test robot <lkp@intel.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org,
Frederic Weisbecker <frederic@kernel.org>
Subject: [frederic-dynticks:preempt/arm-v2 2/4] arch/arm64/kernel/patching.c:93:6: warning: no previous prototype for function 'arch_static_call_transform'
Date: Wed, 27 Oct 2021 13:36:44 +0800 [thread overview]
Message-ID: <202110271341.DvQW9YV0-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3420 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-randconfig-r003-20211027 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# 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=clang make.cross W=1 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 function 'arch_static_call_transform' [-Wmissing-prototypes]
void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
^
arch/arm64/kernel/patching.c:93:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
^
static
1 warning generated.
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: 41826 bytes --]
reply other threads:[~2021-10-27 5:36 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 \
--in-reply-to=202110271341.DvQW9YV0-lkp@intel.com \
--to=lkp@intel.com \
--cc=ardb@kernel.org \
--cc=frederic@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
/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