From: Beata Michalska <beata.michalska@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Yury Norov <yury.norov@gmail.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Will Deacon <will@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the bitmap tree
Date: Tue, 18 Feb 2025 20:28:56 +0100 [thread overview]
Message-ID: <Z7TfeGxiy3_otBry@arm.com> (raw)
In-Reply-To: <Z7TQIYRPw6nxsa0K@arm.com>
On Tue, Feb 18, 2025 at 06:23:29PM +0000, Catalin Marinas wrote:
> On Tue, Feb 18, 2025 at 09:16:34AM -0500, Yury Norov wrote:
> > On Tue, Feb 18, 2025 at 02:10:25PM +0000, Catalin Marinas wrote:
> > > Hi Stephen,
> > >
> > > On Wed, Feb 19, 2025 at 12:49:34AM +1100, Stephen Rothwell wrote:
> > > > On Tue, 18 Feb 2025 11:35:02 +0100 Beata Michalska <beata.michalska@arm.com> wrote:
> > > > > I'm currently testing a proper fix for that one.
> > > > > Should I just send it over as a diff to apply or rather a proper 'fixes' patch?
> > > >
> > > > Maybe a proper 'fixes' patch, please, if easy - otherwise a diff is
> > > > fine.
> > >
> > > I just talked to Beata off-list. I think she'll try to use the current
> > > for_each_cpu_wrap() API and avoid conflicts with the cpumask_next_wrap()
> > > API change.
> >
> > Hi,
> >
> > Yes, for_each() loops are always preferable over opencoded iterating.
> > Please feel free to CC me in case I can help.
>
> Beata is going to post the official fix but in the meantime, to avoid
> breaking next, I'll add my temporary fix:
>
Just posted the fix [1].
Thank you all.
---
[1] https://lore.kernel.org/linux-next/20250218192412.2072619-1-beata.michalska@arm.com/T/#u
---
BR
Beata
> --------8<--------------------------------
> From 1b12139107798128c183838c5f4a3f7ffcea1e44 Mon Sep 17 00:00:00 2001
> From: Catalin Marinas <catalin.marinas@arm.com>
> Date: Tue, 18 Feb 2025 18:20:46 +0000
> Subject: [PATCH] arm64: Do not use the deprecated cpumask_next_wrap() in
> arch_freq_get_on_cpu()
>
> cpumask_next_wrap() will soon disappear in its current form. Use
> for_each_cpu_wrap() instead.
>
> Fixes: 16d1e27475f6 ("arm64: Provide an AMU-based version of arch_freq_get_on_cpu")
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> ---
> arch/arm64/kernel/topology.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
> index a09b0551ec59..1544d3648554 100644
> --- a/arch/arm64/kernel/topology.c
> +++ b/arch/arm64/kernel/topology.c
> @@ -254,7 +254,7 @@ int arch_freq_get_on_cpu(int cpu)
> if (!housekeeping_cpu(cpu, HK_TYPE_TICK) ||
> time_is_before_jiffies(last_update + msecs_to_jiffies(AMU_SAMPLE_EXP_MS))) {
> struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
> - int ref_cpu = cpu;
> + int ref_cpu;
>
> if (!policy)
> return -EINVAL;
> @@ -265,11 +265,10 @@ int arch_freq_get_on_cpu(int cpu)
> return -EOPNOTSUPP;
> }
>
> - do {
> - ref_cpu = cpumask_next_wrap(ref_cpu, policy->cpus,
> - start_cpu, true);
> -
> - } while (ref_cpu < nr_cpu_ids && idle_cpu(ref_cpu));
> + for_each_cpu_wrap(ref_cpu, policy->cpus, start_cpu) {
> + if (!idle_cpu(ref_cpu))
> + break;
> + }
>
> cpufreq_cpu_put(policy);
>
>
next prev parent reply other threads:[~2025-02-18 19:29 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 5:07 linux-next: build failure after merge of the bitmap tree Stephen Rothwell
2025-02-18 10:35 ` Beata Michalska
2025-02-18 13:49 ` Stephen Rothwell
2025-02-18 14:10 ` Catalin Marinas
2025-02-18 14:16 ` Yury Norov
2025-02-18 18:23 ` Catalin Marinas
2025-02-18 19:28 ` Beata Michalska [this message]
2025-02-18 19:44 ` Catalin Marinas
-- strict thread matches above, loose matches on Subject: below --
2025-11-25 7:24 Stephen Rothwell
2025-11-25 8:05 ` Geert Uytterhoeven
2025-11-25 8:31 ` Miquel Raynal
2025-11-25 8:37 ` Geert Uytterhoeven
2025-11-25 14:44 ` Yury Norov
2025-11-25 14:55 ` Miquel Raynal
2025-11-25 8:53 ` Miquel Raynal
2025-11-28 8:17 ` Miquel Raynal
2024-05-08 6:27 Stephen Rothwell
2024-05-08 13:24 ` Kuan-Wei Chiu
2024-05-08 22:18 ` Yury Norov
2023-10-20 4:49 Stephen Rothwell
2023-10-19 6:01 Stephen Rothwell
2023-10-19 15:58 ` Yury Norov
2023-10-20 4:24 ` Yury Norov
2023-10-20 4:51 ` Stephen Rothwell
2023-10-20 12:33 ` Yury Norov
2023-11-02 11:41 ` Alexander Lobakin
2022-09-26 23:53 broonie
2022-09-27 0:37 ` Yury Norov
2022-09-27 18:56 ` Mark Brown
2022-09-20 8:08 Stephen Rothwell
2022-09-20 14:49 ` Yury Norov
2022-07-27 10:29 Stephen Rothwell
2022-07-22 9:16 Stephen Rothwell
2022-07-22 19:29 ` Yury Norov
2022-07-15 10:29 Stephen Rothwell
2022-07-08 7:47 Stephen Rothwell
2022-05-02 8:15 Stephen Rothwell
2022-04-19 4:29 Stephen Rothwell
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=Z7TfeGxiy3_otBry@arm.com \
--to=beata.michalska@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=will@kernel.org \
--cc=yury.norov@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).