Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp401998pxb; Tue, 9 Feb 2021 03:26:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzFyQZz8mWukKPG6wMLM/Il/ZLoGAqJe+A8woX4qeVDLxC2yOV4/Ha7ASQFWIDDcZWv7+Bk X-Received: by 2002:a05:6402:5252:: with SMTP id t18mr21822441edd.49.1612869999979; Tue, 09 Feb 2021 03:26:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612869999; cv=none; d=google.com; s=arc-20160816; b=HY4cYtw4tjQWE5YYwklyQFC7wQoYttVGg3Y6Rfz2w2RJd0yI1rf/4wVISxM1oUYreC 1NWmDabL2B6CtZLpOyV3b7rYYKVMX3rX3Y9jmMyN2rc7kzlOFK36LKMqsFIz0/4hVRAv jrtFZgSaG0d9VpxA0W73/EFMwio8856shS1gINddRovKFvssenqW/u67edx6UVmSD/HU dciIyIqLW9aefqKY+yoYI+lfn75opO5b9/In6gKkdDx2wjlsQnz50t5i3ZdQnXgg+a4T yBpu9Sfj4sBWEgfNPE7Y7CBCdpV9lH1g/QAlTF2rlNHwgQon0IGOmzKQavFdjMqOtkAC ORXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to; bh=zFCFYQguYgHdGJuXQpgWoen+4d8s4wxkeNS3B0AFhp4=; b=VW1M03inScgQHqcqt8u66MCaZlUFeAaLJDCUge3BlnAq98OsaFhOShWMMhFt3PAHAu 9EWrS42G9a9ylDB7tfU4vM47yn46LB/vQLUdLmHaN6HXYNgyU7OstEHlKIJK4jAF/c+A VezqosoTYZRNVfXgK3NGEfyRXLZyE7Nwm+z1LuQunoQAsXEI7CLQ/Jl24qCO4i8LOgYX 6jGeReoLv+aq8DugWNGlXio604SnbI/aHHxeiyK0kaJkyq/CfuFFjz39d7qRqWpKrTmV gNiC/iqWXociDed6kMXUjVgSImS5tCI4vNRHRy4OP08JxTvKCCRJvhMt0MjPyIR4YN/S +5Vg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m23si13799939eds.593.2021.02.09.03.26.16; Tue, 09 Feb 2021 03:26:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbhBILYt (ORCPT + 99 others); Tue, 9 Feb 2021 06:24:49 -0500 Received: from marcansoft.com ([212.63.210.85]:37974 "EHLO mail.marcansoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229993AbhBILW4 (ORCPT ); Tue, 9 Feb 2021 06:22:56 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id C172941EE3; Tue, 9 Feb 2021 11:22:08 +0000 (UTC) To: Arnd Bergmann Cc: Mark Kettenis , DTML , Marc Zyngier , "linux-kernel@vger.kernel.org" , SoC Team , Rob Herring , Olof Johansson , Linux ARM References: <20210204203951.52105-1-marcan@marcan.st> <20210204203951.52105-14-marcan@marcan.st> <635f1a81-58c8-f3b6-ab3f-1cf6a084aed0@marcan.st> From: Hector Martin Subject: Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it Message-ID: <11cdf93c-0b25-e1c1-5d18-80ccb4a3f2d9@marcan.st> Date: Tue, 9 Feb 2021 20:22:06 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: es-ES Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/02/2021 18.15, Arnd Bergmann wrote: > Right, these are the same ranges that I found in the adt and that Mark > listed in his code snippet, so it seems we all see the same partitioning > of the address space. I also see them reflected in the > /defaults/pmap-io-ranges property in ADT, which seems to have an entry > for every register range that has some mmio registers, along with what > appears to be a bitmask of some attributes, and it clearly shows > the above ranges as having a distinct set of bits from the others > (in little-endian): > > 00000000 04000000 00000080 00000000 27000080 65494350 > 00000080 04000000 00000080 00000000 27000080 65494350 > 00000080 05000000 00000080 00000000 27000080 65494350 > 00000000 06000000 00000080 00000000 27000080 65494350 > 000000a0 06000000 00000020 00000000 27000080 65494350 > 000000c0 06000000 00000040 00000000 27000080 65494350 > ^64-bit address ^64-bit length ^ 64-bit flags? That's ASCII :-) 'PCIe' > > As opposed to e.g. > > 0000f002 05000000 00400000 00000000 07400000 54524144 'DART' > 00800021 05000000 00400000 00000000 07400000 44495344 'DSID' > Ok, so if we want this to get encoded in a 'struct resource' flag, the PCI > resources should work just fine as these resources come from the > PCI layer rather than of_address_to_resource(). I think it would be > reasonable here to add something to of_address_to_resource() to > set such a flag if we can find an unused one, and then require the > drivers for this platform to go through devm_ioremap_resource() > or similar. This sounds reasonable. For setting such a flag, I guess looking for a property (inherited from parents) would make sense. `mmio-map-mode = "nonposted"` or something like that? -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub