From patchwork Tue Aug 3 14:16:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12416495 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_RED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2B47C43216 for ; Tue, 3 Aug 2021 14:17:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD4BC60BD3 for ; Tue, 3 Aug 2021 14:17:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236648AbhHCOR3 (ORCPT ); Tue, 3 Aug 2021 10:17:29 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:56910 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236569AbhHCORX (ORCPT ); Tue, 3 Aug 2021 10:17:23 -0400 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628000231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2uoO50/v7bqMCm6KdvZeuFGej/XDok02zYQUn61la+Q=; b=q209fWC/mgcf8ee5UUh02WLuwHEZJOkbdDWOqmIg3Gvv+lUDPJUOCkdDanYrqSO3Q76ewX evkXGjlIc2Wllr5yCbchHJ/yUtiog/syfaQ5vQvPmgX6MWqHqJnGM155I/M6zx1GZqPd8B IAe0tPTI8TfvOyD7QvNxr+2Cl9BDOwFcPJPzqoGjRC7MGGMsaQDRrdZdAP2FDFm2ZnmNCo lpL5BiSWcnWWL7BqdCVYu78OwkVrUU10rouVIFdzW8aTGgG9jwmC8QGKERWu2ealInkU6U 7IbLvrFieqw4ynJviuZBc593/JQ4SnEjffWX0QmX327q62TUnCTEx4601diWcg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628000231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2uoO50/v7bqMCm6KdvZeuFGej/XDok02zYQUn61la+Q=; b=qr6ly/VeWBNIbG7ikdjGJ0C3OWrZHNj4rRwhmYZY9FSxYdtfgooDNLOn2sOGznPqHnaI01 cSdCHzLg7wbNExDA== To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, Peter Zijlstra , Sebastian Andrzej Siewior , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Jakub Kicinski , virtualization@lists.linux-foundation.org, netdev@vger.kernel.org Subject: [PATCH 21/38] virtio_net: Replace deprecated CPU-hotplug functions. Date: Tue, 3 Aug 2021 16:16:04 +0200 Message-Id: <20210803141621.780504-22-bigeasy@linutronix.de> In-Reply-To: <20210803141621.780504-1-bigeasy@linutronix.de> References: <20210803141621.780504-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org 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" Cc: Jason Wang Cc: "David S. Miller" Cc: Jakub Kicinski Cc: virtualization@lists.linux-foundation.org Cc: netdev@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- 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; From patchwork Tue Aug 3 14:16:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12416497 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CBBCC4320A for ; Tue, 3 Aug 2021 14:17:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1764860E97 for ; Tue, 3 Aug 2021 14:17:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236673AbhHCORb (ORCPT ); Tue, 3 Aug 2021 10:17:31 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:57036 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236473AbhHCORX (ORCPT ); Tue, 3 Aug 2021 10:17:23 -0400 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628000231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YJCTTyLFQs7CESiqKFiNcjPz5Rqmd8DPP0BSu23XP8Y=; b=jiXwz5H4tydaMM7Ymbpz0SVGcpb9T59NjRRDIuDEofuku3rQhkH7Ewlbum4yDgVx8xTexo BKqX+C73axfVqyAnVrhQ5yMJhSJl2Q0YbZ18lFm/3v3vx46TH44B8qDBNueX29bPnrfCqF ybvXsqWimmOuSNOJWBns7OVLngzmfUl4wDs3mZeU1BWFPH0d2z0BhxkoxgwWZ9k+YiJi5H Cn9DOJmj4DDyJe4AMQTQg3rfsCFnR4TyHN9dzUmsB+PTIoBndI0qiHvTejaCq7WozfP7gS TgJfp1BdGV/JY1nS43GzlvDsxW9IDjMsqmPMUg6nj2J/wwaODWLYWy5S4GvkDQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628000231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YJCTTyLFQs7CESiqKFiNcjPz5Rqmd8DPP0BSu23XP8Y=; b=I1pw6idI4jy8GIdu/nypT4+VrP973M2qt30B4F9UGNgFmMNXIcl9XudkdlcNxayDTKCcb0 lARKrV9SjSNMVPCg== To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, Peter Zijlstra , Sebastian Andrzej Siewior , Julian Wiedmann , Karsten Graul , "David S. Miller" , Jakub Kicinski , linux-s390@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 22/38] net/af_iucv: Replace deprecated CPU-hotplug functions. Date: Tue, 3 Aug 2021 16:16:05 +0200 Message-Id: <20210803141621.780504-23-bigeasy@linutronix.de> In-Reply-To: <20210803141621.780504-1-bigeasy@linutronix.de> References: <20210803141621.780504-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org 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: Julian Wiedmann Cc: Karsten Graul Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-s390@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- net/iucv/iucv.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index e6795d5a546a0..2b29e55a09b92 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -500,14 +500,14 @@ static void iucv_setmask_mp(void) { int cpu; - get_online_cpus(); + cpus_read_lock(); for_each_online_cpu(cpu) /* Enable all cpus with a declared buffer. */ if (cpumask_test_cpu(cpu, &iucv_buffer_cpumask) && !cpumask_test_cpu(cpu, &iucv_irq_cpumask)) smp_call_function_single(cpu, iucv_allow_cpu, NULL, 1); - put_online_cpus(); + cpus_read_unlock(); } /** @@ -540,7 +540,7 @@ static int iucv_enable(void) size_t alloc_size; int cpu, rc; - get_online_cpus(); + cpus_read_lock(); rc = -ENOMEM; alloc_size = iucv_max_pathid * sizeof(struct iucv_path); iucv_path_table = kzalloc(alloc_size, GFP_KERNEL); @@ -553,12 +553,12 @@ static int iucv_enable(void) if (cpumask_empty(&iucv_buffer_cpumask)) /* No cpu could declare an iucv buffer. */ goto out; - put_online_cpus(); + cpus_read_unlock(); return 0; out: kfree(iucv_path_table); iucv_path_table = NULL; - put_online_cpus(); + cpus_read_unlock(); return rc; } @@ -571,11 +571,11 @@ static int iucv_enable(void) */ static void iucv_disable(void) { - get_online_cpus(); + cpus_read_lock(); on_each_cpu(iucv_retrieve_cpu, NULL, 1); kfree(iucv_path_table); iucv_path_table = NULL; - put_online_cpus(); + cpus_read_unlock(); } static int iucv_cpu_dead(unsigned int cpu) @@ -784,7 +784,7 @@ static int iucv_reboot_event(struct notifier_block *this, if (cpumask_empty(&iucv_irq_cpumask)) return NOTIFY_DONE; - get_online_cpus(); + cpus_read_lock(); on_each_cpu_mask(&iucv_irq_cpumask, iucv_block_cpu, NULL, 1); preempt_disable(); for (i = 0; i < iucv_max_pathid; i++) { @@ -792,7 +792,7 @@ static int iucv_reboot_event(struct notifier_block *this, iucv_sever_pathid(i, NULL); } preempt_enable(); - put_online_cpus(); + cpus_read_unlock(); iucv_disable(); return NOTIFY_DONE; } From patchwork Tue Aug 3 14:16:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12416499 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E76DFC4338F for ; Tue, 3 Aug 2021 14:17:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D0C2460FA0 for ; Tue, 3 Aug 2021 14:17:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236702AbhHCORj (ORCPT ); Tue, 3 Aug 2021 10:17:39 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:56924 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236584AbhHCORX (ORCPT ); Tue, 3 Aug 2021 10:17:23 -0400 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628000231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O5i4Y2RCfAfFAxzEFzPqszjZ0rjjpiENVurGeGvivvM=; b=cecwzRhJuZj+i7Bqg16Fn8Aiwv+37sFwYAvLc6Co9yXkLNb538lhpx23UnXb5HHPw2jZuf muMdsSlXEAeqqzwCqzFogxTMWql+3LdYMzpkG57AMTiDKwemxv8dmPCL/WAk1OZ+v6ER1/ 0KnKExN+BST1br/u4GDWrfjZ+Re9SH5GkmwHaYt6IiN9sxuadjBx2N901c4WtRHZKGMeRn CxCpG1k7wY8sGGk4m+fMSO1u9hyPS1fTGbyVPYaeZ8tDOnqiJxXSl3XLG+K+ev3iEgLi68 Uyi6vkbSSNi0wajGwZUB+1/OWIxZvSROFgMg3Oh3DpvJNrmlxOpuKqlYsPmAFw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628000231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O5i4Y2RCfAfFAxzEFzPqszjZ0rjjpiENVurGeGvivvM=; b=QmlxMsyeQZiVf8j7NqyG4xufJd51umRLAIJMaja7CrPrO96hG22maRpKxUudtEcy5Mkr4e P8305N3XN+nNBTCw== To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, Peter Zijlstra , Sebastian Andrzej Siewior , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org Subject: [PATCH 23/38] net: Replace deprecated CPU-hotplug functions. Date: Tue, 3 Aug 2021 16:16:06 +0200 Message-Id: <20210803141621.780504-24-bigeasy@linutronix.de> In-Reply-To: <20210803141621.780504-1-bigeasy@linutronix.de> References: <20210803141621.780504-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org 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: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- net/core/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 8f1a47ad6781a..5ea4d0b34c8c9 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5876,7 +5876,7 @@ static void flush_all_backlogs(void) */ ASSERT_RTNL(); - get_online_cpus(); + cpus_read_lock(); cpumask_clear(&flush_cpus); for_each_online_cpu(cpu) { @@ -5894,7 +5894,7 @@ static void flush_all_backlogs(void) for_each_cpu(cpu, &flush_cpus) flush_work(per_cpu_ptr(&flush_works, cpu)); - put_online_cpus(); + cpus_read_unlock(); } /* Pass the currently batched GRO_NORMAL SKBs up to the stack. */