tree:
https://android.googlesource.com/kernel/common android-3.18
head: fa7316c94fad2b143fe78cb0af113aec5e8a2a8a
commit: 39972bcf660a4a878675bc794f07a860eb4de0c3 [389/414] x86/apic: Set up
through-local-APIC mode on the boot CPU if 'noapic' specified
config: i386-randconfig-s001-20210219 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-229-g60c1f270-dirty
git remote add android-common
https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-3.18
git checkout 39972bcf660a4a878675bc794f07a860eb4de0c3
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86/kernel/apic/apic.c:573:13: sparse: sparse: incorrect type in argument 2
(different address spaces)
arch/x86/kernel/apic/apic.c:573:13: sparse: expected unsigned long const [noderef]
<asn:3> *addr
arch/x86/kernel/apic/apic.c:573:13: sparse: got unsigned long *
arch/x86/kernel/apic/apic.c:573:13: sparse: sparse: incorrect type in argument 2
(different address spaces)
arch/x86/kernel/apic/apic.c:573:13: sparse: expected unsigned long const [noderef]
<asn:3> *addr
arch/x86/kernel/apic/apic.c:573:13: sparse: got unsigned long *
arch/x86/kernel/apic/apic.c:582:13: sparse: sparse: incorrect type in argument 2
(different address spaces)
arch/x86/kernel/apic/apic.c:582:13: sparse: expected unsigned long const [noderef]
<asn:3> *addr
arch/x86/kernel/apic/apic.c:582:13: sparse: got unsigned long *
arch/x86/kernel/apic/apic.c:582:13: sparse: sparse: incorrect type in argument 2
(different address spaces)
arch/x86/kernel/apic/apic.c:582:13: sparse: expected unsigned long const [noderef]
<asn:3> *addr
arch/x86/kernel/apic/apic.c:582:13: sparse: got unsigned long *
arch/x86/kernel/apic/apic.c:1471:44: sparse: sparse: undefined identifier
'skip_ioapic_setup'
arch/x86/kernel/apic/apic.c:1595:12: sparse: sparse: symbol 'enable_IR' was not
declared. Should it be static?
arch/x86/kernel/apic/apic.c: note: in included file (through
arch/x86/include/asm/preempt.h, include/linux/preempt.h, include/linux/uaccess.h, ...):
arch/x86/include/asm/percpu.h:494:38: sparse: sparse: cast removes address space
'<asn:3>' of expression
arch/x86/include/asm/percpu.h:494:59: sparse: sparse: incorrect type in initializer
(different address spaces)
arch/x86/include/asm/percpu.h:494:59: sparse: expected unsigned long [noderef]
<asn:3> *a
arch/x86/include/asm/percpu.h:494:59: sparse: got unsigned long *
arch/x86/include/asm/percpu.h:494:38: sparse: sparse: cast removes address space
'<asn:3>' of expression
arch/x86/include/asm/percpu.h:494:59: sparse: sparse: incorrect type in initializer
(different address spaces)
arch/x86/include/asm/percpu.h:494:59: sparse: expected unsigned long [noderef]
<asn:3> *a
arch/x86/include/asm/percpu.h:494:59: sparse: got unsigned long *
In file included from arch/x86/include/asm/pgalloc.h:6:0,
from arch/x86/kernel/apic/apic.c:42:
include/linux/pagemap.h: In function 'fault_in_multipages_readable':
include/linux/pagemap.h:633:16: warning: variable 'c' set but not used
[-Wunused-but-set-variable]
volatile char c;
^
arch/x86/kernel/apic/apic.c: At top level:
arch/x86/kernel/apic/apic.c:957:28: warning: no previous prototype for
'smp_trace_apic_timer_interrupt' [-Wmissing-prototypes]
__visible void __irq_entry smp_trace_apic_timer_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/apic/apic.c: In function 'setup_local_APIC':
> arch/x86/kernel/apic/apic.c:1471:37: error:
'skip_ioapic_setup' undeclared (first use in this function)
if (!cpu
&& (pic_mode || !value || skip_ioapic_setup)) {
^
arch/x86/kernel/apic/apic.c:1471:37: note: each undeclared identifier is reported only
once for each function it appears in
arch/x86/kernel/apic/apic.c: At top level:
arch/x86/kernel/apic/apic.c:1595:12: warning: no previous prototype for
'enable_IR' [-Wmissing-prototypes]
int __init enable_IR(void)
^
arch/x86/kernel/apic/apic.c: In function 'enable_IR_x2apic':
arch/x86/kernel/apic/apic.c:1617:11: warning: variable 'x2apic_enabled' set but
not used [-Wunused-but-set-variable]
int ret, x2apic_enabled = 0;
^
arch/x86/kernel/apic/apic.c: In function 'apic_verify':
arch/x86/kernel/apic/apic.c:1706:16: warning: variable 'h' set but not used
[-Wunused-but-set-variable]
u32 features, h, l;
^
arch/x86/kernel/apic/apic.c: At top level:
arch/x86/kernel/apic/apic.c:1980:16: warning: no previous prototype for
'smp_trace_spurious_interrupt' [-Wmissing-prototypes]
__visible void smp_trace_spurious_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/apic/apic.c:2036:16: warning: no previous prototype for
'smp_trace_error_interrupt' [-Wmissing-prototypes]
__visible void smp_trace_error_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/apic/apic.c: In function 'generic_processor_info':
arch/x86/kernel/apic/apic.c:2174:43: warning: comparison of unsigned expression >= 0
is always true [-Wtype-limits]
if (!boot_cpu_detected && num_processors >= nr_cpu_ids - 1 &&
^
--
In file included from arch/x86/include/asm/pgalloc.h:6:0,
from arch/x86/kernel/apic/apic.c:42:
include/linux/pagemap.h: In function 'fault_in_multipages_readable':
include/linux/pagemap.h:633:16: warning: variable 'c' set but not used
[-Wunused-but-set-variable]
volatile char c;
^
arch/x86/kernel/apic/apic.c: At top level:
arch/x86/kernel/apic/apic.c:957:28: warning: no previous prototype for
'smp_trace_apic_timer_interrupt' [-Wmissing-prototypes]
__visible void __irq_entry smp_trace_apic_timer_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/apic/apic.c: In function 'setup_local_APIC':
> arch/x86/kernel/apic/apic.c:1471:37: error:
'skip_ioapic_setup' undeclared (first use in this function)
if (!cpu
&& (pic_mode || !value || skip_ioapic_setup)) {
^
arch/x86/kernel/apic/apic.c:1471:37: note: each undeclared identifier is reported only
once for each function it appears in
arch/x86/kernel/apic/apic.c: At top level:
arch/x86/kernel/apic/apic.c:1595:12: warning: no previous prototype for
'enable_IR' [-Wmissing-prototypes]
int __init enable_IR(void)
^
arch/x86/kernel/apic/apic.c: In function 'enable_IR_x2apic':
arch/x86/kernel/apic/apic.c:1617:11: warning: variable 'x2apic_enabled' set but
not used [-Wunused-but-set-variable]
int ret, x2apic_enabled = 0;
^
arch/x86/kernel/apic/apic.c: In function 'apic_verify':
arch/x86/kernel/apic/apic.c:1706:16: warning: variable 'h' set but not used
[-Wunused-but-set-variable]
u32 features, h, l;
^
arch/x86/kernel/apic/apic.c: At top level:
arch/x86/kernel/apic/apic.c:1980:16: warning: no previous prototype for
'smp_trace_spurious_interrupt' [-Wmissing-prototypes]
__visible void smp_trace_spurious_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/apic/apic.c:2036:16: warning: no previous prototype for
'smp_trace_error_interrupt' [-Wmissing-prototypes]
__visible void smp_trace_error_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/apic/apic.c: In function 'generic_processor_info':
arch/x86/kernel/apic/apic.c:2174:43: warning: comparison of unsigned expression >= 0
is always true [-Wtype-limits]
if (!boot_cpu_detected && num_processors >= nr_cpu_ids - 1 &&
^
vim +/skip_ioapic_setup +1471 arch/x86/kernel/apic/apic.c
1453
1454 /*
1455 * Set spurious IRQ vector
1456 */
1457 value |= SPURIOUS_APIC_VECTOR;
1458 apic_write(APIC_SPIV, value);
1459
1460 /*
1461 * Set up LVT0, LVT1:
1462 *
1463 * set up through-local-APIC on the BP's LINT0. This is not
1464 * strictly necessary in pure symmetric-IO mode, but sometimes
1465 * we delegate interrupts to the 8259A.
1466 */
1467 /*
1468 * TODO: set up through-local-APIC from through-I/O-APIC? --macro
1469 */
1470 value = apic_read(APIC_LVT0) & APIC_LVT_MASKED;
1471 if (!cpu && (pic_mode || !value || skip_ioapic_setup))
{
1472 value = APIC_DM_EXTINT;
1473 apic_printk(APIC_VERBOSE, "enabled ExtINT on CPU#%d\n", cpu);
1474 } else {
1475 value = APIC_DM_EXTINT | APIC_LVT_MASKED;
1476 apic_printk(APIC_VERBOSE, "masked ExtINT on CPU#%d\n", cpu);
1477 }
1478 apic_write(APIC_LVT0, value);
1479
1480 /*
1481 * only the BP should see the LINT1 NMI signal, obviously.
1482 */
1483 if (!cpu)
1484 value = APIC_DM_NMI;
1485 else
1486 value = APIC_DM_NMI | APIC_LVT_MASKED;
1487 if (!lapic_is_integrated()) /* 82489DX */
1488 value |= APIC_LVT_LEVEL_TRIGGER;
1489 apic_write(APIC_LVT1, value);
1490
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org