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 D71FBC433FE for ; Tue, 8 Nov 2022 02:33:56 +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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qon3+o8YR2d+WoYRjvjRT4wJ3etnUkZ1OOQh7xlfmts=; b=0lr9pIDcBkQxhW T5kwrlgH62n8Z1GmCze9dekoS5cLPnHpskhJXdUQNI17Wi6FnKZWsmFLjjCw14JtbRHCRV9l1kKdH mhbNOv/Lb7S/U4U6/yJYnLMZ8RuDvNHe9QFM8Ab3vKlU1fSPOHS3udSA3yot4vF/YtXzFI24oC6o/ 24r3kvJ3ZskGDHKMit4kbJY+CHzLooc6laTFkqlEze6fAYT5wFQEiyLNa66qMafjywuijqNU7gH13 4nsawwcQeO4MJUr9zON8EaYVdxZd9jEpBGXx3UbyGdvkvND/XQG5FPjlCpeSsxHQ/uvcjGKCmGwYA 7gyFRG2e8pWYGSvoxB3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osEPw-0022Up-8k; Tue, 08 Nov 2022 02:32:48 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osEPq-0022Sa-TM for linux-arm-kernel@lists.infradead.org; Tue, 08 Nov 2022 02:32:45 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A3F781FB; Mon, 7 Nov 2022 18:32:43 -0800 (PST) Received: from [10.162.43.6] (unknown [10.162.43.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DF2803F534; Mon, 7 Nov 2022 18:32:35 -0800 (PST) Message-ID: <98a77143-afd4-ef15-4db4-9f4e56f71536@arm.com> Date: Tue, 8 Nov 2022 08:02:32 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] arm64/mm: Drop ARM64_KERNEL_USES_PMD_MAPS Content-Language: en-US To: Will Deacon Cc: Joey Gouly , linux-arm-kernel@lists.infradead.org, Catalin Marinas , nd@arm.com References: <20220923130841.1382741-1-anshuman.khandual@arm.com> <20220923133802.GA22477@e124191.cambridge.arm.com> <089026ad-7569-c173-301a-5de2f107a823@arm.com> <20221107152210.GC21002@willie-the-truck> From: Anshuman Khandual In-Reply-To: <20221107152210.GC21002@willie-the-truck> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221107_183243_043480_E8CEB78D X-CRM114-Status: GOOD ( 13.23 ) 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 11/7/22 20:52, Will Deacon wrote: > On Mon, Sep 26, 2022 at 08:48:22AM +0530, Anshuman Khandual wrote: >> On 9/23/22 19:08, Joey Gouly wrote: >>> On Fri, Sep 23, 2022 at 06:38:41PM +0530, Anshuman Khandual wrote: >>>> Currently ARM64_KERNEL_USES_PMD_MAPS is an unnecessary abstraction. Kernel >>>> mapping at PMD (aka huge page aka block) level, is only applicable with 4K >>>> base page, which makes it 2MB aligned, a necessary requirement for linear >>>> mapping and physical memory start address. This can be easily achieved by >>>> directly checking against base page size itself. This drops off the macro >>>> ARM64_KERNE_USES_PMD_MAPS which is redundant. >>>> >>>> Cc: Catalin Marinas >>>> Cc: Will Deacon >>>> Cc: linux-arm-kernel@lists.infradead.org >>>> Signed-off-by: Anshuman Khandual >>>> --- >>>> This applies on v6.0-rc6 after the following patch. >>>> >>>> https://lore.kernel.org/all/20220920014951.196191-1-wangkefeng.wang@huawei.com/ >>>> >>>> arch/arm64/include/asm/kernel-pgtable.h | 33 +++++++++---------------- >>>> arch/arm64/mm/mmu.c | 2 +- >>>> 2 files changed, 12 insertions(+), 23 deletions(-) > > [...] > >>>> @@ -96,15 +101,6 @@ >>>> #define INIT_IDMAP_DIR_PAGES EARLY_PAGES(KIMAGE_VADDR, _end + MAX_FDT_SIZE + SWAPPER_BLOCK_SIZE, 1) >>>> >>>> /* Initial memory map size */ >>>> -#if ARM64_KERNEL_USES_PMD_MAPS >>>> -#define SWAPPER_BLOCK_SHIFT PMD_SHIFT >>>> -#define SWAPPER_BLOCK_SIZE PMD_SIZE >>>> -#define SWAPPER_TABLE_SHIFT PUD_SHIFT >>>> -#else >>>> -#define SWAPPER_BLOCK_SHIFT PAGE_SHIFT >>>> -#define SWAPPER_BLOCK_SIZE PAGE_SIZE >>>> -#define SWAPPER_TABLE_SHIFT PMD_SHIFT >>>> -#endif >>> >>> Also a dangling comment here. >> >> These ? can be dropped off without much problem. >> >> /* Initial memory map size */ >> /* >> * Initial memory map attributes. >> */ >> >> Will try to re-arrange these comments next time around. > > Did you post another version of this, or change your mind about it? Will post another version soon. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel