From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34EC3D24459 for ; Thu, 10 Oct 2024 22:55:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=N9JEiGKDCgpvXPB16Af6EseEzG12xU4T4Q49DhH3esk=; b=OBYUivLZHXcnio bHZoogEe4+RU1zYZIZoKYDRlBJblPSiSiEKQbgP9UIqokyvZJ9aU1vHO+xumSgv+sbQdXqh2O81jG r8kbQX0KqNURTm0AJ0sRht/hgOg/VXd0ExPqOCIp8poH+rGwM4FQBPDhWkLOjkHn6nt34ajs5bj0V b6Va4QPm94EEU4m+8/fMXARr4BMb9EHyMgsDACpaJuCKJMvALL+PR8FrrGc6Qf4Br2cY/BLjk8EmV K8vMWDd2EtSHFEGC3br/ryFWNseMWvpjHU7lbPzXe+FfS/XCij7Qk4QJmSqohdUbsyCdwLGhxQEuW dEiNDabZXKngKsK9nX/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sz24I-0000000EbTz-2ksg; Thu, 10 Oct 2024 22:55:38 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sz22s-0000000EbBK-2SAG for linux-arm-kernel@lists.infradead.org; Thu, 10 Oct 2024 22:54:11 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D23B65C5CDC; Thu, 10 Oct 2024 22:54:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91057C4CEC5; Thu, 10 Oct 2024 22:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728600848; bh=9X2zQpOQIw6eNhBpfK+ND2D98IUUMluiPAYQiBV/oeg=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=tKnwMb+8MI3u940JMicIAOEiaLklrHsFHI+hJHDxkRRzI5OOKu+x1kicHSxaNQ6Nj GmBAQa0bUP7XNunv0H/+sTSo0VCFbM0+TJ3VwfuaDxFipdMG3lm4mnQcYWTQtTA3Cp G9KDy5RuEAgIlD4dbNSkcex5OfvwxQmIhFW/YxYiGSRIlrDJB3IRJfKsngrjfnaa9q 5iEuxzw3MZPFxNRkAcUFiN0VE7FXwD+wh8pRbGEsQGPT9h82rOgDTcu2SMX0iX0f0V zmHSTwxzBHq0nIT5IlFkkAP3U36cr59WKq/z66peevLbKhCi4nOoSADFQclxA/GEtv hWDUYuaaayPLQ== Date: Thu, 10 Oct 2024 17:54:06 -0500 From: Bjorn Helgaas To: Frank Li Cc: Rob Herring , Saravana Kannan , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev Subject: Re: [PATCH v4 1/3] of: address: Add parent_bus_addr to struct of_pci_range Message-ID: <20241010225406.GA583899@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241010_155410_691068_A45A9AE0 X-CRM114-Status: GOOD ( 18.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Oct 10, 2024 at 06:40:48PM -0400, Frank Li wrote: > On Thu, Oct 10, 2024 at 04:57:45PM -0500, Bjorn Helgaas wrote: > > On Tue, Oct 08, 2024 at 03:53:58PM -0400, Frank Li wrote: > > > Introduce field 'parent_bus_addr' in of_pci_range to retrieve untranslated > > > CPU address information. > It is "untranslated CPU address", previous patch use cpu_untranslate_addr. > Rob suggest change to parent_bus_addr. > > Is it better change to "to retrieve the address at bus fabric port" instead > of *untranslated* CPU address "parent_bus_addr" will hold an untranslated CPU address in some cases, but not all. I think it's better to use a generic term like "parent bus addres" here because that is accurate in all cases. > > and this "ranges": > > > > ranges = <0x5f000000 0x0 0x5f000000 0x21000000>, > > <0x80000000 0x0 0x70000000 0x10000000>; > > > > means: > > > > (IA 0x5f000000, CPU 0x0 0x5f000000, length 0x21000000) > > (IA 0x80000000, CPU 0x0 0x70000000, length 0x10000000) > > > > which would mean: > > > > CPU 0x0_5f000000-0x0_7fffffff -> IA 0x5f000000-0x7fffffff > > CPU 0x0_70000000-0x0_7fffffff -> IA 0x80000000-0x8fffffff > > Yes, > > > I must be misunderstanding something because this would mean CPU addr > > 0x70000000 would translate to IA addr 0x70000000 via the first range > > and to IA addr 0x80000000 via the second range, which doesn't make > > sense. > > Yes, it is my mistake, first length should reduce to 0x0100_0000 from > 0x21000000. It works because dt convert IA to CPU, instead of CPU to > IA. for example, input IA: 0x80000000, match second one, convert to > CPU address 0x0_70000000. Great, if we can omit 0x5f000000 completely that will avoid the confusion. I hope the actual DT doesn't have this error. Bjorn