From: kernel test robot <lkp@intel.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
x86@kernel.org, Ingo Molnar <mingo@kernel.org>,
Qais Yousef <qyousef@layalina.io>,
Lukasz Luba <lukasz.luba@arm.com>
Subject: [tip:sched/core 26/27] drivers/base/arch_topology.c:204:17: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Thu, 25 Apr 2024 07:22:20 +0800 [thread overview]
Message-ID: <202404250740.VhQQoD7N-lkp@intel.com> (raw)
Hi Vincent,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
head: 97450eb909658573dcacc1063b06d3d08642c0c1
commit: d4dbc991714eefcbd8d54a3204bd77a0a52bd32d [26/27] sched/cpufreq: Rename arch_update_thermal_pressure() => arch_update_hw_pressure()
config: arm64-randconfig-r132-20240425 (https://download.01.org/0day-ci/archive/20240425/202404250740.VhQQoD7N-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240425/202404250740.VhQQoD7N-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404250740.VhQQoD7N-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/base/arch_topology.c:204:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
drivers/base/arch_topology.c:204:17: sparse: expected void const [noderef] __percpu *__vpp_verify
drivers/base/arch_topology.c:204:17: sparse: got unsigned long *
>> drivers/base/arch_topology.c:204:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
drivers/base/arch_topology.c:204:17: sparse: expected void const [noderef] __percpu *__vpp_verify
drivers/base/arch_topology.c:204:17: sparse: got unsigned long *
>> drivers/base/arch_topology.c:204:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
drivers/base/arch_topology.c:204:17: sparse: expected void const [noderef] __percpu *__vpp_verify
drivers/base/arch_topology.c:204:17: sparse: got unsigned long *
>> drivers/base/arch_topology.c:204:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
drivers/base/arch_topology.c:204:17: sparse: expected void const [noderef] __percpu *__vpp_verify
drivers/base/arch_topology.c:204:17: sparse: got unsigned long *
>> drivers/base/arch_topology.c:204:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
drivers/base/arch_topology.c:204:17: sparse: expected void const [noderef] __percpu *__vpp_verify
drivers/base/arch_topology.c:204:17: sparse: got unsigned long *
>> drivers/base/arch_topology.c:204:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
drivers/base/arch_topology.c:204:17: sparse: expected void const [noderef] __percpu *__vpp_verify
drivers/base/arch_topology.c:204:17: sparse: got unsigned long *
>> drivers/base/arch_topology.c:204:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
drivers/base/arch_topology.c:204:17: sparse: expected void const [noderef] __percpu *__vpp_verify
drivers/base/arch_topology.c:204:17: sparse: got unsigned long *
vim +204 drivers/base/arch_topology.c
164
165 /**
166 * topology_update_hw_pressure() - Update HW pressure for CPUs
167 * @cpus : The related CPUs for which capacity has been reduced
168 * @capped_freq : The maximum allowed frequency that CPUs can run at
169 *
170 * Update the value of HW pressure for all @cpus in the mask. The
171 * cpumask should include all (online+offline) affected CPUs, to avoid
172 * operating on stale data when hot-plug is used for some CPUs. The
173 * @capped_freq reflects the currently allowed max CPUs frequency due to
174 * HW capping. It might be also a boost frequency value, which is bigger
175 * than the internal 'capacity_freq_ref' max frequency. In such case the
176 * pressure value should simply be removed, since this is an indication that
177 * there is no HW throttling. The @capped_freq must be provided in kHz.
178 */
179 void topology_update_hw_pressure(const struct cpumask *cpus,
180 unsigned long capped_freq)
181 {
182 unsigned long max_capacity, capacity, hw_pressure;
183 u32 max_freq;
184 int cpu;
185
186 cpu = cpumask_first(cpus);
187 max_capacity = arch_scale_cpu_capacity(cpu);
188 max_freq = arch_scale_freq_ref(cpu);
189
190 /*
191 * Handle properly the boost frequencies, which should simply clean
192 * the HW pressure value.
193 */
194 if (max_freq <= capped_freq)
195 capacity = max_capacity;
196 else
197 capacity = mult_frac(max_capacity, capped_freq, max_freq);
198
199 hw_pressure = max_capacity - capacity;
200
201 trace_hw_pressure_update(cpu, hw_pressure);
202
203 for_each_cpu(cpu, cpus)
> 204 WRITE_ONCE(per_cpu(hw_pressure, cpu), hw_pressure);
205 }
206 EXPORT_SYMBOL_GPL(topology_update_hw_pressure);
207
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-04-24 23:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 23:22 kernel test robot [this message]
2024-04-25 6:36 ` Vincent Guittot
2024-04-25 10:50 ` Yujie Liu
2024-04-25 11:13 ` Vincent Guittot
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=202404250740.VhQQoD7N-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=mingo@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=qyousef@layalina.io \
--cc=vincent.guittot@linaro.org \
--cc=x86@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
all inboxes | Powered by JetHome®