[tip:irq/urgent 2/2] drivers/irqchip/irq-gic-v3.c:551:40: error: 'cpu' undeclared

From: kbuild test robot
Date: Mon Sep 19 2016 - 18:45:39 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/urgent
head: 7e947926fc3bfa095644c2933ec209128cbfd61e
commit: 7e947926fc3bfa095644c2933ec209128cbfd61e [2/2] irqchip/gicv3: Silence noisy DEBUG_PER_CPU_MAPS warning
config: arm64-allnoconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 7e947926fc3bfa095644c2933ec209128cbfd61e
# save the attached .config to linux build tree
make.cross ARCH=arm64

All errors (new ones prefixed by >>):

In file included from drivers/irqchip/irq-gic-v3.c:39:0:
drivers/irqchip/irq-gic-v3.c: In function 'gic_compute_target_list':
>> drivers/irqchip/irq-gic-v3.c:551:40: error: 'cpu' undeclared (first use in this function)
unsigned long mpidr = cpu_logical_map(cpu);
^
arch/arm64/include/asm/smp_plat.h:43:51: note: in definition of macro 'cpu_logical_map'
#define cpu_logical_map(cpu) __cpu_logical_map[cpu]
^~~
drivers/irqchip/irq-gic-v3.c:551:40: note: each undeclared identifier is reported only once for each function it appears in
unsigned long mpidr = cpu_logical_map(cpu);
^
arch/arm64/include/asm/smp_plat.h:43:51: note: in definition of macro 'cpu_logical_map'
#define cpu_logical_map(cpu) __cpu_logical_map[cpu]
^~~

vim +/cpu +551 drivers/irqchip/irq-gic-v3.c

6670a6d8 Richard Cochran 2016-07-13 545 return 0;
021f6537 Marc Zyngier 2014-06-30 546 }
021f6537 Marc Zyngier 2014-06-30 547
021f6537 Marc Zyngier 2014-06-30 548 static u16 gic_compute_target_list(int *base_cpu, const struct cpumask *mask,
f6c86a41 Jean-Philippe Brucker 2015-10-01 549 unsigned long cluster_id)
021f6537 Marc Zyngier 2014-06-30 550 {
f6c86a41 Jean-Philippe Brucker 2015-10-01 @551 unsigned long mpidr = cpu_logical_map(cpu);
7e947926 James Morse 2016-09-19 552 int next_cpu, cpu = *base_cpu;
021f6537 Marc Zyngier 2014-06-30 553 u16 tlist = 0;
021f6537 Marc Zyngier 2014-06-30 554

:::::: The code at line 551 was first introduced by commit
:::::: f6c86a41e1dc2214363b00cc0eadb8a5401c892d irqchip/gic-v3: Change unsigned types for AArch32 compatibility

:::::: TO: Jean-Philippe Brucker <jean-philippe.brucker@xxxxxxx>
:::::: CC: Marc Zyngier <marc.zyngier@xxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip