[arm-platforms:hack/m1-pmu 8/8] drivers/perf/apple_m1_cpu_pmu.c:100:32: warning: initializer overrides prior initialization of this subobject
kernel test robot
lkp at intel.com
Sun Nov 14 00:25:55 PST 2021
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/m1-pmu
head: a905c66ae0b391425e9ad7f261ad7b4c33af2c07
commit: a905c66ae0b391425e9ad7f261ad7b4c33af2c07 [8/8] drivers/perf: Add Apple icestorm/firestorm CPU PMU driver
config: arm64-randconfig-r036-20211114 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=a905c66ae0b391425e9ad7f261ad7b4c33af2c07
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms hack/m1-pmu
git checkout a905c66ae0b391425e9ad7f261ad7b4c33af2c07
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
>> drivers/perf/apple_m1_cpu_pmu.c:100:32: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
[M1_PMU_PERFCTR_UNKNOWN_01] = BIT(7),
^~~~~~
include/vdso/bits.h:7:19: note: expanded from macro 'BIT'
#define BIT(nr) (UL(1) << (nr))
^~~~~~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:99:32: note: previous initialization is here
[0 ... M1_PMU_PERFCTR_LAST] = ANY_BUT_0_1,
^~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:25:23: note: expanded from macro 'ANY_BUT_0_1'
#define ANY_BUT_0_1 GENMASK(9, 2)
^~~~~~~~~~~~~
include/linux/bits.h:38:2: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:101:32: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
[M1_PMU_PERFCTR_CPU_CYCLES] = ANY_BUT_0_1 | BIT(0),
^~~~~~~~~~~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:25:23: note: expanded from macro 'ANY_BUT_0_1'
#define ANY_BUT_0_1 GENMASK(9, 2)
^
include/linux/bits.h:38:2: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^
drivers/perf/apple_m1_cpu_pmu.c:99:32: note: previous initialization is here
[0 ... M1_PMU_PERFCTR_LAST] = ANY_BUT_0_1,
^~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:25:23: note: expanded from macro 'ANY_BUT_0_1'
#define ANY_BUT_0_1 GENMASK(9, 2)
^~~~~~~~~~~~~
include/linux/bits.h:38:2: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:102:34: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
[M1_PMU_PERFCTR_INSTRUCTIONS] = BIT(7) | BIT(1),
^~~~~~~~~~~~~~~
include/vdso/bits.h:7:19: note: expanded from macro 'BIT'
#define BIT(nr) (UL(1) << (nr))
^
drivers/perf/apple_m1_cpu_pmu.c:99:32: note: previous initialization is here
[0 ... M1_PMU_PERFCTR_LAST] = ANY_BUT_0_1,
^~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:25:23: note: expanded from macro 'ANY_BUT_0_1'
#define ANY_BUT_0_1 GENMASK(9, 2)
^~~~~~~~~~~~~
include/linux/bits.h:38:2: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:103:32: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
[M1_PMU_PERFCTR_UNKNOWN_8d] = ONLY_5_6_7,
^~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:28:22: note: expanded from macro 'ONLY_5_6_7'
#define ONLY_5_6_7 GENMASK(7, 5)
^~~~~~~~~~~~~
include/linux/bits.h:38:2: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:99:32: note: previous initialization is here
[0 ... M1_PMU_PERFCTR_LAST] = ANY_BUT_0_1,
^~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:25:23: note: expanded from macro 'ANY_BUT_0_1'
#define ANY_BUT_0_1 GENMASK(9, 2)
^~~~~~~~~~~~~
include/linux/bits.h:38:2: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:104:32: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
[M1_PMU_PERFCTR_UNKNOWN_8e] = ONLY_5_6_7,
^~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:28:22: note: expanded from macro 'ONLY_5_6_7'
#define ONLY_5_6_7 GENMASK(7, 5)
^~~~~~~~~~~~~
include/linux/bits.h:38:2: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:99:32: note: previous initialization is here
[0 ... M1_PMU_PERFCTR_LAST] = ANY_BUT_0_1,
^~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:25:23: note: expanded from macro 'ANY_BUT_0_1'
#define ANY_BUT_0_1 GENMASK(9, 2)
^~~~~~~~~~~~~
include/linux/bits.h:38:2: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:105:32: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
[M1_PMU_PERFCTR_UNKNOWN_8f] = ONLY_5_6_7,
^~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:28:22: note: expanded from macro 'ONLY_5_6_7'
#define ONLY_5_6_7 GENMASK(7, 5)
^~~~~~~~~~~~~
include/linux/bits.h:38:2: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:99:32: note: previous initialization is here
[0 ... M1_PMU_PERFCTR_LAST] = ANY_BUT_0_1,
^~~~~~~~~~~
drivers/perf/apple_m1_cpu_pmu.c:25:23: note: expanded from macro 'ANY_BUT_0_1'
#define ANY_BUT_0_1 GENMASK(9, 2)
^~~~~~~~~~~~~
include/linux/bits.h:38:2: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
vim +100 drivers/perf/apple_m1_cpu_pmu.c
91
92 /*
93 * Per-event affinity table. Most events can be installed on counter
94 * 2-9, but there are a numbre of exceptions. Note that this table
95 * has been created experimentally, and I wouldn't be surprised if more
96 * counters had strange affinities.
97 */
98 static const u16 m1_pmu_event_affinity[M1_PMU_PERFCTR_LAST + 1] = {
99 [0 ... M1_PMU_PERFCTR_LAST] = ANY_BUT_0_1,
> 100 [M1_PMU_PERFCTR_UNKNOWN_01] = BIT(7),
101 [M1_PMU_PERFCTR_CPU_CYCLES] = ANY_BUT_0_1 | BIT(0),
102 [M1_PMU_PERFCTR_INSTRUCTIONS] = BIT(7) | BIT(1),
103 [M1_PMU_PERFCTR_UNKNOWN_8d] = ONLY_5_6_7,
104 [M1_PMU_PERFCTR_UNKNOWN_8e] = ONLY_5_6_7,
105 [M1_PMU_PERFCTR_UNKNOWN_8f] = ONLY_5_6_7,
106 [M1_PMU_PERFCTR_UNKNOWN_90] = ONLY_5_6_7,
107 [M1_PMU_PERFCTR_UNKNOWN_93] = ONLY_5_6_7,
108 [M1_PMU_PERFCTR_UNKNOWN_94] = ONLY_5_6_7,
109 [M1_PMU_PERFCTR_UNKNOWN_95] = ONLY_5_6_7,
110 [M1_PMU_PERFCTR_UNKNOWN_96] = ONLY_5_6_7,
111 [M1_PMU_PERFCTR_UNKNOWN_97] = BIT(7),
112 [M1_PMU_PERFCTR_UNKNOWN_98] = ONLY_5_6_7,
113 [M1_PMU_PERFCTR_UNKNOWN_99] = ONLY_5_6_7,
114 [M1_PMU_PERFCTR_UNKNOWN_9a] = BIT(7),
115 [M1_PMU_PERFCTR_UNKNOWN_9b] = ONLY_5_6_7,
116 [M1_PMU_PERFCTR_UNKNOWN_9c] = ONLY_5_6_7,
117 [M1_PMU_PERFCTR_UNKNOWN_9f] = BIT(7),
118 [M1_PMU_PERFCTR_UNKNOWN_bf] = ONLY_5_6_7,
119 [M1_PMU_PERFCTR_UNKNOWN_c0] = ONLY_5_6_7,
120 [M1_PMU_PERFCTR_UNKNOWN_c1] = ONLY_5_6_7,
121 [M1_PMU_PERFCTR_UNKNOWN_c4] = ONLY_5_6_7,
122 [M1_PMU_PERFCTR_UNKNOWN_c5] = ONLY_5_6_7,
123 [M1_PMU_PERFCTR_UNKNOWN_c6] = ONLY_5_6_7,
124 [M1_PMU_PERFCTR_UNKNOWN_c8] = ONLY_5_6_7,
125 [M1_PMU_PERFCTR_UNKNOWN_ca] = ONLY_5_6_7,
126 [M1_PMU_PERFCTR_UNKNOWN_cb] = ONLY_5_6_7,
127 [M1_PMU_PERFCTR_UNKNOWN_f5] = ONLY_2_4_6,
128 [M1_PMU_PERFCTR_UNKNOWN_f6] = ONLY_2_4_6,
129 [M1_PMU_PERFCTR_UNKNOWN_f7] = ONLY_2_4_6,
130 [M1_PMU_PERFCTR_UNKNOWN_f8] = ONLY_2_TO_7,
131 [M1_PMU_PERFCTR_UNKNOWN_fd] = ONLY_2_4_6,
132 };
133
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 41842 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20211114/6b35b47f/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list