From: kernel test robot <lkp@intel.com>
To: Marc Zyngier <maz@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-arm-kernel@lists.infradead.org
Subject: [arm-platforms:hack/m1-pmu 8/8] drivers/perf/apple_m1_cpu_pmu.c:100:32: warning: initializer overrides prior initialization of this subobject
Date: Sun, 14 Nov 2021 16:25:55 +0800 [thread overview]
Message-ID: <202111141650.o5b2LSZU-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 10222 bytes --]
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@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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41842 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-11-14 8:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-14 8:25 kernel test robot [this message]
2021-11-14 10:10 ` [arm-platforms:hack/m1-pmu 8/8] drivers/perf/apple_m1_cpu_pmu.c:100:32: warning: initializer overrides prior initialization of this subobject Marc Zyngier
2021-11-14 11:07 ` Ard Biesheuvel
2021-11-14 12:24 ` Miguel Ojeda
2021-11-14 21:42 ` Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202111141650.o5b2LSZU-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=maz@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox