Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3296640imu; Sun, 11 Nov 2018 11:49:02 -0800 (PST) X-Google-Smtp-Source: AJdET5c+epDOMirNQtCZ3Ij8pUCyFp1rd+Aa80XL49R26LX0bQg+YdUac/OWew3DXiEqY1vDZDlW X-Received: by 2002:a17:902:3e3:: with SMTP id d90-v6mr17117892pld.118.1541965742764; Sun, 11 Nov 2018 11:49:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541965742; cv=none; d=google.com; s=arc-20160816; b=ttRss5v5Dnb9Lz2VgenFC2q2HbFlELM5YKt7ru715QNEAeMOO7B69Cdl8Zh4VVrSRy xxSFQtnAMNQUXULOHrRXzc5aIo/hwM0dZkpb8Y2xBVOvB6VtTfw/W/kjnw2OJccNDr3I x9G0kFw5MAAvf8Yg8FsCySA0ZGLREizwni+Oaz4Nlwx/XwYH2PRsVVyafV1OFaNcdHWj sCFc5d/EKbywa9ElvMdybuv72x53e22xUnynQ6AISvwUuC/m6MhqgvugETQJb52hdvDg 9lWj15VCLHY67eJnKlnwckjXSuM9tqkeKHJ5UVB82rC2pbwDkRG/T8YvV/LZQGt43tFN TIGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from; bh=jmjvRfhS4s2xpR+RXiQJkjNnbMNjuCJCoGNpVIc2WFg=; b=nqefvCZlwzHpK/coOmupaOAYA7dRcemj0UUscoYIzKettjq7pOlgC0BGHd4Z4ldcGl +3/1CMXHvDfHdO9gHoVP6WFUzp9v4w6ENbYAh5W3GGy20F91iWqDD6tn7okSnMYrlbEL BSOrkiO3mhlp06iPwR3iooLl39BewLvXjQoXEXU1+4TsS+H8OIFf6hiwRdsdjYUM08Ig NOnUoUgRF9L3uvbgK8/viYXkULwDjXHkAnprnQicKISdbCigLCrnbN2bfNCZvNxXXYAM ftKsqYmo491uYbEo6U9R3NhA7JLhXkCYPa0pv1O4EOclt0gQ4FBWOQOJXfNv5snZlBdn 8IqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14-v6si16327544pfw.217.2018.11.11.11.48.47; Sun, 11 Nov 2018 11:49:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729626AbeKLFhM (ORCPT + 99 others); Mon, 12 Nov 2018 00:37:12 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33760 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727117AbeKLFdq (ORCPT ); Mon, 12 Nov 2018 00:33:46 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wABJiAYg052589 for ; Sun, 11 Nov 2018 14:44:21 -0500 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0a-001b2d01.pphosted.com with ESMTP id 2npdjvhcsd-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 11 Nov 2018 14:44:20 -0500 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 11 Nov 2018 19:44:19 -0000 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sun, 11 Nov 2018 19:44:13 -0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wABJiC2762849196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 11 Nov 2018 19:44:12 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EC6BCB205F; Sun, 11 Nov 2018 19:44:11 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CED22B206A; Sun, 11 Nov 2018 19:44:11 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.85.207.24]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Sun, 11 Nov 2018 19:44:11 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id AEEF116C5DA4; Sun, 11 Nov 2018 11:44:12 -0800 (PST) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, "Paul E. McKenney" , Realtek linux nic maintainers , "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH tip/core/rcu 12/41] ethernet/realtek: Replace synchronize_sched() with synchronize_rcu() Date: Sun, 11 Nov 2018 11:43:41 -0800 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181111194104.GA4787@linux.ibm.com> References: <20181111194104.GA4787@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18111119-0072-0000-0000-000003C6F39E X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010028; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01116019; UDB=6.00577118; IPR=6.00896119; MB=3.00024114; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-11 19:44:17 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18111119-0073-0000-0000-00004A13483C Message-Id: <20181111194410.6368-12-paulmck@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-11_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811110188 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney Cc: Realtek linux nic maintainers Cc: "David S. Miller" Cc: --- drivers/net/ethernet/realtek/8139too.c | 2 +- drivers/net/ethernet/realtek/r8169.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c index ffd68a7bc9e1..69d752f0b621 100644 --- a/drivers/net/ethernet/realtek/8139too.c +++ b/drivers/net/ethernet/realtek/8139too.c @@ -1661,7 +1661,7 @@ static void rtl8139_tx_timeout_task (struct work_struct *work) napi_disable(&tp->napi); netif_stop_queue(dev); - synchronize_sched(); + synchronize_rcu(); netdev_dbg(dev, "Transmit timeout, status %02x %04x %04x media %02x\n", RTL_R8(ChipCmd), RTL_R16(IntrStatus), diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 1fd01688d37b..4f1d89f0dc24 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -5866,7 +5866,7 @@ static void rtl_reset_work(struct rtl8169_private *tp) napi_disable(&tp->napi); netif_stop_queue(dev); - synchronize_sched(); + synchronize_rcu(); rtl8169_hw_reset(tp); @@ -6609,7 +6609,7 @@ static void rtl8169_down(struct net_device *dev) rtl8169_rx_missed(dev); /* Give a racing hard_start_xmit a few cycles to complete. */ - synchronize_sched(); + synchronize_rcu(); rtl8169_tx_clear(tp); -- 2.17.1