Re: [PATCH v2 05/11] MIPS: Switch to arch_topology

From: kbuild test robot
Date: Sun Apr 12 2020 - 01:26:13 EST


Hi Jiaxun,

I love your patch! Yet something to improve:

[auto build test ERROR on driver-core/driver-core-testing]
[also build test ERROR on pm/linux-next linus/master next-20200411]
[cannot apply to tip/perf/core tip/irq/core v5.6]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Jiaxun-Yang/MIPS-Topology-DeviceTree-CPU-rework-v2/20200412-113308
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git a10c9c710f9ecea87b9f4bbb837467893b4bef01
config: mips-allnoconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

Note: the linux-review/Jiaxun-Yang/MIPS-Topology-DeviceTree-CPU-rework-v2/20200412-113308 HEAD 8e8e9d4f7aa74359f2199773786ffe2fbb7877d0 builds fine.
It only hurts bisectibility.

All errors (new ones prefixed by >>):

arch/mips/include/asm/mips-cm.h:398:31: error: passing argument 1 of 'cpu_core' makes integer from pointer without a cast [-Werror=int-conversion]
398 | unsigned int core = cpu_core(&cpu_data[cpu]);
| ^~~~~~~~~~~~~~
| |
| struct cpuinfo_mips *
In file included from include/linux/topology.h:36,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from arch/mips/kernel/mips-cpc.c:9:
arch/mips/include/asm/topology.h:68:41: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
68 | static inline unsigned int cpu_core(int cpu)
| ~~~~^~~
In file included from arch/mips/include/asm/mips-cps.h:104,
from arch/mips/kernel/mips-cpc.c:13:
arch/mips/include/asm/mips-cm.h:399:31: error: passing argument 1 of 'cpu_vpe_id' makes integer from pointer without a cast [-Werror=int-conversion]
399 | unsigned int vp = cpu_vpe_id(&cpu_data[cpu]);
| ^~~~~~~~~~~~~~
| |
| struct cpuinfo_mips *
In file included from include/linux/topology.h:36,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from arch/mips/kernel/mips-cpc.c:9:
arch/mips/include/asm/topology.h:73:43: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
73 | static inline unsigned int cpu_vpe_id(int cpu)
| ~~~~^~~
In file included from arch/mips/include/asm/mips-cps.h:104,
from arch/mips/kernel/mips-cpc.c:13:
arch/mips/include/asm/mips-cm.h: In function 'mips_cm_lock_other_cpu':
arch/mips/include/asm/mips-cm.h:456:33: error: passing argument 1 of 'cpu_cluster' makes integer from pointer without a cast [-Werror=int-conversion]
456 | mips_cm_lock_other(cpu_cluster(d), cpu_core(d), cpu_vpe_id(d), block);
| ^
| |
| struct cpuinfo_mips *
In file included from include/linux/topology.h:36,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from arch/mips/kernel/mips-cpc.c:9:
arch/mips/include/asm/topology.h:63:44: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
63 | static inline unsigned int cpu_cluster(int cpu)
| ~~~~^~~
In file included from arch/mips/include/asm/mips-cps.h:104,
from arch/mips/kernel/mips-cpc.c:13:
arch/mips/include/asm/mips-cm.h:456:46: error: passing argument 1 of 'cpu_core' makes integer from pointer without a cast [-Werror=int-conversion]
456 | mips_cm_lock_other(cpu_cluster(d), cpu_core(d), cpu_vpe_id(d), block);
| ^
| |
| struct cpuinfo_mips *
In file included from include/linux/topology.h:36,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from arch/mips/kernel/mips-cpc.c:9:
arch/mips/include/asm/topology.h:68:41: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
68 | static inline unsigned int cpu_core(int cpu)
| ~~~~^~~
In file included from arch/mips/include/asm/mips-cps.h:104,
from arch/mips/kernel/mips-cpc.c:13:
arch/mips/include/asm/mips-cm.h:456:61: error: passing argument 1 of 'cpu_vpe_id' makes integer from pointer without a cast [-Werror=int-conversion]
456 | mips_cm_lock_other(cpu_cluster(d), cpu_core(d), cpu_vpe_id(d), block);
| ^
| |
| struct cpuinfo_mips *
In file included from include/linux/topology.h:36,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from arch/mips/kernel/mips-cpc.c:9:
arch/mips/include/asm/topology.h:73:43: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
73 | static inline unsigned int cpu_vpe_id(int cpu)
| ~~~~^~~
arch/mips/kernel/mips-cpc.c: In function 'mips_cpc_lock_other':
>> arch/mips/kernel/mips-cpc.c:97:23: error: passing argument 1 of 'cpu_core' makes integer from pointer without a cast [-Werror=int-conversion]
97 | curr_core = cpu_core(&current_cpu_data);
In file included from include/linux/topology.h:36,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from arch/mips/kernel/mips-cpc.c:9:
arch/mips/include/asm/topology.h:68:41: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
68 | static inline unsigned int cpu_core(int cpu)
| ~~~~^~~
arch/mips/kernel/mips-cpc.c: In function 'mips_cpc_unlock_other':
arch/mips/kernel/mips-cpc.c:117:23: error: passing argument 1 of 'cpu_core' makes integer from pointer without a cast [-Werror=int-conversion]
117 | curr_core = cpu_core(&current_cpu_data);
In file included from include/linux/topology.h:36,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from arch/mips/kernel/mips-cpc.c:9:
arch/mips/include/asm/topology.h:68:41: note: expected 'int' but argument is of type 'struct cpuinfo_mips *'
68 | static inline unsigned int cpu_core(int cpu)
| ~~~~^~~
cc1: all warnings being treated as errors

vim +/cpu_core +97 arch/mips/kernel/mips-cpc.c

76ae658465c231 Paul Burton 2014-02-14 87
76ae658465c231 Paul Burton 2014-02-14 88 void mips_cpc_lock_other(unsigned int core)
76ae658465c231 Paul Burton 2014-02-14 89 {
6b89d22e742aa3 Matt Redfearn 2016-09-07 90 unsigned int curr_core;
d6219420480b75 Matt Redfearn 2016-09-07 91
d6219420480b75 Matt Redfearn 2016-09-07 92 if (mips_cm_revision() >= CM_REV_CM3)
d6219420480b75 Matt Redfearn 2016-09-07 93 /* Systems with CM >= 3 lock the CPC via mips_cm_lock_other */
d6219420480b75 Matt Redfearn 2016-09-07 94 return;
d6219420480b75 Matt Redfearn 2016-09-07 95
76ae658465c231 Paul Burton 2014-02-14 96 preempt_disable();
f875a832d20285 Paul Burton 2017-08-12 @97 curr_core = cpu_core(&current_cpu_data);
76ae658465c231 Paul Burton 2014-02-14 98 spin_lock_irqsave(&per_cpu(cpc_core_lock, curr_core),
76ae658465c231 Paul Burton 2014-02-14 99 per_cpu(cpc_core_lock_flags, curr_core));
829ca2be9c55c7 Paul Burton 2017-08-12 100 write_cpc_cl_other(core << __ffs(CPC_Cx_OTHER_CORENUM));
78a54c4d8e5a79 Paul Burton 2015-09-22 101
78a54c4d8e5a79 Paul Burton 2015-09-22 102 /*
78a54c4d8e5a79 Paul Burton 2015-09-22 103 * Ensure the core-other region reflects the appropriate core &
78a54c4d8e5a79 Paul Burton 2015-09-22 104 * VP before any accesses to it occur.
78a54c4d8e5a79 Paul Burton 2015-09-22 105 */
78a54c4d8e5a79 Paul Burton 2015-09-22 106 mb();
76ae658465c231 Paul Burton 2014-02-14 107 }
76ae658465c231 Paul Burton 2014-02-14 108

:::::: The code at line 97 was first introduced by commit
:::::: f875a832d2028523f9b53c261b67e05a359bab8b MIPS: Abstract CPU core & VP(E) ID access through accessor functions

:::::: TO: Paul Burton <paul.burton@xxxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip