coresight: Replace deprecated CPU-hotplug functions.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 18 Aug 2021 19:40:22 +0000 (13:40 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Aug 2021 20:33:28 +0000 (22:33 +0200)
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.

Link: https://lore.kernel.org/r/20210803141621.780504-15-bigeasy@linutronix.de
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>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20210818194022.379573-12-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-cpu-debug.c

index 9731d3a..00de465 100644 (file)
@@ -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);