Received: by 10.213.65.68 with SMTP id h4csp3799367imn; Tue, 3 Apr 2018 10:49:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx48xKJGk21tp9u+BeDmo+KbPr9GI5CqDk+f+168ifvOUyLH1m+x5lLDCGODaFBNGxGkcohXF X-Received: by 2002:a17:902:6b01:: with SMTP id o1-v6mr14860124plk.350.1522777795976; Tue, 03 Apr 2018 10:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522777795; cv=none; d=google.com; s=arc-20160816; b=gDiwCbxDTXtPf2unFbDpgonASrYdgZ6Na87suiV7d9wHTFWxYlCCRDqhqjRRIksw3e zdTnYmDui3fGirpk0xyGYS73+G8SZpi4/+J9lgcb2ALBWj4FTjI6hgaWRqGYCLbzC1q9 qx/7JgECCpd+QY0Vak0NTMesFAFSp4LUSa48Y0liA92GbwJn49cWmr90OsfEvP5QZ+HG valzyedNqV1gZ1wopMn1l1Nl5TLnjiBmBwj1WhFZyC6uGl7BBqC9EPwptAk73HOLcVDE JbfS8eApPX2Bl1aPtNtekCr9FvwyEUYshChpqG+2Qj9//TUUFFQgrTyXif1dzaL5j4HN Fn8A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=ZSLneL7RZmlyGLxXx6GTzBnlITW8YZPiVLZPPkw3o20=; b=fljVN2sOOE4ZjeAS5dCOvCKeYNsvM+KFynk2dp3zjQJB8TQ17sf5YH2RHYR23db3eB hCAT7dMszpT0Ub/aqbqh13kNW9qHC6VWEVurM+w1OtEDsdn/fg0VnTqx1JW+kLNTV/4L jrFA+2/Nld8U225IhS5MIY0FM8D00wUeX7T+3KpPzakYgSH2XE5oA3L3kipnpkuwJ48U lLjMZFkd98sRi9X13AiguOc4E6peMCCBf5vtIqMNLHnXV58JtA6j/f8hl4SIhdulmc5i vG7GqpDcTNlJQ4HzPw5/8Bq/vpb78kCUKGXqjcbq7zJT3KdqQPYPbjhlOuLLln8IQyAI zVcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=aliil8f5; dkim=pass header.i=@codeaurora.org header.s=default header.b=aliil8f5; 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 n186si2278245pga.801.2018.04.03.10.49.41; Tue, 03 Apr 2018 10:49:55 -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=aliil8f5; dkim=pass header.i=@codeaurora.org header.s=default header.b=aliil8f5; 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 S1752832AbeDCRrL (ORCPT + 99 others); Tue, 3 Apr 2018 13:47:11 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41430 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752600AbeDCRrI (ORCPT ); Tue, 3 Apr 2018 13:47:08 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id CC8926081B; Tue, 3 Apr 2018 17:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522777627; bh=/tMERFYMnor7crdNXAFuuL8XP03GDeCqxPuSfSXNCbI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=aliil8f5DWoKQZPKlYn6ovl2umG5R3HlrUI9+gqkY0t68LX+C/mXAs1A22jG5RIxL ZjSvTBizTknSrFljO/9A2yzkko1BDevBjC4RU1iyap4NzKMaDiO9Pf88UO7fXyomc+ GqatnvSy/zrgT0g+4ularx90YnN2/NS+9kTqShF8= 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 [10.235.228.150] (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 506046022C; Tue, 3 Apr 2018 17:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522777627; bh=/tMERFYMnor7crdNXAFuuL8XP03GDeCqxPuSfSXNCbI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=aliil8f5DWoKQZPKlYn6ovl2umG5R3HlrUI9+gqkY0t68LX+C/mXAs1A22jG5RIxL ZjSvTBizTknSrFljO/9A2yzkko1BDevBjC4RU1iyap4NzKMaDiO9Pf88UO7fXyomc+ GqatnvSy/zrgT0g+4ularx90YnN2/NS+9kTqShF8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 506046022C 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 Subject: Re: [PATCH v5 3/3] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs #2 To: "Kalderon, Michal" , "linux-rdma@vger.kernel.org" , "timur@codeaurora.org" , "sulrich@codeaurora.org" Cc: "linux-arm-msm@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "Elior, Ariel" , Doug Ledford , Jason Gunthorpe , "linux-kernel@vger.kernel.org" References: <1521736009-23387-1-git-send-email-okaya@codeaurora.org> <1521736009-23387-4-git-send-email-okaya@codeaurora.org> From: Sinan Kaya Message-ID: <3f8de63a-9036-a5ac-2369-2d9af80bb6ef@codeaurora.org> Date: Tue, 3 Apr 2018 13:47:05 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/3/2018 3:42 AM, Kalderon, Michal wrote: > The wmb before writel are used to make sure the > HW observes the changes in memory before we trigger the doorbell. According to Linus, writel() guarantees observability. No extra barrier is necessary. https://www.mail-archive.com/netdev@vger.kernel.org/msg225806.html There shouldn't be any wmb() in drivers unless it is used for a very well-known reason. APIs like readX() and writeX() guarantee observability. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.