[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210803210705.2fdc9d1a@rorschach.local.home>
Date: Tue, 3 Aug 2021 21:07:05 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Karol Herbst <karolherbst@...il.com>,
Pekka Paalanen <ppaalanen@...il.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Borislav Petkov <bp@...en8.de>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, nouveau@...ts.freedesktop.org
Subject: Re: [PATCH 06/38] x86/mmiotrace: Replace deprecated CPU-hotplug
functions.
On Tue, 3 Aug 2021 16:15:49 +0200
Sebastian Andrzej Siewior <bigeasy@...utronix.de> wrote:
> The functions get_online_cpus() and put_online_cpus() have been
> deprecated during the CPU hotplug rework. They map directly to
> cpus_read_lock() and cpus_read_unlock().
>
> Replace deprecated CPU-hotplug functions with the official version.
> The behavior remains unchanged.
>
> Cc: Steven Rostedt <rostedt@...dmis.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
-- Steve
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Karol Herbst <karolherbst@...il.com>
> Cc: Pekka Paalanen <ppaalanen@...il.com>
> Cc: Dave Hansen <dave.hansen@...ux.intel.com>
> Cc: Andy Lutomirski <luto@...nel.org>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: x86@...nel.org
> Cc: "H. Peter Anvin" <hpa@...or.com>
> Cc: nouveau@...ts.freedesktop.org
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> ---
> arch/x86/mm/mmio-mod.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
> index cd768dafca9e9..933a2ebad471b 100644
> --- a/arch/x86/mm/mmio-mod.c
> +++ b/arch/x86/mm/mmio-mod.c
> @@ -376,12 +376,12 @@ static void enter_uniprocessor(void)
> goto out;
> }
>
> - get_online_cpus();
> + cpus_read_lock();
> cpumask_copy(downed_cpus, cpu_online_mask);
> cpumask_clear_cpu(cpumask_first(cpu_online_mask), downed_cpus);
> if (num_online_cpus() > 1)
> pr_notice("Disabling non-boot CPUs...\n");
> - put_online_cpus();
> + cpus_read_unlock();
>
> for_each_cpu(cpu, downed_cpus) {
> err = remove_cpu(cpu);
Powered by blists - more mailing lists