Received: by 10.192.165.156 with SMTP id m28csp1245311imm; Wed, 18 Apr 2018 06:41:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+buEdZ4ogdrM9zNwUklq77r4714cZ/9y+BzgOG18MwyfKgWhH7J1CYXm5mbMqUxPuuhmx/ X-Received: by 2002:a17:902:31a4:: with SMTP id x33-v6mr2138165plb.355.1524058868094; Wed, 18 Apr 2018 06:41:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524058868; cv=none; d=google.com; s=arc-20160816; b=VIswnkGBduz99tMQSgV6avHiuQgOmB3U7y16b9rsxfe7SAb8CQKP4l+ynGKKnkpcQy 1ZTMvVjcJIbh3duF2iundfPYchylitmUU8r/E2dRGEuRCRYJ4e6fXDKhZ4tdD4xAUUyR A/VHG5XKU20A0PtQcrEV77TS/DaM54QMrtTuCfqFg9M+U7WFmYlc9pOWbSYR5Ty9ggQx IxLYTnlhiBB21yNDeAP8BlLYGciADY27oq3pMKdRHoFrA1XFz+wq7JvBlAEG99JGpXeI JKqg14824uJj19/QzlfLiaR0hEcBdcwtuP8LHfTXxB+mLvkfwSQug5DNPuNWs1HIjsbL X62Q== 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=esxgcIvF0NFkQmcoWNj9Q1H8XVTfXn7jaUbAMTcIJIk=; b=iMBKkUOSW+Dgu366jTxiF9xHxJyOJji0ZZNLIRboldHuFoXUs9wQ5EBn6jHQdmesCx rLI7V8bcReh4fOAea0wrebXEnFuiu0AKWR8R7MBLjYIx51YcMisXNKToJuy3ttf3YVAz Ua58PFJHCy1QVvTaNAoEsclguUH0xfERIfKgsP5p9Dk7ilxp/aaDaHPe9qwdzSNV2HMz f/UR+ELhCzdkrbz4MYg+KVX5eSGGpyERJdCVWX07YRW6qOIvXFPrjfKfZupbMkdNG0Ti BCbK64THk/kMaZa9s2mhi8C45FhDTKubYK6atulm6rmhBO46/es5CKFLxIrR08EPDPzv XUdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=F3Ix1qwa; dkim=pass header.i=@codeaurora.org header.s=default header.b=W3F39e3G; 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 n76si1207141pfi.122.2018.04.18.06.40.54; Wed, 18 Apr 2018 06:41:08 -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=F3Ix1qwa; dkim=pass header.i=@codeaurora.org header.s=default header.b=W3F39e3G; 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 S1752974AbeDRNjg (ORCPT + 99 others); Wed, 18 Apr 2018 09:39:36 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:43472 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752684AbeDRNje (ORCPT ); Wed, 18 Apr 2018 09:39:34 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A811360AE0; Wed, 18 Apr 2018 13:39:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524058773; bh=GGhHAlLl1oTdJOsrMY2tFR/l5ibc6f5YNHUmYT+0siI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=F3Ix1qwaMKELvSbPP+5o2/Xfo3ObQaWRxHivZdIz0GCBkZaJOhCEBXGhfyt/2t2pf GmyrF7qYqAXVPwEn48ldWHmLPPNpDThbEXqtdhFyggtThjTPdR4HReRW48eGoUWA7H h+aaaohActePMI6t5H4AfLcXuhxf5jL5EDoOcBXk= 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 7FC57602BD; Wed, 18 Apr 2018 13:39:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524058772; bh=GGhHAlLl1oTdJOsrMY2tFR/l5ibc6f5YNHUmYT+0siI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=W3F39e3GJ1Ucr7Xbb04OSpsweFnKDMoX1XIJ72/Fm5dVpSTb3SrvFFJ19XOfpzEDK taCx87RxBvyMXgElsMoYCDJ3fR2YxNkSuA8uI4uUsvwkHcGPDnbt9BbSfnJxVwILFl jR/hg9L/bebjp6UZCl6T6oba0/OeyATXGX54ZqC8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7FC57602BD 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: John David Anglin , 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> <38a1d4e3-cabe-6c39-4355-8d8111637382@codeaurora.org> <1523980508.3310.9.camel@HansenPartnership.com> <86252a65-265d-e081-b71f-42a0be6b1693@codeaurora.org> <97fc18a7-b321-0039-0413-d461abc2097b@bell.net> From: Sinan Kaya Message-ID: Date: Wed, 18 Apr 2018 09:39:30 -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: <97fc18a7-b321-0039-0413-d461abc2097b@bell.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/17/2018 6:53 PM, John David Anglin wrote: > On 2018-04-17 2:28 PM, Sinan Kaya wrote: >> The correct terminology here would be to use observability. Yes, it can be >> cached in whatever part of the system for some amount of time as long as >> PCI device sees it in the correct order. >> >> Let's do this exercise. >> 1. OS writes to memory for some descriptor update >> 2. OS writes to the device via writel to hit a doorbell >> 3. Device comes and fetches the memory contents for the descriptor >> >> writel() of PA-RISC needs to ensure that 3. cannot bypass 1. This is typically >> done by a write barrier embedded into the writel() on relaxed architectures. > The sequence point after the argument evaluation for writel prevents the compiler from reordering > 1 and 2.  Accesses to I/O space are strongly ordered on PA-RISC, so 1 must occur before 2 (Page G-1 > of the PA-RISC 2.0 Architecture).  Thus, the current code is okay. > Many thanks for the clarification. > Dave > -- 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.