Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp835036ybl; Wed, 29 Jan 2020 10:27:20 -0800 (PST) X-Google-Smtp-Source: APXvYqxKdGJv0icfyVw6NTtDec3WqU9vQOrXWHsOZQXqC0wUA1i1K8hiNQpvozMML/PK+GjzJnHE X-Received: by 2002:aca:b70a:: with SMTP id h10mr206363oif.20.1580322440173; Wed, 29 Jan 2020 10:27:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580322440; cv=none; d=google.com; s=arc-20160816; b=q16VfzDA15DgTC+ca4R3ntzGGuuJFvn3QKebgi3xHipcZUmU9eGEQAQLlsktoHdQls eN+/WLJUdJ8E5iwLgdg8hg97voxITcjok/7lpVRBeBlqcu8SBtwsKZYkHVkj+SM55Tca Ge51r1P6/PEq4Xx5KGRJ//XvVbNCS3wJntUeI+kelkE/JpJbykppJ6KFi9pS5gZev0HD SqcGERj4TBEDoIxFDXkqPedvcXX+JYvk1xIrsGSEvb5uSqJmeaXUQUMzSKcmtmDXQsvU /KznEUHJFyouqvNZ41yBZrzRYTm/whPxCTs8F4r6xP2ojizAOwheh8rn5P1Dwm32I6A5 5d0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=ogTrY/zf/VAnArSVR2NlnJz4LiFXPD1QR37LWLZIG20=; b=d1mumomPBPFcLbSORwSPfdFKf2cVwFQqhL5jKa0Bdy0bpaKmV484K6h+e/R4/BgTlQ IID1P61t8NNB/ZVFWzTRrRi4qgvq8J8FhsJ+DFq+szljcVCmXaAPy69CpBxIjc+uCSOC YejrtGgqwwmrGdiMxu19XuUWBZWpWefljG3+HcDvH/+dnr547W+OVmyX2SOPzroiLp0K Q82k31gdcyFeCGqx2nxwr61np6cK/uF1YggAYPs/tZXc3cS9Gw/2Bv9AHRXFCG8Y7JKd W5rbUjU76UucOui8/fakDDmAkyt1fna42h8qdItx0b3KFQc3jacaxeMLLVeh1XmSp99j oN1g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j71si1340233oib.213.2020.01.29.10.27.08; Wed, 29 Jan 2020 10:27:20 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727428AbgA2SZx (ORCPT + 99 others); Wed, 29 Jan 2020 13:25:53 -0500 Received: from mx2.suse.de ([195.135.220.15]:45858 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726560AbgA2SZx (ORCPT ); Wed, 29 Jan 2020 13:25:53 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 01C25AECB; Wed, 29 Jan 2020 18:25:52 +0000 (UTC) From: Davidlohr Bueso To: oneukum@suse.com Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, dave@stgolabs.net, Davidlohr Bueso Subject: [PATCH 7/8] usb, cdc-acm: optimize barrier usage for Rmw atomic bitops Date: Wed, 29 Jan 2020 10:15:45 -0800 Message-Id: <20200129181545.25302-1-dave@stgolabs.net> X-Mailer: git-send-email 2.16.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We can avoid the unnecessary barrier on non LL/SC architectures, such as x86. Instead, use the smp_mb__after_atomic() call. Signed-off-by: Davidlohr Bueso --- drivers/usb/class/cdc-acm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 62f4fb9b362f..0bc4b558f387 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -842,7 +842,7 @@ static void acm_tty_unthrottle(struct tty_struct *tty) clear_bit(ACM_THROTTLED, &acm->flags); /* Matches the smp_mb__after_atomic() in acm_read_bulk_callback(). */ - smp_mb(); + smp_mb__after_atomic(); acm_submit_read_urbs(acm, GFP_KERNEL); } -- 2.16.4