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 X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2107BC388F7 for ; Wed, 28 Oct 2020 13:11:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8A7912473F for ; Wed, 28 Oct 2020 13:11:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Gn8zWkXo"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="tyC/p008" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A7912473F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BSfgqnknM8GeD7BAeT1LbOjF4CsYbbbsPGFHtzmB63I=; b=Gn8zWkXo28y+cBw9AhFOqiOVq mlrG7EJR/5moUwYMQ50OVkRmLAePC6rO26S8CkqZvRPrAvmp1grElg5UnawXiCWYkFGYszp0Y5XeV 1gNVLHCB13Eh8TNPm4Gxhjf14VckFL3KWckyjRqvKSF4aCv7RLPDf6M/WjwMM53Xs5z/Xbhz43weE IKDf9v/Nk+Xs06LPHTswcIDJWop625qp27mLS/Wv5pL+9+wLcWp0zkaEWaE8ZQlZOtGsN8qR66SHb j/QERDvZaAaKxI/l55L7hk/vyjRYsxLq+QKtbPZSJ9ATLdKeEQBKilrTuzhl/r3dhvIqRPGkxtLk3 MZn5dv9UQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXlD3-0008RF-2G; Wed, 28 Oct 2020 13:09:49 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXlD0-0008Qc-BF for linux-arm-kernel@lists.infradead.org; Wed, 28 Oct 2020 13:09:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References: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:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iGNt9q4u3C8iCvbvbTSQ7zegZDgrGY8gA6FD/mliiJc=; b=tyC/p008K/KhAYOxaqxcY7WRf 5fd3pS3xqetPeTmL0b93VSI2MlpnAwqZtW6ekD9Qb2qKYu+Voyqo8pxBPfsdwiascoBEqzXuqGXLZ AypHNaBoN2W/6e2X2tKOmLh+wxKmCJ3NBuDB8pkLltSuCGSvNl4uzz29CcFAga9unjsPZea8mYXe8 WIxQaen2lEQi/QwA/9J4RSEgN2AYhlEHamqHC3XwKocJtEGUe1oOmuqkm94WGedUXAi2tnNGpqL3n iJmtdXWinGZrypheUhf8+0T7dcyIWuUv8zqPOhOVYmJD9GnjRX8F8ag0JlnBk7xaFRuq/tjN0Wd1v BiZgnztKw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:52040) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXlCv-0002pR-8e; Wed, 28 Oct 2020 13:09:41 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1kXlCt-00053q-Lp; Wed, 28 Oct 2020 13:09:39 +0000 Date: Wed, 28 Oct 2020 13:09:39 +0000 From: Russell King - ARM Linux admin To: Ard Biesheuvel Subject: Re: [PATCH v2 2/2] ARM: move device tree mapping out of linear region Message-ID: <20201028130939.GM1551@shell.armlinux.org.uk> References: <20201007083944.27910-1-ardb@kernel.org> <20201007083944.27910-3-ardb@kernel.org> <920965b8-6f87-3f82-9fce-d3051fc543ca@samsung.com> <20201028130050.GL1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201028_090946_397840_C3467CAD X-CRM114-Status: GOOD ( 20.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux Samsung SOC , Nicolas Pitre , Linus Walleij , Krzysztof Kozlowski , Rob Herring , =?iso-8859-1?Q?C=E9dric?= Le Goater , Florian Fainelli , Joel Stanley , Linux ARM , Marek Szyprowski Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 28, 2020 at 02:04:41PM +0100, Ard Biesheuvel wrote: > On Wed, 28 Oct 2020 at 14:01, Russell King - ARM Linux admin > wrote: > > > > On Wed, Oct 28, 2020 at 01:52:48PM +0100, Ard Biesheuvel wrote: > > > Does this help? > > > > > > diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h > > > index bb79e52aeb90..4f355bda872a 100644 > > > --- a/arch/arm/include/asm/memory.h > > > +++ b/arch/arm/include/asm/memory.h > > > @@ -68,8 +68,8 @@ > > > #define XIP_VIRT_ADDR(physaddr) (MODULES_VADDR + ((physaddr) & 0x000fffff)) > > > > > > #define FDT_FIXED_BASE UL(0xff800000) > > > -#define FDT_FIXED_SIZE (2 * PMD_SIZE) > > > -#define FDT_VIRT_ADDR(physaddr) ((void *)(FDT_FIXED_BASE | > > > (physaddr) % PMD_SIZE)) > > > +#define FDT_FIXED_SIZE (2 * SECTION_SIZE) > > > +#define FDT_VIRT_ADDR(physaddr) ((void *)(FDT_FIXED_BASE | > > > (physaddr) % SECTION_SIZE)) > > > > Is this correct? If the FDT fixed size is 2x, why does FDT_VIRT_ADDR() > > only work for half of it? > > > > Perhaps the naming is confusing. This is only used to obtain the start > of the virtually mapped DT, which amounts to the virtual address of > the section plus the physical address modulo the section size. > > I will rename physaddr to physbase when I respin this as a patch. > Shall I rename FDT_VIRT_ADDR to FDT_VIRT_BASE as well? Yes please, I think that makes it clearer what is going on here. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel