From patchwork Sun Mar 25 14:39:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10306633 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 74946600F6 for ; Sun, 25 Mar 2018 14:39:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63B96281B7 for ; Sun, 25 Mar 2018 14:39:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 57F0128DC9; Sun, 25 Mar 2018 14:39:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35AA2281B7 for ; Sun, 25 Mar 2018 14:39:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753406AbeCYOje (ORCPT ); Sun, 25 Mar 2018 10:39:34 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59072 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751094AbeCYOja (ORCPT ); Sun, 25 Mar 2018 10:39:30 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 78C1C60C64; Sun, 25 Mar 2018 14:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521988769; bh=UFFOJEvdJGTDlskSZ9RxFXJXMm/Hcw+E4NHzfNse+5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SWlzbhVZl55T/1rzNjJT0qFA8f5FAhUPJPt8bTxX/YYQA8VWSUsFzgE36ec6DQlI9 cz/tupq8FYwITeSzwbrwCVXKsJwAXJM1SQzykeWR7w5tqBgFATc4Sg6dgWzi98sBwu /x1dm6+INKkaCYK2DCSTNY8Vn983jkgKpGUUDBow= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E98C16030F; Sun, 25 Mar 2018 14:39:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521988768; bh=UFFOJEvdJGTDlskSZ9RxFXJXMm/Hcw+E4NHzfNse+5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W8lumr2by+FziaFb/xuqW+c4d+6POi0UFBHsGSVknhAdRCDTmU/p6eJxad9vjKUUh R5JZdEWGCy7Bn2Mh1WFssliqLVpz+R8lYcSp6SXhKCJAjIGrD3PJtI0wQDl0dg+Bwv XrF3kND5GuTBk+o1PyuGNO5dqSbVFS/XSfIBIKP8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E98C16030F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: netdev@vger.kernel.org, timur@codeaurora.org, sulrich@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , Harish Patil , Manish Chopra , Dept-GELinuxNICDev@cavium.com, linux-kernel@vger.kernel.org Subject: [PATCH v7 2/7] qlcnic: Eliminate duplicate barriers on weakly-ordered archs Date: Sun, 25 Mar 2018 10:39:16 -0400 Message-Id: <1521988761-30344-3-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521988761-30344-1-git-send-email-okaya@codeaurora.org> References: <1521988761-30344-1-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_relaxed(). Signed-off-by: Sinan Kaya Acked-by: Manish Chopra --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c index 46b0372..97c146e7 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c @@ -478,7 +478,7 @@ irqreturn_t qlcnic_83xx_clear_legacy_intr(struct qlcnic_adapter *adapter) wmb(); /* clear the interrupt trigger control register */ - writel(0, adapter->isr_int_vec); + writel_relaxed(0, adapter->isr_int_vec); intr_val = readl(adapter->isr_int_vec); do { intr_val = readl(adapter->tgt_status_reg);