Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3437246imj; Tue, 19 Feb 2019 03:34:24 -0800 (PST) X-Google-Smtp-Source: AHgI3IbvF0aWJ9EluzgYRBMKv2VhcmJDLgAlQmK0LYiaiHoq2N57Kf1dIUYIXqJ9mEgNvuav/LgY X-Received: by 2002:a17:902:b101:: with SMTP id q1mr30452748plr.135.1550576064539; Tue, 19 Feb 2019 03:34:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550576064; cv=none; d=google.com; s=arc-20160816; b=ZrtLzsV7o9Rmofh9UjjW09kersum5VBW7EdZaeavnOfX98GHlwto/gAaky3HI+nZvB +VLd5SDlJQoLIVVBdnZXwzJXZdELok3BfQjZ/vxvlhXlqeDQnZQQASz7HAY4J1RSnoVb TH+o9BnoW3ZuW1mFPknpke20Bay9Cf3wd3aKJNDjX9WJeHgPu36Rt44gGajdDrF7ln0Z Thq4g1atEKcTHiEda7T7lmuCMROAtlm+CotSZoFTqGVy2pWpWos1HxJkyLUHWj4S2dAu Tjoi4Hm5xeNnuBOyc/8awzMDWMkPjNZJBomu9JxMI7U5S8x53urhz6FYbAnjZ2Zgut4T kVDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=qeWND+D7sUSM8N/UUlWOlIWC155ai0urHWDXLXou1cA=; b=bTf6WiXqlUaSQ2w4L1O/0f0zoT9FPfg+/velXBfiuXMSjOr+WSa84IqWJec3JnYzfD MTXmm7wQpUZrzoODVEU6WLz6PSj/ydptOhlNxN+kQEDmhm2zlNZuJwa5vOIYFkq4S+ZZ ReZwHeSKvDhtSun+/Y6B2/95WMY7hjaNe9CSiiC75r4Dyu0ssOyzhr5Bq6CZchpZQ8Ft FiDVZm0SaDc6IeMWRWlIz/cCv2rCxCOuHOWRuGdJTf7kowxujqFg/+3pp1NLbsDJ3h2d klugrVnFr17D4dKvU0tUOLdFY1B9ABD3qKMxpPB1RO/T1iZlUwT3GzrC0mTuKuWIBgDK fdiQ== 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 31si16915127plh.274.2019.02.19.03.34.09; Tue, 19 Feb 2019 03:34:24 -0800 (PST) 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 S1728056AbfBSLcJ (ORCPT + 99 others); Tue, 19 Feb 2019 06:32:09 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:35133 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725805AbfBSLcJ (ORCPT ); Tue, 19 Feb 2019 06:32:09 -0500 Received: by mail-qt1-f195.google.com with SMTP id p48so22690442qtk.2; Tue, 19 Feb 2019 03:32:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qeWND+D7sUSM8N/UUlWOlIWC155ai0urHWDXLXou1cA=; b=Dhl0KvxFaYImwyj1HbL4JjARu5izFAVsteF7/YOrxtpKJQyPDa6VtfPWBIxYVTJA4h EH7Y1W1eebPG1cZSbuXVNQJy4x/LuhXP8wNCB7pOhDBrrYpZahqWn+Pz1TCq4Xdza1Ji Nq6iJngZpeGPG0qG1epSQM0eqeubuwEMubKPj5d8TYTvrpDBozB0+GM4WHUvge9JkXMz r92c5SNZhOzF7fE7PisE8YR+/GxdJoc1ZQf3+8/c1s63laXgehBhgbmw9q6fKhOLqppo 0zQo22/yIErQK5VojCzdtjzYUpHQx/lH97BjljtrCLc/uLfrzbLIR8hXPyC0ERvaM3KA NE6w== X-Gm-Message-State: AHQUAuZtqwDr2aezdxh15uQaYmCdOo9OuLSdPy13NNLstaCUoyVdOCG7 5gTlMshB2w4OLOjNxrgryZmcNLIvzi246l/KwiE= X-Received: by 2002:a0c:e98f:: with SMTP id z15mr21302382qvn.115.1550575928162; Tue, 19 Feb 2019 03:32:08 -0800 (PST) MIME-Version: 1.0 References: <20190211172948.3322-1-will.deacon@arm.com> <20190218162954.GB16713@fuggles.cambridge.arm.com> <20190218175625.GD16713@fuggles.cambridge.arm.com> <20190219112747.7db95e58@windsurf.home> In-Reply-To: <20190219112747.7db95e58@windsurf.home> From: Arnd Bergmann Date: Tue, 19 Feb 2019 12:31:50 +0100 Message-ID: Subject: Re: [RFC PATCH] docs/memory-barriers.txt: Rewrite "KERNEL I/O BARRIER EFFECTS" section To: Thomas Petazzoni Cc: Will Deacon , linux-arch , Linux Kernel Mailing List , "Paul E. McKenney" , Benjamin Herrenschmidt , Peter Zijlstra , Andrea Parri , Daniel Lustig , David Howells , Alan Stern , Linus Torvalds , Thomas Petazzoni , Gregory CLEMENT , Russell King - ARM Linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 19, 2019 at 11:27 AM Thomas Petazzoni wrote: > On Mon, 18 Feb 2019 21:37:25 +0100 > Arnd Bergmann wrote: > > > Ah, it seems we actually do that on 32-bit ARM, at least on one platform, > > see 6a02734d420f ("ARM: mvebu: map PCI I/O regions strongly ordered") > > and prior commits. > > Yes, some Marvell Armada 32-bit platforms have an errata that require > the PCI MEM and PCI I/O regions to be mapped strongly ordered. > > BTW, this requirement prevents us from using the pci_remap_iospace() > API from drivers/pci, because it assumes page attributes of > pgprot_device(PAGE_KERNEL). That's why we're still using the > ARM-specific pci_ioremap_io() function. Ok. > > > I would still prefer to document the weaker semantics as the portable > > > interface, unless there are portable drivers relying on this today (which > > > would imply that it's widely supported by other architectures). > > > > I don't know of any portable driver that actually relies on it, but > > that's mainly because there are very few portable drivers that > > use inb()/outb() in the first place. How many of those require > > the non-posted behavior I don't know > > > > Adding Thomas, Gregory and Russell to Cc, as they were involved > > in the discussion that led to the 32-bit change, maybe they are > > aware of a specific example. > > I'm just arriving in the middle of this thread, and I'm not sure to > understand what is the question. If the question is whether PCI I/O is > really used in practice, then I've never seen it be used with Marvell > platforms (but I'm also not aware of all PCIe devices people are > using). I personally have a hacked-up version of the e1000e driver > that intentionally does some PCI I/O accesses, that I use as a way to > validate that PCI I/O support is minimally working, but that's it. The main question is whether we know of a portable (not specific to a single architecture) driver for PCIe (or PCI, but probably not ISA) that uses outb/outw/outl in a way that relies on the on-posted behavior of those, compared to posted writeb/writew/writel that are only required to complete before another I/O operation on the same device but whose completion is not ordered with regard to the rest of the system. I think an example of this would be a driver using outb() to disable an interrupt, and then relying on the the interrupt no longer happening after the outb(). Arnd