Sebastian Andrzej Siewior
2021-Aug-03 14:15 UTC
[PATCH 00/38] Replace deprecated CPU-hotplug
This is a tree wide replacement of the deprecated CPU hotplug functions which are only wrappers around the actual functions. Each patch is independent and can be picked up by the relevant maintainer. Cc: Alexander Shishkin <alexander.shishkin at linux.intel.com> Cc: Amit Kucheria <amitk at kernel.org> Cc: Andrew Morton <akpm at linux-foundation.org> Cc: Andy Lutomirski <luto at kernel.org> Cc: Arnaldo Carvalho de Melo <acme at kernel.org> Cc: Arnd Bergmann <arnd at arndb.de> Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org> Cc: Ben Segall <bsegall at google.com> Cc: Borislav Petkov <bp at alien8.de> Cc: cgroups at vger.kernel.org Cc: Christian Borntraeger <borntraeger at de.ibm.com> Cc: coresight at lists.linaro.org Cc: Daniel Bristot de Oliveira <bristot at redhat.com> Cc: Daniel Jordan <daniel.m.jordan at oracle.com> Cc: Daniel Lezcano <daniel.lezcano at linaro.org> Cc: Dave Hansen <dave.hansen at linux.intel.com> Cc: Davidlohr Bueso <dave at stgolabs.net> Cc: "David S. Miller" <davem at davemloft.net> Cc: Dietmar Eggemann <dietmar.eggemann at arm.com> Cc: Gonglei <arei.gonglei at huawei.com> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org> Cc: Guenter Roeck <linux at roeck-us.net> Cc: Hans de Goede <hdegoede at redhat.com> Cc: Heiko Carstens <hca at linux.ibm.com> Cc: Herbert Xu <herbert at gondor.apana.org.au> Cc: "H. Peter Anvin" <hpa at zytor.com> Cc: Ingo Molnar <mingo at kernel.org> Cc: Ingo Molnar <mingo at redhat.com> Cc: Jakub Kicinski <kuba at kernel.org> Cc: Jason Wang <jasowang at redhat.com> Cc: Jean Delvare <jdelvare at suse.com> Cc: Jiri Kosina <jikos at kernel.org> Cc: Jiri Olsa <jolsa at redhat.com> Cc: Joe Lawrence <joe.lawrence at redhat.com> Cc: Joel Fernandes <joel at joelfernandes.org> Cc: Johannes Weiner <hannes at cmpxchg.org> Cc: John Stultz <john.stultz at linaro.org> Cc: Jonathan Corbet <corbet at lwn.net> Cc: Josh Poimboeuf <jpoimboe at redhat.com> Cc: Josh Triplett <josh at joshtriplett.org> Cc: Julian Wiedmann <jwi at linux.ibm.com> Cc: Juri Lelli <juri.lelli at redhat.com> Cc: Karol Herbst <karolherbst at gmail.com> Cc: Karsten Graul <kgraul at linux.ibm.com> Cc: kvm-ppc at vger.kernel.org Cc: Lai Jiangshan <jiangshanlai at gmail.com> Cc: Len Brown <lenb at kernel.org> Cc: Len Brown <len.brown at intel.com> Cc: Leo Yan <leo.yan at linaro.org> Cc: linux-acpi at vger.kernel.org Cc: linux-arm-kernel at lists.infradead.org Cc: linux-crypto at vger.kernel.org Cc: linux-doc at vger.kernel.org Cc: linux-edac at vger.kernel.org Cc: linux-hwmon at vger.kernel.org Cc: linux-kernel at vger.kernel.org Cc: linux-mips at vger.kernel.org Cc: linux-mm at kvack.org Cc: linux-pm at vger.kernel.org Cc: linuxppc-dev at lists.ozlabs.org Cc: linux-raid at vger.kernel.org Cc: linux-s390 at vger.kernel.org Cc: live-patching at vger.kernel.org Cc: Mark Gross <mgross at linux.intel.com> Cc: Mark Rutland <mark.rutland at arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers at efficios.com> Cc: Mathieu Poirier <mathieu.poirier at linaro.org> Cc: Mel Gorman <mgorman at suse.de> Cc: Michael Ellerman <mpe at ellerman.id.au> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Mike Leach <mike.leach at linaro.org> Cc: Mike Travis <mike.travis at hpe.com> Cc: Miroslav Benes <mbenes at suse.cz> Cc: Namhyung Kim <namhyung at kernel.org> Cc: netdev at vger.kernel.org Cc: nouveau at lists.freedesktop.org Cc: "Paul E. McKenney" <paulmck at kernel.org> Cc: Paul Mackerras <paulus at samba.org> Cc: Pavel Machek <pavel at ucw.cz> Cc: Pekka Paalanen <ppaalanen at gmail.com> Cc: Peter Zijlstra <peterz at infradead.org> Cc: Petr Mladek <pmladek at suse.com> Cc: platform-driver-x86 at vger.kernel.org Cc: "Rafael J. Wysocki" <rjw at rjwysocki.net> Cc: rcu at vger.kernel.org Cc: Robin Holt <robinmholt at gmail.com> Cc: Song Liu <song at kernel.org> Cc: Srinivas Pandruvada <srinivas.pandruvada at linux.intel.com> Cc: Steffen Klassert <steffen.klassert at secunet.com> Cc: Stephen Boyd <sboyd at kernel.org> Cc: Steven Rostedt <rostedt at goodmis.org> Cc: Steve Wahl <steve.wahl at hpe.com> Cc: Stuart Hayes <stuart.w.hayes at gmail.com> Cc: Suzuki K Poulose <suzuki.poulose at arm.com> Cc: Tejun Heo <tj at kernel.org> Cc: Thomas Bogendoerfer <tsbogend at alpha.franken.de> Cc: Thomas Gleixner <tglx at linutronix.de> Cc: Tony Luck <tony.luck at intel.com> Cc: Vasily Gorbik <gor at linux.ibm.com> Cc: Vincent Guittot <vincent.guittot at linaro.org> Cc: Viresh Kumar <viresh.kumar at linaro.org> Cc: virtualization at lists.linux-foundation.org Cc: x86 at kernel.org Cc: Zefan Li <lizefan.x at bytedance.com> Cc: Zhang Rui <rui.zhang at intel.com> Sebastian
Sebastian Andrzej Siewior
2021-Aug-03 14:15 UTC
[Nouveau] [PATCH 06/38] x86/mmiotrace: Replace deprecated CPU-hotplug functions.
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 at goodmis.org> Cc: Ingo Molnar <mingo at kernel.org> Cc: Karol Herbst <karolherbst at gmail.com> Cc: Pekka Paalanen <ppaalanen at gmail.com> Cc: Dave Hansen <dave.hansen at linux.intel.com> Cc: Andy Lutomirski <luto at kernel.org> Cc: Peter Zijlstra <peterz at infradead.org> Cc: Thomas Gleixner <tglx at linutronix.de> Cc: Borislav Petkov <bp at alien8.de> Cc: x86 at kernel.org Cc: "H. Peter Anvin" <hpa at zytor.com> Cc: nouveau at lists.freedesktop.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.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); -- 2.32.0
Sebastian Andrzej Siewior
2021-Aug-03 14:15 UTC
[PATCH 12/38] crypto: virtio: Replace deprecated CPU-hotplug functions.
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: Gonglei <arei.gonglei at huawei.com> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Cc: Herbert Xu <herbert at gondor.apana.org.au> Cc: "David S. Miller" <davem at davemloft.net> Cc: virtualization at lists.linux-foundation.org Cc: linux-crypto at vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de> --- drivers/crypto/virtio/virtio_crypto_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypto/virtio/virtio_crypto_core.c index 080955a1dd9c0..e2375d9923087 100644 --- a/drivers/crypto/virtio/virtio_crypto_core.c +++ b/drivers/crypto/virtio/virtio_crypto_core.c @@ -187,9 +187,9 @@ static int virtcrypto_init_vqs(struct virtio_crypto *vi) if (ret) goto err_free; - get_online_cpus(); + cpus_read_lock(); virtcrypto_set_affinity(vi); - put_online_cpus(); + cpus_read_unlock(); return 0; -- 2.32.0
Sebastian Andrzej Siewior
2021-Aug-03 14:16 UTC
[PATCH 21/38] virtio_net: Replace deprecated CPU-hotplug functions.
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: "Michael S. Tsirkin" <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Cc: "David S. Miller" <davem at davemloft.net> Cc: Jakub Kicinski <kuba at kernel.org> Cc: virtualization at lists.linux-foundation.org Cc: netdev at vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de> --- drivers/net/virtio_net.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 56c3f85190938..ea551ac9e08db 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2208,14 +2208,14 @@ static int virtnet_set_channels(struct net_device *dev, if (vi->rq[0].xdp_prog) return -EINVAL; - get_online_cpus(); + cpus_read_lock(); err = _virtnet_set_queues(vi, queue_pairs); if (err) { - put_online_cpus(); + cpus_read_unlock(); goto err; } virtnet_set_affinity(vi); - put_online_cpus(); + cpus_read_unlock(); netif_set_real_num_tx_queues(dev, queue_pairs); netif_set_real_num_rx_queues(dev, queue_pairs); @@ -2970,9 +2970,9 @@ static int init_vqs(struct virtnet_info *vi) if (ret) goto err_free; - get_online_cpus(); + cpus_read_lock(); virtnet_set_affinity(vi); - put_online_cpus(); + cpus_read_unlock(); return 0; -- 2.32.0
Hi Sebastien, On 8/3/21 4:15 PM, Sebastian Andrzej Siewior wrote:> This is a tree wide replacement of the deprecated CPU hotplug functions > which are only wrappers around the actual functions. > > Each patch is independent and can be picked up by the relevant maintainer.Ok; and I take it that then also is the plan for merging these ? FWIW I'm fine with the drivers/platform/x86 patch going upstream through some other tree if its easier to keep the set together ... Regards, Hans> > Cc: Alexander Shishkin <alexander.shishkin at linux.intel.com> > Cc: Amit Kucheria <amitk at kernel.org> > Cc: Andrew Morton <akpm at linux-foundation.org> > Cc: Andy Lutomirski <luto at kernel.org> > Cc: Arnaldo Carvalho de Melo <acme at kernel.org> > Cc: Arnd Bergmann <arnd at arndb.de> > Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org> > Cc: Ben Segall <bsegall at google.com> > Cc: Borislav Petkov <bp at alien8.de> > Cc: cgroups at vger.kernel.org > Cc: Christian Borntraeger <borntraeger at de.ibm.com> > Cc: coresight at lists.linaro.org > Cc: Daniel Bristot de Oliveira <bristot at redhat.com> > Cc: Daniel Jordan <daniel.m.jordan at oracle.com> > Cc: Daniel Lezcano <daniel.lezcano at linaro.org> > Cc: Dave Hansen <dave.hansen at linux.intel.com> > Cc: Davidlohr Bueso <dave at stgolabs.net> > Cc: "David S. Miller" <davem at davemloft.net> > Cc: Dietmar Eggemann <dietmar.eggemann at arm.com> > Cc: Gonglei <arei.gonglei at huawei.com> > Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org> > Cc: Guenter Roeck <linux at roeck-us.net> > Cc: Hans de Goede <hdegoede at redhat.com> > Cc: Heiko Carstens <hca at linux.ibm.com> > Cc: Herbert Xu <herbert at gondor.apana.org.au> > Cc: "H. Peter Anvin" <hpa at zytor.com> > Cc: Ingo Molnar <mingo at kernel.org> > Cc: Ingo Molnar <mingo at redhat.com> > Cc: Jakub Kicinski <kuba at kernel.org> > Cc: Jason Wang <jasowang at redhat.com> > Cc: Jean Delvare <jdelvare at suse.com> > Cc: Jiri Kosina <jikos at kernel.org> > Cc: Jiri Olsa <jolsa at redhat.com> > Cc: Joe Lawrence <joe.lawrence at redhat.com> > Cc: Joel Fernandes <joel at joelfernandes.org> > Cc: Johannes Weiner <hannes at cmpxchg.org> > Cc: John Stultz <john.stultz at linaro.org> > Cc: Jonathan Corbet <corbet at lwn.net> > Cc: Josh Poimboeuf <jpoimboe at redhat.com> > Cc: Josh Triplett <josh at joshtriplett.org> > Cc: Julian Wiedmann <jwi at linux.ibm.com> > Cc: Juri Lelli <juri.lelli at redhat.com> > Cc: Karol Herbst <karolherbst at gmail.com> > Cc: Karsten Graul <kgraul at linux.ibm.com> > Cc: kvm-ppc at vger.kernel.org > Cc: Lai Jiangshan <jiangshanlai at gmail.com> > Cc: Len Brown <lenb at kernel.org> > Cc: Len Brown <len.brown at intel.com> > Cc: Leo Yan <leo.yan at linaro.org> > Cc: linux-acpi at vger.kernel.org > Cc: linux-arm-kernel at lists.infradead.org > Cc: linux-crypto at vger.kernel.org > Cc: linux-doc at vger.kernel.org > Cc: linux-edac at vger.kernel.org > Cc: linux-hwmon at vger.kernel.org > Cc: linux-kernel at vger.kernel.org > Cc: linux-mips at vger.kernel.org > Cc: linux-mm at kvack.org > Cc: linux-pm at vger.kernel.org > Cc: linuxppc-dev at lists.ozlabs.org > Cc: linux-raid at vger.kernel.org > Cc: linux-s390 at vger.kernel.org > Cc: live-patching at vger.kernel.org > Cc: Mark Gross <mgross at linux.intel.com> > Cc: Mark Rutland <mark.rutland at arm.com> > Cc: Mathieu Desnoyers <mathieu.desnoyers at efficios.com> > Cc: Mathieu Poirier <mathieu.poirier at linaro.org> > Cc: Mel Gorman <mgorman at suse.de> > Cc: Michael Ellerman <mpe at ellerman.id.au> > Cc: "Michael S. Tsirkin" <mst at redhat.com> > Cc: Mike Leach <mike.leach at linaro.org> > Cc: Mike Travis <mike.travis at hpe.com> > Cc: Miroslav Benes <mbenes at suse.cz> > Cc: Namhyung Kim <namhyung at kernel.org> > Cc: netdev at vger.kernel.org > Cc: nouveau at lists.freedesktop.org > Cc: "Paul E. McKenney" <paulmck at kernel.org> > Cc: Paul Mackerras <paulus at samba.org> > Cc: Pavel Machek <pavel at ucw.cz> > Cc: Pekka Paalanen <ppaalanen at gmail.com> > Cc: Peter Zijlstra <peterz at infradead.org> > Cc: Petr Mladek <pmladek at suse.com> > Cc: platform-driver-x86 at vger.kernel.org > Cc: "Rafael J. Wysocki" <rjw at rjwysocki.net> > Cc: rcu at vger.kernel.org > Cc: Robin Holt <robinmholt at gmail.com> > Cc: Song Liu <song at kernel.org> > Cc: Srinivas Pandruvada <srinivas.pandruvada at linux.intel.com> > Cc: Steffen Klassert <steffen.klassert at secunet.com> > Cc: Stephen Boyd <sboyd at kernel.org> > Cc: Steven Rostedt <rostedt at goodmis.org> > Cc: Steve Wahl <steve.wahl at hpe.com> > Cc: Stuart Hayes <stuart.w.hayes at gmail.com> > Cc: Suzuki K Poulose <suzuki.poulose at arm.com> > Cc: Tejun Heo <tj at kernel.org> > Cc: Thomas Bogendoerfer <tsbogend at alpha.franken.de> > Cc: Thomas Gleixner <tglx at linutronix.de> > Cc: Tony Luck <tony.luck at intel.com> > Cc: Vasily Gorbik <gor at linux.ibm.com> > Cc: Vincent Guittot <vincent.guittot at linaro.org> > Cc: Viresh Kumar <viresh.kumar at linaro.org> > Cc: virtualization at lists.linux-foundation.org > Cc: x86 at kernel.org > Cc: Zefan Li <lizefan.x at bytedance.com> > Cc: Zhang Rui <rui.zhang at intel.com> > > Sebastian >