arch/x86/kernel/apic/apic.c:2135: warning: Function parameter or member 'spurious_interrupt' not described in 'DEFINE_IDTENTRY_IRQ'

From: kernel test robot
Date: Thu Dec 14 2023 - 09:41:43 EST


Hi Thomas,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5bd7ef53ffe5ca580e93e74eb8c81ed191ddc4bd
commit: fa5e5c409213265da8a188b4a5e4e641b1382eb4 x86/entry: Use idtentry for interrupts
date: 3 years, 6 months ago
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20231214/202312142220.6hKrNeSe-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231214/202312142220.6hKrNeSe-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312142220.6hKrNeSe-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> arch/x86/kernel/apic/apic.c:2135: warning: Function parameter or member 'spurious_interrupt' not described in 'DEFINE_IDTENTRY_IRQ'
>> arch/x86/kernel/apic/apic.c:2135: warning: expecting prototype for spurious_interrupt(). Prototype was for DEFINE_IDTENTRY_IRQ() instead


vim +2135 arch/x86/kernel/apic/apic.c

c0104d38a740b2 arch/x86/kernel/apic/apic.c Yinghai Lu 2010-12-07 2118
^1da177e4c3f41 arch/x86_64/kernel/apic.c Linus Torvalds 2005-04-16 2119 /*
0e078e2f5060e0 arch/x86/kernel/apic_64.c Thomas Gleixner 2008-01-30 2120 * Local APIC interrupts
^1da177e4c3f41 arch/x86_64/kernel/apic.c Linus Torvalds 2005-04-16 2121 */
^1da177e4c3f41 arch/x86_64/kernel/apic.c Linus Torvalds 2005-04-16 2122
633260fa143bbe arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2123 /**
fa5e5c40921326 arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2124 * spurious_interrupt - Catch all for interrupts raised on unused vectors
633260fa143bbe arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2125 * @regs: Pointer to pt_regs on stack
fa5e5c40921326 arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2126 * @vector: The vector number
633260fa143bbe arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2127 *
633260fa143bbe arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2128 * This is invoked from ASM entry code to catch all interrupts which
633260fa143bbe arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2129 * trigger on an entry which is routed to the common_spurious idtentry
633260fa143bbe arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2130 * point.
633260fa143bbe arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2131 *
633260fa143bbe arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2132 * Also called from smp_spurious_apic_interrupt().
0e078e2f5060e0 arch/x86/kernel/apic_64.c Thomas Gleixner 2008-01-30 2133 */
fa5e5c40921326 arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2134 DEFINE_IDTENTRY_IRQ(spurious_interrupt)
^1da177e4c3f41 arch/x86_64/kernel/apic.c Linus Torvalds 2005-04-16 @2135 {
dc1528dd864a0b arch/x86/kernel/apic_64.c Yinghai Lu 2008-08-24 2136 u32 v;
dc1528dd864a0b arch/x86/kernel/apic_64.c Yinghai Lu 2008-08-24 2137
61069de7a3252b arch/x86/kernel/apic/apic.c Thomas Gleixner 2017-08-28 2138 trace_spurious_apic_entry(vector);
61069de7a3252b arch/x86/kernel/apic/apic.c Thomas Gleixner 2017-08-28 2139
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2140 inc_irq_stat(irq_spurious_count);
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2141
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2142 /*
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2143 * If this is a spurious interrupt then do not acknowledge
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2144 */
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2145 if (vector == SPURIOUS_APIC_VECTOR) {
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2146 /* See SDM vol 3 */
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2147 pr_info("Spurious APIC interrupt (vector 0xFF) on CPU#%d, should never happen.\n",
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2148 smp_processor_id());
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2149 goto out;
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2150 }
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2151
0e078e2f5060e0 arch/x86/kernel/apic_64.c Thomas Gleixner 2008-01-30 2152 /*
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2153 * If it is a vectored one, verify it's set in the ISR. If set,
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2154 * acknowledge it.
0e078e2f5060e0 arch/x86/kernel/apic_64.c Thomas Gleixner 2008-01-30 2155 */
2414e021ac8d58 arch/x86/kernel/apic/apic.c Jan Beulich 2014-11-03 2156 v = apic_read(APIC_ISR + ((vector & ~0x1f) >> 1));
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2157 if (v & (1 << (vector & 0x1f))) {
fa5e5c40921326 arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2158 pr_info("Spurious interrupt (vector 0x%02x) on CPU#%d. Acked\n",
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2159 vector, smp_processor_id());
0e078e2f5060e0 arch/x86/kernel/apic_64.c Thomas Gleixner 2008-01-30 2160 ack_APIC_irq();
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2161 } else {
fa5e5c40921326 arch/x86/kernel/apic/apic.c Thomas Gleixner 2020-05-21 2162 pr_info("Spurious interrupt (vector 0x%02x) on CPU#%d. Not pending!\n",
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2163 vector, smp_processor_id());
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2164 }
f8a8fe61fec800 arch/x86/kernel/apic/apic.c Thomas Gleixner 2019-06-28 2165 out:
2414e021ac8d58 arch/x86/kernel/apic/apic.c Jan Beulich 2014-11-03 2166 trace_spurious_apic_exit(vector);
0e078e2f5060e0 arch/x86/kernel/apic_64.c Thomas Gleixner 2008-01-30 2167 }
c4d58cbd158dc9 arch/x86/kernel/apic_64.c Thomas Gleixner 2007-10-12 2168

:::::: The code at line 2135 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki