Received: by 10.192.165.156 with SMTP id m28csp588571imm; Tue, 17 Apr 2018 15:55:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/jAMIaJP5BWTFadCsCEcAmqzJGcmIC5vJs0Ke3hCBp25x/lrUxoNoqx6ysNPX92Lmn3a8c X-Received: by 10.99.121.65 with SMTP id u62mr3243437pgc.163.1524005722861; Tue, 17 Apr 2018 15:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524005722; cv=none; d=google.com; s=arc-20160816; b=llebKUWRdTn6L5wIuJ+PHZmIMHAx2yLJNWxyhgcdpChbDxcE+e+Pgm6vgVNmYGtyLQ mZmz1OCsF9uUa7BmEhjnsnuKz6xQfe8znZlNOOUAfbTPjaHLWqufwZr9ailloFr+Q8mv x2Q6PDDiyyg0FnqJLJT+Jv6QUskctF246oTbEmabqQA1Kc9Y/MQzTI7z9ubh35BK7j0y dMI6L/+b64kUCXdsdL54JNubXa9t5fzUF+QjweZeKmSF0QIg9nLcH6U6uz+tRmkvY1JE 7HjsT2GNKPvSw5SoJOEAnFgJNZZmMRMUgqW2OEjjQGFuN1YDQurqHfJffftuGL3/Ymgc Ntuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=5FpsXRduC+MzCAV2K9g3aIcn5oGANN0Cv6vY0jnGbZo=; b=bEMKTQbUnn1gIVmYd1c/f/Xxl4W5scqZvgiyL6cTmt8Xgkn9ovSdRzXBcJQSdc6O3l cIVA5/H2dPAvtb4/0KLgmlXE1T+Jwl/jBsjH7PU6r1T2m0R455QA7PzijsMRya+1xz8H 7rQ/cNOpZ5RNfiD3645qo/LlOOcAW48G1FbY6wfNF9M53zk690cyWUJ8SlGNHCFKIkLc esuS4SgecqSkkpt8JGdBw9rRnSznX5rD5SH/iw18epR6x2oS9LGWuM57hzj4xjavB2zj Hq8qbcNQmoo4X//gUQlnDqN5yqIEnPjSWL/C9Ddz0qG7+3qAtaR8cHe9cYk+iH1cn/Sx 0a3Q== ARC-Authentication-Results: i=1; mx.google.com; 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 m14si12548680pgs.190.2018.04.17.15.55.07; Tue, 17 Apr 2018 15:55:22 -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; 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 S1752647AbeDQWx6 (ORCPT + 99 others); Tue, 17 Apr 2018 18:53:58 -0400 Received: from simcoe207srvr.owm.bell.net ([184.150.200.207]:46235 "EHLO torfep01.bell.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751150AbeDQWx4 (ORCPT ); Tue, 17 Apr 2018 18:53:56 -0400 Received: from bell.net torfep01 184.150.200.158 by torfep01.bell.net with ESMTP id <20180417225354.LKSZ3030.torfep01.bell.net@torspm01.bell.net>; Tue, 17 Apr 2018 18:53:54 -0400 Received: from [192.168.2.49] (really [69.158.175.55]) by torspm01.bell.net with ESMTP id <20180417225354.CPPX26298.torspm01.bell.net@[192.168.2.49]>; Tue, 17 Apr 2018 18:53:54 -0400 Subject: Re: [PATCH v2 2/2] parisc: define stronger ordering for the default readX() To: Sinan Kaya , 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> From: John David Anglin Message-ID: <97fc18a7-b321-0039-0413-d461abc2097b@bell.net> Date: Tue, 17 Apr 2018 18:53:52 -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: <86252a65-265d-e081-b71f-42a0be6b1693@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Cloudmark-Analysis: v=2.2 cv=JtkelIwC c=1 sm=0 tr=0 a=V8DPTAhloC/wURew+oITug==:17 a=IkcTkHD0fZMA:10 a=Kd1tUaAdevIA:10 a=FBHGMhGWAAAA:8 a=XwEJ4ca0QzdjioWKIGAA:9 a=QEXdDO2ut3YA:10 a=9gvnlMMaQFpL9xblJ6ne:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Dave -- John David Anglin dave.anglin@bell.net