[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208240954.ZdCvNcRi-lkp@intel.com>
Date: Wed, 24 Aug 2022 09:25:18 +0800
From: kernel test robot <lkp@...el.com>
To: Mark Rutland <mark.rutland@....com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mark:arm64/alternatives/rework 17/18]
arch/arm64/kernel/alternative.c:146:6: warning: no previous prototype for
'summarize_alternatives'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/alternatives/rework
head: fad62c713602c963008575fd972d316569a32d12
commit: 6f13524469effb9785e5692389b94113f994c100 [17/18] HACK: dump summary of alternatives
config: arm64-buildonly-randconfig-r005-20220823 (https://download.01.org/0day-ci/archive/20220824/202208240954.ZdCvNcRi-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/mark/linux.git/commit/?id=6f13524469effb9785e5692389b94113f994c100
git remote add mark https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark arm64/alternatives/rework
git checkout 6f13524469effb9785e5692389b94113f994c100
# 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>
All warnings (new ones prefixed by >>):
>> arch/arm64/kernel/alternative.c:146:6: warning: no previous prototype for 'summarize_alternatives' [-Wmissing-prototypes]
146 | void summarize_alternatives(const struct alt_region *region)
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/alternative.c:330:14: warning: no previous prototype for 'alt_cb_patch_nops' [-Wmissing-prototypes]
330 | noinstr void alt_cb_patch_nops(struct alt_instr *alt, __le32 *origptr,
| ^~~~~~~~~~~~~~~~~
vim +/summarize_alternatives +146 arch/arm64/kernel/alternative.c
140
141 #define for_each_region_alt(region, alt) \
142 for (struct alt_instr *alt = (region)->begin; \
143 (alt) < (region)->end; \
144 (alt)++)
145
> 146 void summarize_alternatives(const struct alt_region *region)
147 {
148 unsigned int entries[ARM64_NCAPS] = { 0 };
149 unsigned int orig_len[ARM64_NCAPS] = { 0 };
150 unsigned int repl_len[ARM64_NCAPS] = { 0 };
151 unsigned int callbacks[ARM64_NCAPS] = { 0 };
152
153 unsigned int total_entries = 0;
154 unsigned int total_orig = 0;
155 unsigned int total_repl = 0;
156 unsigned int total_callbacks = 0;
157
158 for_each_region_alt(region, alt) {
159 int cap = ALT_CAP(alt);
160
161 entries[cap]++;
162 total_entries++;
163
164 orig_len[cap] += alt->orig_len;
165 total_orig += alt->orig_len;
166
167 repl_len[cap] += alt->alt_len;
168 total_repl += alt->alt_len;
169
170 if (ALT_HAS_CB(alt)) {
171 callbacks[cap]++;
172 total_callbacks++;
173 }
174 }
175
176 pr_info("Alternatives summary:\n"
177 " entries: %5d\n"
178 " instructions: %5d\n"
179 " replacements: %5d\n"
180 " callbacks: %5d\n",
181 total_entries,
182 total_orig / AARCH64_INSN_SIZE,
183 total_repl / AARCH64_INSN_SIZE,
184 total_callbacks);
185
186 for (int i = 0; i < ARM64_NCAPS; i++) {
187 if (!entries[i])
188 continue;
189
190 pr_info("cpucap %2d => entries: %5d orig: %5d, repl: %5d, cb: %5d\n",
191 i,
192 entries[i],
193 orig_len[i] / AARCH64_INSN_SIZE,
194 repl_len[i] / AARCH64_INSN_SIZE,
195 callbacks[i]);
196 }
197 }
198
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists