Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp436368pxf; Wed, 10 Mar 2021 09:06:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7WibwxwSG3Po5bZUXppdDpzD5NHSvRLP1e9/mdtJ/Xz1J9/sY8GE4rLqdr2D5zH9WiB0g X-Received: by 2002:a17:906:3409:: with SMTP id c9mr4667247ejb.314.1615395965609; Wed, 10 Mar 2021 09:06:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615395965; cv=none; d=google.com; s=arc-20160816; b=f45pTrjU5mq7mu8JHjS77fMj4xK2PfDc0uRLsd4w6wqlhMEmOd0JDaeP9bTErTDFCf fBGIPM6b3c5lvrqG6jqKCEbMSvZhGOw7NCjvq6Rbhltrrt7mWLypdiWmEocqSOc9ki0i Cr/y9dw1tBNjj/Qt9sbAfOJwijikOrixyJ75dN1TtSmVIrgdBQRjsKIRg6OveplvJxh7 LZUBV5NZ9czqnNdciHsdFJvFO7w9823eJ+UOzV7xD0Qnj5LHuoGmZU99xJ27Gp7JuaIM i0D74NwpnHJHMRL4qGOSjh1Bb33M20buxSp1F4rtZhv6eJjBWO+QiVoMFPsFsuKZWm/v oB3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5LZ7c4U4IAUXXoygU0w5CR3jOKIDBj1RXMdFN86MevM=; b=a/+uG25vY+nXoU1dS8pocdsu4ZhBov1lQa28P5OTcOoaG+nEGzGNHY0mp/qOzW0W3f HJtZjlczinvNg6MESqtLYTyuDEv90i/QaEEm9fDugM3ncHpOSv0jFUPcK4iVRNsWNtm2 pEmxVJEai7uq0lXSFscNL49rWqtHm570vIzvp/OrgC8df3GXDaRl3SotvaZJjHYpU7r2 qkT6D3KKBJZW8fwequ6l6NVCDliZPtkDtwJsHnxwrpENF1lHljqo13NT+qMZVpmAsips fi4AYcZebtV2mHnwtMh8lGDJYxSYKTRDhE6k6lC5bNvkTu8/arEcsoBXbQNruHC4nhiR C0Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b5q13A9v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si7800743ejj.661.2021.03.10.09.05.32; Wed, 10 Mar 2021 09:06:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b5q13A9v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232650AbhCJRCU (ORCPT + 99 others); Wed, 10 Mar 2021 12:02:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:44384 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233655AbhCJRB6 (ORCPT ); Wed, 10 Mar 2021 12:01:58 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A5FA64FCA; Wed, 10 Mar 2021 17:01:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615395717; bh=5LZ7c4U4IAUXXoygU0w5CR3jOKIDBj1RXMdFN86MevM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=b5q13A9vKkWPc/S2db+xOtVll5VS6u+2t6fCOQtiIUBFLLDdzVTyOI+P3UeGL+LqJ 7Elkm2kmhr5CpRnO2X65A+H6fhh08GnA/WZocXK+qekvB2TMURd3J8UgsqR1NfmFxy fDonUJ45jhqpGSvmkgJUFSjgA6p0MSXOK2M6hq+6iVQgE7ghxEkPMetdhH7pMmlX+o cOjW0m8/LKBPl6s3lctW6O2TtGutJaNWf1VaOiJ33Nq8iQxmlrU/PpR2RsOIZkmy0D GyUobzwlzzFIqj7QIzHuu+VDiWYgi4SVCChUfIiVW79wRLAtbqMDYlXwptMkpZAMVn lloGmQa4FN/LQ== Received: by mail-ed1-f48.google.com with SMTP id w9so29022145edt.13; Wed, 10 Mar 2021 09:01:57 -0800 (PST) X-Gm-Message-State: AOAM530KCNGOc9UWduhTNmkxpbxEUUcZnZx2dKf1QRq8pCP7eaYalsLB e8zsS1z9pKqpMVuOCDEDipti2ju9lBMiBqrhUQ== X-Received: by 2002:aa7:d3d8:: with SMTP id o24mr4394042edr.165.1615395715853; Wed, 10 Mar 2021 09:01:55 -0800 (PST) MIME-Version: 1.0 References: <20210304213902.83903-1-marcan@marcan.st> <20210304213902.83903-13-marcan@marcan.st> <6e4880b3-1fb6-0cbf-c1a5-7a46fd9ccf62@marcan.st> <20210308211306.GA2920998@robh.at.kernel.org> <332c0b9a-dcfd-4c3b-9038-47cbda90eb3f@marcan.st> In-Reply-To: <332c0b9a-dcfd-4c3b-9038-47cbda90eb3f@marcan.st> From: Rob Herring Date: Wed, 10 Mar 2021 10:01:43 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFT PATCH v3 12/27] of/address: Add infrastructure to declare MMIO as non-posted To: Hector Martin Cc: Arnd Bergmann , linux-arm-kernel , Marc Zyngier , Olof Johansson , Krzysztof Kozlowski , Mark Kettenis , Tony Lindgren , Mohamed Mediouni , Stan Skowronek , Alexander Graf , Will Deacon , Linus Walleij , Mark Rutland , Andy Shevchenko , Greg Kroah-Hartman , Jonathan Corbet , Catalin Marinas , Christoph Hellwig , "David S. Miller" , DTML , "open list:SERIAL DRIVERS" , Linux Doc Mailing List , linux-samsung-soc , "open list:GENERIC INCLUDE/ASM HEADER FILES" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 10, 2021 at 1:27 AM Hector Martin wrote: > > On 10/03/2021 07.06, Rob Herring wrote: > >> My main concern here is that this creates an inconsistency in the device > >> tree representation that only works because PCI drivers happen not to > >> use these code paths. Logically, having "nonposted-mmio" above the PCI > >> controller would imply that it applies to that bus too. Sure, it doesn't > >> matter for Linux since it is ignored, but this creates an implicit > >> exception that PCI buses always use posted modes. > > > > We could be stricter that "nonposted-mmio" must be in the immediate > > parent. That's kind of in line with how addressing already works. > > Every level has to have 'ranges' to be an MMIO address, and the > > address cell size is set by the immediate parent. > > > >> Then if a device comes along that due to some twisted fabric logic needs > >> nonposted nGnRnE mappings for PCIe (even though the actual PCIe ops will > >> end up posted at the bus anyway)... how do we represent that? Declare > >> that another "nonposted-mmio" on the PCIe bus means "no, really, use > >> nonposted mmio for this"? > > > > If we're strict, yes. The PCI host bridge would have to have "nonposted-mmio". > > Works for me; then let's just make it non-recursive. > > Do you think we can get rid of the Apple-only optimization if we do > this? It would mean only looking at the parent during address > resolution, not recursing all the way to the top, so presumably the > performance impact would be quite minimal. Yeah, that should be fine. I'd keep an IS_ENABLED() config check though. Then I'll also know if anyone else needs this. Rob