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 91A89C433FE for ; Mon, 7 Nov 2022 15:23:20 +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=W9gN2/pXsUAILF/eCYSCp6XCk7WAVpUqV3Gx7Cl5jIw=; b=o6oe8dwEpFBSxx a0lGkYjJQnyWhmCRI9fN0lge2Nj7gnhY4z5MKlvS5p78sq0vU+NACMXIhXdv5Z0br4FTiVx8EPjMM I4wh0A7zYfr7m765JWEUBdfrG0AeI0Ogn+auN5wLqfvgo1eHB0hXpNPVEwynbcynnlLB6DfHxulvB EA7Xemmw/Bsxz7qATA6zhZQfu0ucZ3XojnPSqT7pJZ5YHfhS9t2aXOW810TP5GsUOdXzlTQqs6aWU U4aCxgLzoJsHOJHg3+mEGYQC+KU1wvCWWMrXT0KlXIviXV1W9DL/8BLuXECm8V+xsIlTgDyqkLz6V i7C9P/CVhuzh58Ib782Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1os3x7-00Fied-PB; Mon, 07 Nov 2022 15:22:21 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1os3x4-00Fidk-F1 for linux-arm-kernel@lists.infradead.org; Mon, 07 Nov 2022 15:22:20 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AB6E461160; Mon, 7 Nov 2022 15:22:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01515C433D6; Mon, 7 Nov 2022 15:22:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667834537; bh=OYUHLAPJWyPa/H5fhUgrmenN+TLLynz5KOOVnybBBvc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Aa/nLlktGvvTWsZoXdn5Hnt8CNgOBa24ljGrUx8zv3L/i6XFLs8b75snKAkOk/0OC AZciHDgOqlM30EuL0h1+1V8pZuvlDc2+MLnm9FJDdnRFzYT6wHXo69DvutjKM97jbI jB+gBpGKQH9Q62tTXkS6VJF51CDdgs/RIJ9DvY2otL6QWoY1pepakBPNH09JLGTB30 N9g1XSetxG6UXNutjOuhxa9Izng/QjochstRt8mAR1+x+AocVa8s/FTrjZQ7/uZtJ2 V4bIa5HJZZcyPQi42oMzwF4pTSDvnTa0QfotDaM0zshhy28px9wj86C2PADItfGEHy 3/qpz8ty2mAOA== Date: Mon, 7 Nov 2022 15:22:12 +0000 From: Will Deacon To: Anshuman Khandual Cc: Joey Gouly , linux-arm-kernel@lists.infradead.org, Catalin Marinas , nd@arm.com Subject: Re: [PATCH] arm64/mm: Drop ARM64_KERNEL_USES_PMD_MAPS Message-ID: <20221107152210.GC21002@willie-the-truck> References: <20220923130841.1382741-1-anshuman.khandual@arm.com> <20220923133802.GA22477@e124191.cambridge.arm.com> <089026ad-7569-c173-301a-5de2f107a823@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <089026ad-7569-c173-301a-5de2f107a823@arm.com> 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-20221107_072218_565656_16F1618E X-CRM114-Status: GOOD ( 20.46 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel