* [PATCH 14/38] coresight: Replace deprecated CPU-hotplug functions.
[not found] <20210803141621.780504-1-bigeasy@linutronix.de>
@ 2021-08-03 14:15 ` Sebastian Andrzej Siewior
2021-08-03 15:52 ` Mathieu Poirier
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2021-08-03 14:15 UTC (permalink / raw)
To: linux-kernel
Cc: tglx, Peter Zijlstra, Sebastian Andrzej Siewior, Mathieu Poirier,
Suzuki K Poulose, Mike Leach, Leo Yan, Alexander Shishkin,
coresight, linux-arm-kernel
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: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/hwtracing/coresight/coresight-cpu-debug.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-cpu-debug.c b/drivers/hwtracing/coresight/coresight-cpu-debug.c
index 9731d3a960735..00de46565bc40 100644
--- a/drivers/hwtracing/coresight/coresight-cpu-debug.c
+++ b/drivers/hwtracing/coresight/coresight-cpu-debug.c
@@ -588,11 +588,11 @@ static int debug_probe(struct amba_device *adev, const struct amba_id *id)
drvdata->base = base;
- get_online_cpus();
+ cpus_read_lock();
per_cpu(debug_drvdata, drvdata->cpu) = drvdata;
ret = smp_call_function_single(drvdata->cpu, debug_init_arch_data,
drvdata, 1);
- put_online_cpus();
+ cpus_read_unlock();
if (ret) {
dev_err(dev, "CPU%d debug arch init failed\n", drvdata->cpu);
--
2.32.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 14/38] coresight: Replace deprecated CPU-hotplug functions.
2021-08-03 14:15 ` [PATCH 14/38] coresight: Replace deprecated CPU-hotplug functions Sebastian Andrzej Siewior
@ 2021-08-03 15:52 ` Mathieu Poirier
0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Poirier @ 2021-08-03 15:52 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: linux-kernel, tglx, Peter Zijlstra, Suzuki K Poulose, Mike Leach,
Leo Yan, Alexander Shishkin, coresight, linux-arm-kernel
On Tue, Aug 03, 2021 at 04:15:57PM +0200, Sebastian Andrzej Siewior 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: Mathieu Poirier <mathieu.poirier@linaro.org>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Mike Leach <mike.leach@linaro.org>
> Cc: Leo Yan <leo.yan@linaro.org>
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: coresight@lists.linaro.org
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> drivers/hwtracing/coresight/coresight-cpu-debug.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-cpu-debug.c b/drivers/hwtracing/coresight/coresight-cpu-debug.c
> index 9731d3a960735..00de46565bc40 100644
> --- a/drivers/hwtracing/coresight/coresight-cpu-debug.c
> +++ b/drivers/hwtracing/coresight/coresight-cpu-debug.c
> @@ -588,11 +588,11 @@ static int debug_probe(struct amba_device *adev, const struct amba_id *id)
>
> drvdata->base = base;
>
> - get_online_cpus();
> + cpus_read_lock();
> per_cpu(debug_drvdata, drvdata->cpu) = drvdata;
> ret = smp_call_function_single(drvdata->cpu, debug_init_arch_data,
> drvdata, 1);
> - put_online_cpus();
> + cpus_read_unlock();
>
Applied - thanks,
Mathieu
> if (ret) {
> dev_err(dev, "CPU%d debug arch init failed\n", drvdata->cpu);
> --
> 2.32.0
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-03 15:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210803141621.780504-1-bigeasy@linutronix.de>
2021-08-03 14:15 ` [PATCH 14/38] coresight: Replace deprecated CPU-hotplug functions Sebastian Andrzej Siewior
2021-08-03 15:52 ` Mathieu Poirier
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).