From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2EFA71E8326; Tue, 18 Feb 2025 19:29:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739906953; cv=none; b=YIKapcL3iw5Cuz2pMqz7c9GiDDbGIg8/ncQU2vTufZVNH/bnT0jfHmFG/rkCKkajBlPybtER+8k7iIIwgyB+PJjQnutyQNggp91Ek4mDNcFjeaXEiFjDIO597JzyZKIpPvV/dqfnbhl52QuEKOW//kwgo9SbvskZwSWKB91ds3o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739906953; c=relaxed/simple; bh=EcclNsPtawoA7531dqGQGb0K0/n8bbxbWvJlA/q1vHE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=o7Lp6c2cPx23/ECuvNP+sCNhDbaERaQyptnJk7wbQqOBhEnojIYj8MReKHi3WewSV+gfuAJbETqSUkIWwoxuHEjvXYbnCti2usuWvI9FJPy6+uQwecHxzFyWMFZ6uWDGpHSd9JDHKxTe+A6gt/XznXvWWeoAhIJ/TJsqUKpoDZc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 23571152B; Tue, 18 Feb 2025 11:29:29 -0800 (PST) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2855A3F6A8; Tue, 18 Feb 2025 11:29:07 -0800 (PST) Date: Tue, 18 Feb 2025 20:28:56 +0100 From: Beata Michalska To: Catalin Marinas Cc: Yury Norov , Stephen Rothwell , Will Deacon , Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: build failure after merge of the bitmap tree Message-ID: References: <20250218160742.49d6ab76@canb.auug.org.au> <20250219004934.46ace766@canb.auug.org.au> Precedence: bulk X-Mailing-List: linux-next@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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 > 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 > --- > 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); > >