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 1CF6EC4828F for ; Fri, 9 Feb 2024 17:33:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=x+hO58ZOzNme06PpPZx/qgfU3NDxh26/kIMG7vw7NK0=; b=Y+iNWsysB/4dTQ mxGou2DdqugveqjKG26kek73PjOQHHpTxeYUXbcl89Wp5Z9OTR8H1/d8Z0JJKH2OKwKv1tkZW57PW 6kYrVy1TGAs9a2BRCETJGG3OcBRtWE2v4MEs4ruKLUSUrWCO7JNkQgZ2KqQH44zXMvtFymftjmc+u iycfo2RXugjqiN9yowWcwzEMD+AVCXrR0C7t6xjAj2f2AZHlfDySBQto+jDHhoPuJOAvE+bUL0X8V eXgb/xK9Jwm6q2ueFarCu/cNq638SRBzgVe/IW+Op8uzGfjMvKtI/jBn8dcz72uu+mUUQU3TQaz1k cwraELm3fiHQc3erAy3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYUkn-0000000082g-0zXn; Fri, 09 Feb 2024 17:33:33 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYUkk-0000000081F-123e for linux-arm-kernel@lists.infradead.org; Fri, 09 Feb 2024 17:33:31 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 772F3CE20A1; Fri, 9 Feb 2024 17:33:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69D36C433C7; Fri, 9 Feb 2024 17:33:25 +0000 (UTC) Date: Fri, 9 Feb 2024 17:33:23 +0000 From: Catalin Marinas To: Mark Rutland Cc: Ard Biesheuvel , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, Will Deacon , Marc Zyngier Subject: Re: [PATCH v7 5/7] arm64: vmemmap: Avoid base2 order of struct page size to dimension region Message-ID: References: <20231213084024.2367360-9-ardb@google.com> <20231213084024.2367360-14-ardb@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240209_093330_476668_255EC88E X-CRM114-Status: GOOD ( 13.57 ) 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: , 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, Dec 13, 2023 at 02:39:30PM +0000, Mark Rutland wrote: > > On Wed, 13 Dec 2023 at 14:49, Mark Rutland wrote: > > > | #define GUARD_VA_SIZE (UL(SZ_8M)) > > > | > > > | #define FIXADDR_TOP (-GUARD_VA_SIZE) > > > | #define FIXADDR_SIZE_MAX SZ_8M > > > | #define FIXADDR_START_MIN (FIXADDR_TOP - FIXADDR_SIZE_MAX) > > > | > > > | #define PCI_IO_END (FIXADDR_START_MIN - GUARD_VA_SIZE) > > > | #define PCI_IO_START (PCI_IO_END - PCI_IO_SIZE) > > > | > > > | #define VMEMMAP_END (ALIGN_DOWN(PCI_IO_START - GUARD_VA_SIZE, SZ_1G)) > > > | #define VMEMMAP_START (VMEMMAP_END - VMEMMAP_SIZE) > > > > > > ... and in fixmap.h have: > > > > > > /* Ensure the estimate in memory.h was big enough */ > > > static_assert(FIXADDR_SIZE_MAX > FIXADDR_SIZE); [...] > What I'm trying to do is make the relationship between those regions clear *in > one place*, so that this is easier to follow, as that was one of the things I > found painful during review. That said, it's not clear cut, and I'll happily > defer to the judgement of Will and Catalin. I think Mark's proposal is slightly cleaner. There's no actual layout change, just making the maximum fixaddr size explicit in memory.h. I'm queuing this series, so Mark please send a patch on top (I'll kick off b4 ty soon). Thanks. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel