From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967400AbdDTC3I (ORCPT ); Wed, 19 Apr 2017 22:29:08 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:19796 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966609AbdDTC3G (ORCPT ); Wed, 19 Apr 2017 22:29:06 -0400 To: Sinan Kaya Cc: linux-scsi@vger.kernel.org, timur@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sathya Prakash , Chaitra P B , Suganath Prabu Subramani , "James E.J. Bottomley" , "Martin K. Petersen" , MPT-FusionLinux.pdl@broadcom.com (open list:LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)), linux-kernel@vger.kernel.org (open list) Subject: Re: [PATCH V2] scsi: mpt3sas: remove redundant wmb From: "Martin K. Petersen" Organization: Oracle Corporation References: <1491591978-17880-1-git-send-email-okaya@codeaurora.org> Date: Wed, 19 Apr 2017 22:28:30 -0400 In-Reply-To: <1491591978-17880-1-git-send-email-okaya@codeaurora.org> (Sinan Kaya's message of "Fri, 7 Apr 2017 15:06:18 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sinan Kaya writes: > Due to relaxed ordering requirements on multiple architectures, > drivers are required to use wmb/rmb/mb combinations when they need to > guarantee observability between the memory and the HW. > > The mpt3sas driver is already using wmb() for this purpose. However, > it issues a writel following wmb(). writel() function on arm/arm64 > arhictectures have an embedded wmb() call inside. > > This results in unnecessary performance loss and code duplication. > > writel already guarantees ordering for both cpu and bus. we don't need > additional wmb() Broadcom folks, please review! -- Martin K. Petersen Oracle Linux Engineering