Received: by 10.213.65.68 with SMTP id h4csp67510imn; Mon, 19 Mar 2018 19:54:24 -0700 (PDT) X-Google-Smtp-Source: AG47ELvJ5HElYjVD/x8TCrx4JkA5WC7HOLagfQbQXYHfhqqYdte4Q1fMvDuA2erTaq/V2TAeXNRJ X-Received: by 2002:a17:902:5a4e:: with SMTP id f14-v6mr14555372plm.116.1521514464605; Mon, 19 Mar 2018 19:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521514464; cv=none; d=google.com; s=arc-20160816; b=t7akix4BESgnmC3FwiABwzXMY6dmgo1J9E2TVwlxPggQu5vV+Q5UGQHfQVmyRKvFJW zx9miz1u6vuidYKHArvFmRuLkQaHUimWdtjmfr7vPMUkLL4Pb66XlVISO961lnwom72Q MfZeH8TIfiINkHiRQXQUprO9ER4rD7IsfD7r6lKxWPpkwvYyRY36rpTmUBctenbbFxZZ Zc5tJP4l8Tem0iugC/CYHD7kldLI6vx+kXpvZWfHTTKPjAQ8yNKHUgZM1Ex22o0JcKoM G5v6RUPYmGon2aPj1I5UHha59OA/9ysKuDoN3j+a+QYvRglJNiwNIFmLXHcGdab4YhLn TPcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=MZWNsJp/MfrOAusic2zk99IqYOkrrqq8/9uiDnCgwzs=; b=ag5Spr8Dx6+z+B1ZzguyXWcWYBrvwKa0dmo82EK+mV5N7rar91UXY55Zy71VKFkIu7 2mxqt+v6YAtBoxhYuAwYpYkJOgv/jHuwcHKi59y+1Fwh5AZIb3JKMFycxWFEdIK0Y5jP s7F1Js7YFVakzOkkGTPbT5gNDWv/d0UqbSjxv5VfMOgFqMyBxCs+cV5gpNF4R1mCpl88 08lyMqUUVXAhJ/bGSGk7Vgu+7HS5hjBtrfHM6vWlrGxYDNWc+Z14gxeFGwUSplZn9rT6 9LMAStsNilKWjcAjvyliTFe5BBQNvyIUhldp+kgFN+blaWvy4YvxR0GlbwpzfDGXQFAy C6Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=c9ew5/ZR; dkim=pass header.i=@codeaurora.org header.s=default header.b=B4nz1lhh; 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 m9-v6si568587plk.464.2018.03.19.19.54.10; Mon, 19 Mar 2018 19:54:24 -0700 (PDT) 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; dkim=pass header.i=@codeaurora.org header.s=default header.b=c9ew5/ZR; dkim=pass header.i=@codeaurora.org header.s=default header.b=B4nz1lhh; 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 S1752444AbeCTCwA (ORCPT + 99 others); Mon, 19 Mar 2018 22:52:00 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35470 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751881AbeCTCuY (ORCPT ); Mon, 19 Mar 2018 22:50:24 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6D6626110F; Tue, 20 Mar 2018 02:50:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521514223; bh=BzM+yZJ5q9W2BAsUFgfkkR8piuqEtoYenltti8oTptg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c9ew5/ZRNuBwY+V0qYnz8mGOE0PwhWBmVR5BSQBExUbfgTY7+1tAPwAfMKK/rqph5 dwqWO0mnOQpjZ4VfSSinP7AwVniCqMCa8ll9Qraaa3s3vsOojwJnRgkQnlXKCDHDg4 ML63Vo9/wYQKOWkSSCT7I1pRwSTEzJ4w+Pzu2Fos= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 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 D25546110A; Tue, 20 Mar 2018 02:50:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521514218; bh=BzM+yZJ5q9W2BAsUFgfkkR8piuqEtoYenltti8oTptg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B4nz1lhh6oIO7VqfZXv1MgJqy1jRvuz6QUixvwvypdlBppYXS3dqvKtyIv53nL0ov B8eZyNBfdVoTY70LpWk0vEz80jE0R0NNhdYahSCxU0DaQvv4lizlKkjBSa3tQITWb7 HKoUGwApJpl4DyIpsZedu4VxxaYZRUARuHgUA/Go= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D25546110A 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: linux-scsi@vger.kernel.org, timur@codeaurora.org, sulrich@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , Adaptec OEM Raid Solutions , "James E.J. Bottomley" , "Martin K. Petersen" , linux-kernel@vger.kernel.org Subject: [PATCH v4 3/7] scsi: dpt_i2o: eliminate duplicate barriers on weakly-ordered archs Date: Mon, 19 Mar 2018 22:50:03 -0400 Message-Id: <1521514207-10695-4-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521514207-10695-1-git-send-email-okaya@codeaurora.org> References: <1521514207-10695-1-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Code includes barrier() 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 --- drivers/scsi/dpt_i2o.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index fd172b0..3c1e64a 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -1300,7 +1300,7 @@ static s32 adpt_i2o_post_this(adpt_hba* pHba, u32* data, int len) wmb(); //post message - writel(m, pHba->post_port); + writel_relaxed(m, pHba->post_port); wmb(); return 0; @@ -1390,7 +1390,7 @@ static s32 adpt_i2o_reset_hba(adpt_hba* pHba) memcpy_toio(pHba->msg_addr_virt+m, msg, sizeof(msg)); wmb(); - writel(m, pHba->post_port); + writel_relaxed(m, pHba->post_port); wmb(); while(*status == 0){ @@ -2797,7 +2797,7 @@ static s32 adpt_send_nop(adpt_hba*pHba,u32 m) writel( 0,&msg[2]); wmb(); - writel(m, pHba->post_port); + writel_relaxed(m, pHba->post_port); wmb(); return 0; } -- 2.7.4