* [intel-linux-intel-lts:4.19/android_r 19120/24281] arch/x86/kernel/smp.c:273:1: warning: unused label 'finish'
@ 2021-07-30 15:56 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-07-30 15:56 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 9534 bytes --]
Hi Kris,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 4.19/android_r
head: bab33a719ee83c9aa6b042027bf76e0c6916eeed
commit: b652a52d36a85d1b731921ba08e701d7150ce200 [19120/24281] Merge branch 'aosp/android-4.19-stable' into android_r
config: x86_64-randconfig-c001-20210730 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 4f71f59bf3d9914188a11d0c41bedbb339d36ff5)
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://github.com/intel/linux-intel-lts/commit/b652a52d36a85d1b731921ba08e701d7150ce200
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 4.19/android_r
git checkout b652a52d36a85d1b731921ba08e701d7150ce200
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/x86/kernel/smp.c:190:16: warning: no previous prototype for function 'smp_reboot_interrupt' [-Wmissing-prototypes]
__visible void smp_reboot_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/smp.c:190:11: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible void smp_reboot_interrupt(struct pt_regs *regs)
^
static
>> arch/x86/kernel/smp.c:273:1: warning: unused label 'finish' [-Wunused-label]
finish:
^~~~~~~
arch/x86/kernel/smp.c:285:28: warning: no previous prototype for function 'smp_reschedule_interrupt' [-Wmissing-prototypes]
__visible void __irq_entry smp_reschedule_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/smp.c:285:11: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible void __irq_entry smp_reschedule_interrupt(struct pt_regs *regs)
^
static
arch/x86/kernel/smp.c:306:28: warning: no previous prototype for function 'smp_call_function_interrupt' [-Wmissing-prototypes]
__visible void __irq_entry smp_call_function_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/smp.c:306:11: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible void __irq_entry smp_call_function_interrupt(struct pt_regs *regs)
^
static
arch/x86/kernel/smp.c:316:28: warning: no previous prototype for function 'smp_call_function_single_interrupt' [-Wmissing-prototypes]
__visible void __irq_entry smp_call_function_single_interrupt(struct pt_regs *r)
^
arch/x86/kernel/smp.c:316:11: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible void __irq_entry smp_call_function_single_interrupt(struct pt_regs *r)
^
static
5 warnings generated.
vim +/finish +273 arch/x86/kernel/smp.c
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 204
5d2b86d90f7cc4 Don Zickus 2012-05-11 205 static void native_stop_other_cpus(int wait)
f9e47a126be2ea Glauber Costa 2008-03-03 206 {
f9e47a126be2ea Glauber Costa 2008-03-03 207 unsigned long flags;
76fac077db6b34 Alok Kataria 2010-10-11 208 unsigned long timeout;
f9e47a126be2ea Glauber Costa 2008-03-03 209
f9e47a126be2ea Glauber Costa 2008-03-03 210 if (reboot_force)
f9e47a126be2ea Glauber Costa 2008-03-03 211 return;
f9e47a126be2ea Glauber Costa 2008-03-03 212
4ef702c10b5df1 Andi Kleen 2009-05-27 213 /*
4ef702c10b5df1 Andi Kleen 2009-05-27 214 * Use an own vector here because smp_call_function
4ef702c10b5df1 Andi Kleen 2009-05-27 215 * does lots of things not suitable in a panic situation.
7d007d21e539db Don Zickus 2012-05-11 216 */
7d007d21e539db Don Zickus 2012-05-11 217
7d007d21e539db Don Zickus 2012-05-11 218 /*
7d007d21e539db Don Zickus 2012-05-11 219 * We start by using the REBOOT_VECTOR irq.
7d007d21e539db Don Zickus 2012-05-11 220 * The irq is treated as a sync point to allow critical
7d007d21e539db Don Zickus 2012-05-11 221 * regions of code on other cpus to release their spin locks
7d007d21e539db Don Zickus 2012-05-11 222 * and re-enable irqs. Jumping straight to an NMI might
7d007d21e539db Don Zickus 2012-05-11 223 * accidentally cause deadlocks with further shutdown/panic
7d007d21e539db Don Zickus 2012-05-11 224 * code. By syncing, we give the cpus up to one second to
7d007d21e539db Don Zickus 2012-05-11 225 * finish their work before we force them off with the NMI.
4ef702c10b5df1 Andi Kleen 2009-05-27 226 */
4ef702c10b5df1 Andi Kleen 2009-05-27 227 if (num_online_cpus() > 1) {
7d007d21e539db Don Zickus 2012-05-11 228 /* did someone beat us here? */
7d007d21e539db Don Zickus 2012-05-11 229 if (atomic_cmpxchg(&stopping_cpu, -1, safe_smp_processor_id()) != -1)
7d007d21e539db Don Zickus 2012-05-11 230 return;
7d007d21e539db Don Zickus 2012-05-11 231
7d007d21e539db Don Zickus 2012-05-11 232 /* sync above data before sending IRQ */
7d007d21e539db Don Zickus 2012-05-11 233 wmb();
7d007d21e539db Don Zickus 2012-05-11 234
4ef702c10b5df1 Andi Kleen 2009-05-27 235 apic->send_IPI_allbutself(REBOOT_VECTOR);
4ef702c10b5df1 Andi Kleen 2009-05-27 236
76fac077db6b34 Alok Kataria 2010-10-11 237 /*
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 238 * Don't wait longer than a second for IPI completion. The
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 239 * wait request is not checked here because that would
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 240 * prevent an NMI shutdown attempt in case that not all
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 241 * CPUs reach shutdown state.
76fac077db6b34 Alok Kataria 2010-10-11 242 */
76fac077db6b34 Alok Kataria 2010-10-11 243 timeout = USEC_PER_SEC;
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 244 while (num_online_cpus() > 1 && timeout--)
4ef702c10b5df1 Andi Kleen 2009-05-27 245 udelay(1);
4ef702c10b5df1 Andi Kleen 2009-05-27 246 }
4ef702c10b5df1 Andi Kleen 2009-05-27 247
7d007d21e539db Don Zickus 2012-05-11 248 /* if the REBOOT_VECTOR didn't work, try with the NMI */
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 249 if (num_online_cpus() > 1) {
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 250 /*
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 251 * If NMI IPI is enabled, try to register the stop handler
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 252 * and send the IPI. In any case try to wait for the other
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 253 * CPUs to stop.
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 254 */
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 255 if (!smp_no_nmi_ipi && !register_stop_handler()) {
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 256 /* Sync above data before sending IRQ */
7d007d21e539db Don Zickus 2012-05-11 257 wmb();
7d007d21e539db Don Zickus 2012-05-11 258
7d007d21e539db Don Zickus 2012-05-11 259 pr_emerg("Shutting down cpus with NMI\n");
7d007d21e539db Don Zickus 2012-05-11 260
7d007d21e539db Don Zickus 2012-05-11 261 apic->send_IPI_allbutself(NMI_VECTOR);
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 262 }
7d007d21e539db Don Zickus 2012-05-11 263 /*
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 264 * Don't wait longer than 10 ms if the caller didn't
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 265 * reqeust it. If wait is true, the machine hangs here if
ce7fdd5cd83e0a Grzegorz Halat 2019-06-28 266 * one or more CPUs do not reach shutdown state.
7d007d21e539db Don Zickus 2012-05-11 267 */
7d007d21e539db Don Zickus 2012-05-11 268 timeout = USEC_PER_MSEC * 10;
7d007d21e539db Don Zickus 2012-05-11 269 while (num_online_cpus() > 1 && (wait || timeout--))
7d007d21e539db Don Zickus 2012-05-11 270 udelay(1);
7d007d21e539db Don Zickus 2012-05-11 271 }
7d007d21e539db Don Zickus 2012-05-11 272
7d007d21e539db Don Zickus 2012-05-11 @273 finish:
cd7b77710e3d52 Duan, YayongX 2017-12-27 274 store_regs(NULL);
f9e47a126be2ea Glauber Costa 2008-03-03 275 local_irq_save(flags);
f9e47a126be2ea Glauber Costa 2008-03-03 276 disable_local_APIC();
8838eb6c0bf3b6 Ashok Raj 2015-08-12 277 mcheck_cpu_clear(this_cpu_ptr(&cpu_info));
f9e47a126be2ea Glauber Costa 2008-03-03 278 local_irq_restore(flags);
f9e47a126be2ea Glauber Costa 2008-03-03 279 }
f9e47a126be2ea Glauber Costa 2008-03-03 280
:::::: The code at line 273 was first introduced by commit
:::::: 7d007d21e539dbecb6942c5734e6649f720982cf x86/reboot: Use NMI to assist in shutting down if IRQ fails
:::::: TO: Don Zickus <dzickus@redhat.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>
---
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: 25751 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-30 15:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30 15:56 [intel-linux-intel-lts:4.19/android_r 19120/24281] arch/x86/kernel/smp.c:273:1: warning: unused label 'finish' 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.