Received: by 10.192.165.156 with SMTP id m28csp104799imm; Tue, 17 Apr 2018 07:15:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/rtf8RDTYmGCGiEV0b9AJqmbnftkH0gTFcUWCdZkOguK0PdDIm2eTnSJuEfy10l8Co2ZJw X-Received: by 2002:a17:902:e5:: with SMTP id a92-v6mr2258880pla.26.1523974500318; Tue, 17 Apr 2018 07:15:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523974500; cv=none; d=google.com; s=arc-20160816; b=Lam1ojCbmrCRqY3ViWvr0stKnzF84rL3O7UhDrU0X4rUQBue6k1fXLUqpiSV0/B5aA vCTySNguItJWv6nnmoLFHcBuu2G41348ZCAWRkTxW/GmEuoUi9az0qkG1bSTlBAM/eST yVKC9/ew8YK9Gay9M5gxfxPDmHlO80Yy+hz/4ZPQzJ07RZGZYK9PGm1r+P+ZC+11Kgtj S7r3YtRjegiOVaW8h0k+dQ/kUH0H2AdLVjcRd92BFNDM1rlCrJESHdRn0FLCfcjGd6Kg 7pFMtwMHe7qNgD9xIhP4IlH/mW0GFQHW3of/PJ7WbZ04rcNfvc0rpXPhusT1NSRChIQ7 XcnA== 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=9MX6o8ylcXA1YFOfejF6HYU8mPVTGRQXYpSrOn5cYLo=; b=UhH+sq2TLRgQ2TDv+VVnG2V3Xja5/1nxr3n5EQ1E2kJpvsOLrPo4fZY/y5mDPFhGhA 0cJT2TFy4KQpwmjksU0vncimn18vQQgEo0QHhKxoz7e1rsQAGlxxsP9j/f21cwUD4Ymq c8jx3lLR3OebQOVF7azQf/xrEH3wdFZF7st3bd9B8Fx6y3XoIhGKGrh8HvK11Nr6ndxs PLf9XiKUUdm69rTgCmlypBbokMcY+zEb7AydTj048PuNQQPEg6UQAw0H9xvrKVzLq6Gr ISF02fe+86fofXEPRUCVR7pESHcK5X3+XiKFDQ5PV2ei403BxqsXcf20lXGWPphJb3k2 ksgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=SFzaliwh; dkim=pass header.i=@codeaurora.org header.s=default header.b=HI0yn72g; 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 q24si12562078pff.13.2018.04.17.07.14.45; Tue, 17 Apr 2018 07:15:00 -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=SFzaliwh; dkim=pass header.i=@codeaurora.org header.s=default header.b=HI0yn72g; 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 S1752716AbeDQONg (ORCPT + 99 others); Tue, 17 Apr 2018 10:13:36 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56684 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751865AbeDQONd (ORCPT ); Tue, 17 Apr 2018 10:13:33 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C6BEE60F74; Tue, 17 Apr 2018 14:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523974412; bh=lurjU3QENkzJ6u4HmSkCIts6F+eowKXjUd63qoYAdwE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=SFzaliwhNVCZEumG2KNyI6DqK82zJf7xRLbGLQP3uISrCbGzd+0go16VcqvEPB+Wh FUt+4Aizr4EqFSxknkrjx7FBXK5/xTFIsfMpAWaDYPjgE5f8V09di5UG1QEbZUx2zV qnA2tM9BeM191abRBq4dLJSjD6M22i0A5i5+aRsI= 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 [192.168.0.105] (cpe-174-109-247-98.nc.res.rr.com [174.109.247.98]) (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 23C7D60C64; Tue, 17 Apr 2018 14:13:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523974411; bh=lurjU3QENkzJ6u4HmSkCIts6F+eowKXjUd63qoYAdwE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=HI0yn72gTDjxlz5NU8ELOjuZelsGY6ZSg5lwlnGR/V8tRGOcLUB2HkBoY1qcPy6bD 8IlXHSTMDSjSwBrrw5A3D3dSqg9S4nWflscTPkZUV0EZqCwdQ+vS5gEHY46EOF6m+A mFn5yTU0uYtzoT/8IbDtMVbIS2te7V1mxeHtYqls= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 23C7D60C64 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 v2 2/2] parisc: define stronger ordering for the default readX() To: James Bottomley , linux-parisc@vger.kernel.org, arnd@arndb.de, timur@codeaurora.org, sulrich@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Helge Deller , Philippe Ombredanne , Kate Stewart , Thomas Gleixner , Greg Kroah-Hartman , linux-kernel@vger.kernel.org References: <1523938133-3224-1-git-send-email-okaya@codeaurora.org> <1523938133-3224-2-git-send-email-okaya@codeaurora.org> <1523957852.3250.9.camel@HansenPartnership.com> From: Sinan Kaya Message-ID: <38a1d4e3-cabe-6c39-4355-8d8111637382@codeaurora.org> Date: Tue, 17 Apr 2018 10:13:28 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1523957852.3250.9.camel@HansenPartnership.com> 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 Hi James, > > Perhaps if you gave an example of the actual problem you're trying to > fix we could assess if it affects parisc. Let me clarify myself here. Maybe, there is a better solution. /* assign ownership */ desc->status = DEVICE_OWN; /* notify device of new descriptors */ writel(DESC_NOTIFY, doorbell); The difference between writel() and writel_relax() is writel() guarantees memory transactions to be flushed to the device before the register write. writel_relaxed() does not provide any guarantees about the memory and IO operations. Similarly, readl() provides following code to observe the DMA result while readl_relaxed() does not provide this guarantee. Ideally, you want to embed rmb() and wmb() into the writel() and readl() to provide this guarantee. PA-RISC doesn't seem to support neither one of the barrier types. If you are familiar with the architecture, maybe you could guide us here. Is __raw_writeX() enough to provide this guarantee for this architecture? Sinan -- 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.