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=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no 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 D90F7CA9EDA for ; Tue, 5 Nov 2019 07:16:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A688E21928 for ; Tue, 5 Nov 2019 07:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572938161; bh=kjNCQHuIO20IAKAWjmpzSoXh0rbx0a5UW2oa2LBkQmM=; h=From:To:Cc:Subject:Date:List-ID:From; b=0gwZwkdO8Rcrq+04odwTEjZpe3nknM9gOLZQrooiBqDeZGdvSAQMw/CHa54IiQPZA 4TLMSIgYV2UZ22yHfh+iyhGkvTcRlpiDJmNiLZwThha+NbBI7ZJWUmCZckjGiJ0bhi w9dKv+Jv57CUCc16Yvjq/fYmUhyMhrPLJ8UWirSc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387686AbfKEHPv (ORCPT ); Tue, 5 Nov 2019 02:15:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:34332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387442AbfKEHPv (ORCPT ); Tue, 5 Nov 2019 02:15:51 -0500 Received: from aquarius.haifa.ibm.com (nesher1.haifa.il.ibm.com [195.110.40.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 376E820663; Tue, 5 Nov 2019 07:15:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572938149; bh=kjNCQHuIO20IAKAWjmpzSoXh0rbx0a5UW2oa2LBkQmM=; h=From:To:Cc:Subject:Date:From; b=e8CnLOFFAk03scBwXT2glhNQqZljnzKpdDdV9ssLH4vgZwUfT7sZlsQa0jZMc56FG hU/h/q0Zcr6pcZ40FngsJHQtvgJijqR5HEkxJc+40V8Vuj3up2Q03COp7V+pPOallg fILpyL0bn+D110+yGHv3uHDLybDa4PupJWXc/fN8= From: Mike Rapoport To: linux-mm@kvack.org Cc: Andrew Morton , Anton Ivanov , Arnd Bergmann , "David S. Miller" , Geert Uytterhoeven , Greentime Hu , Greg Ungerer , Helge Deller , "James E.J. Bottomley" , Jeff Dike , "Kirill A. Shutemov" , Linus Torvalds , Mark Salter , Matt Turner , Michal Simek , Peter Rosin , Richard Weinberger , Rolf Eike Beer , Russell King , Sam Creasey , Vincent Chen , Vineet Gupta , Mike Rapoport , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-parisc@vger.kernel.org, linux-um@lists.infradead.org, sparclinux@vger.kernel.org, Mike Rapoport Subject: [PATCH v4 00/13] mm: remove __ARCH_HAS_4LEVEL_HACK Date: Tue, 5 Nov 2019 09:15:22 +0200 Message-Id: <1572938135-31886-1-git-send-email-rppt@kernel.org> X-Mailer: git-send-email 2.7.4 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_4LEVEL_HACK along with include/asm-generic/4level-fixup.h. For the nommu configurations the folding is already implemented by the generic code so the only change was to use the appropriate header file. As for the rest, the changes are mostly about mechanical replacement of pgd accessors with pud/pmd ones and the addition of higher levels to page table traversals. With Vineet's patches from "elide extraneous generated code for folded p4d/pud/pmd" series [1] there is a small shrink of the kernel size of about -0.01% for the defconfig builds. The set is boot-tested on UML, qemu-{alpha,sparc} and aranym. v4 changes: * m68k: fix sun3x_defconfig build and reorder ifdefs as per Geert's suggestion v3 changes: * alpha: fix changelog to use pgtable-nopud.h rather than pgtable-nop4d.h * um: remove dead-code that was intended as provisioning for 4-level page tables v2 changes: * m68k: fixed ifdefs around pmd_t defintion to work with nommu * parisc: added conversion of hugetlb (thanks, Helge!); lexical fixups in comments and changelog * collected acks [1] https://lore.kernel.org/lkml/20191016162400.14796-1-vgupta@synopsys.com Helge Deller (1): parisc/hugetlb: use pgtable-nopXd instead of 4level-fixup Mike Rapoport (12): alpha: use pgtable-nopud instead of 4level-fixup arm: nommu: use pgtable-nopud instead of 4level-fixup c6x: use pgtable-nopud instead of 4level-fixup m68k: nommu: use pgtable-nopud instead of 4level-fixup m68k: mm: use pgtable-nopXd instead of 4level-fixup microblaze: use pgtable-nopmd instead of 4level-fixup nds32: use pgtable-nopmd instead of 4level-fixup parisc: use pgtable-nopXd instead of 4level-fixup sparc32: use pgtable-nopud instead of 4level-fixup um: remove unused pxx_offset_proc() and addr_pte() functions um: add support for folded p4d page tables mm: remove __ARCH_HAS_4LEVEL_HACK and include/asm-generic/4level-fixup.h arch/alpha/include/asm/mmzone.h | 1 - arch/alpha/include/asm/pgalloc.h | 4 +- arch/alpha/include/asm/pgtable.h | 24 ++++----- arch/alpha/mm/init.c | 12 +++-- arch/arm/include/asm/pgtable.h | 2 +- arch/c6x/include/asm/pgtable.h | 2 +- arch/m68k/include/asm/mcf_pgalloc.h | 7 --- arch/m68k/include/asm/mcf_pgtable.h | 28 ++++------- arch/m68k/include/asm/mmu_context.h | 12 ++++- arch/m68k/include/asm/motorola_pgalloc.h | 4 +- arch/m68k/include/asm/motorola_pgtable.h | 32 +++++++----- arch/m68k/include/asm/page.h | 9 ++-- arch/m68k/include/asm/pgtable_mm.h | 11 +++-- arch/m68k/include/asm/pgtable_no.h | 2 +- arch/m68k/include/asm/sun3_pgalloc.h | 5 -- arch/m68k/include/asm/sun3_pgtable.h | 18 ------- arch/m68k/kernel/sys_m68k.c | 10 +++- arch/m68k/mm/init.c | 6 ++- arch/m68k/mm/kmap.c | 39 +++++++++++---- arch/m68k/mm/mcfmmu.c | 16 +++++- arch/m68k/mm/motorola.c | 17 ++++--- arch/m68k/sun3x/dvma.c | 7 ++- arch/microblaze/include/asm/page.h | 3 -- arch/microblaze/include/asm/pgalloc.h | 16 ------ arch/microblaze/include/asm/pgtable.h | 32 +----------- arch/microblaze/kernel/signal.c | 10 ++-- arch/microblaze/mm/init.c | 7 ++- arch/microblaze/mm/pgtable.c | 13 ++++- arch/nds32/include/asm/page.h | 3 -- arch/nds32/include/asm/pgalloc.h | 3 -- arch/nds32/include/asm/pgtable.h | 12 +---- arch/nds32/include/asm/tlb.h | 1 - arch/nds32/kernel/pm.c | 4 +- arch/nds32/mm/fault.c | 16 ++++-- arch/nds32/mm/init.c | 11 +++-- arch/nds32/mm/mm-nds32.c | 6 ++- arch/nds32/mm/proc.c | 26 ++++++---- arch/parisc/include/asm/page.h | 30 ++++++----- arch/parisc/include/asm/pgalloc.h | 41 ++++++--------- arch/parisc/include/asm/pgtable.h | 52 ++++++++++--------- arch/parisc/include/asm/tlb.h | 2 + arch/parisc/kernel/cache.c | 13 +++-- arch/parisc/kernel/pci-dma.c | 9 +++- arch/parisc/mm/fixmap.c | 10 ++-- arch/parisc/mm/hugetlbpage.c | 18 ++++--- arch/sparc/include/asm/pgalloc_32.h | 6 +-- arch/sparc/include/asm/pgtable_32.h | 28 +++++------ arch/sparc/mm/fault_32.c | 11 ++++- arch/sparc/mm/highmem.c | 6 ++- arch/sparc/mm/io-unit.c | 6 ++- arch/sparc/mm/iommu.c | 6 ++- arch/sparc/mm/srmmu.c | 51 ++++++++++++++----- arch/um/include/asm/pgtable-2level.h | 1 - arch/um/include/asm/pgtable-3level.h | 1 - arch/um/include/asm/pgtable.h | 3 ++ arch/um/kernel/mem.c | 8 ++- arch/um/kernel/skas/mmu.c | 12 ++++- arch/um/kernel/skas/uaccess.c | 7 ++- arch/um/kernel/tlb.c | 85 +++++++++++++++++++------------- arch/um/kernel/trap.c | 4 +- include/asm-generic/4level-fixup.h | 40 --------------- include/asm-generic/tlb.h | 2 - include/linux/mm.h | 10 ++-- mm/memory.c | 8 --- 64 files changed, 483 insertions(+), 418 deletions(-) delete mode 100644 include/asm-generic/4level-fixup.h -- 2.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Rapoport Subject: [PATCH v4 00/13] mm: remove __ARCH_HAS_4LEVEL_HACK Date: Tue, 5 Nov 2019 09:15:22 +0200 Message-ID: <1572938135-31886-1-git-send-email-rppt@kernel.org> Return-path: Sender: linux-kernel-owner@vger.kernel.org To: linux-mm@kvack.org Cc: Andrew Morton , Anton Ivanov , Arnd Bergmann , "David S. Miller" , Geert Uytterhoeven , Greentime Hu , Greg Ungerer , Helge Deller , "James E.J. Bottomley" , Jeff Dike , "Kirill A. Shutemov" , Linus Torvalds , Mark Salter , Matt Turner , Michal Simek , Peter Rosin , Richard Weinberger , Rolf Eike Beer , Russell King , Sam List-Id: linux-arch.vger.kernel.org From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_4LEVEL_HACK along with include/asm-generic/4level-fixup.h. For the nommu configurations the folding is already implemented by the generic code so the only change was to use the appropriate header file. As for the rest, the changes are mostly about mechanical replacement of pgd accessors with pud/pmd ones and the addition of higher levels to page table traversals. With Vineet's patches from "elide extraneous generated code for folded p4d/pud/pmd" series [1] there is a small shrink of the kernel size of about -0.01% for the defconfig builds. The set is boot-tested on UML, qemu-{alpha,sparc} and aranym. v4 changes: * m68k: fix sun3x_defconfig build and reorder ifdefs as per Geert's suggestion v3 changes: * alpha: fix changelog to use pgtable-nopud.h rather than pgtable-nop4d.h * um: remove dead-code that was intended as provisioning for 4-level page tables v2 changes: * m68k: fixed ifdefs around pmd_t defintion to work with nommu * parisc: added conversion of hugetlb (thanks, Helge!); lexical fixups in comments and changelog * collected acks [1] https://lore.kernel.org/lkml/20191016162400.14796-1-vgupta@synopsys.com Helge Deller (1): parisc/hugetlb: use pgtable-nopXd instead of 4level-fixup Mike Rapoport (12): alpha: use pgtable-nopud instead of 4level-fixup arm: nommu: use pgtable-nopud instead of 4level-fixup c6x: use pgtable-nopud instead of 4level-fixup m68k: nommu: use pgtable-nopud instead of 4level-fixup m68k: mm: use pgtable-nopXd instead of 4level-fixup microblaze: use pgtable-nopmd instead of 4level-fixup nds32: use pgtable-nopmd instead of 4level-fixup parisc: use pgtable-nopXd instead of 4level-fixup sparc32: use pgtable-nopud instead of 4level-fixup um: remove unused pxx_offset_proc() and addr_pte() functions um: add support for folded p4d page tables mm: remove __ARCH_HAS_4LEVEL_HACK and include/asm-generic/4level-fixup.h arch/alpha/include/asm/mmzone.h | 1 - arch/alpha/include/asm/pgalloc.h | 4 +- arch/alpha/include/asm/pgtable.h | 24 ++++----- arch/alpha/mm/init.c | 12 +++-- arch/arm/include/asm/pgtable.h | 2 +- arch/c6x/include/asm/pgtable.h | 2 +- arch/m68k/include/asm/mcf_pgalloc.h | 7 --- arch/m68k/include/asm/mcf_pgtable.h | 28 ++++------- arch/m68k/include/asm/mmu_context.h | 12 ++++- arch/m68k/include/asm/motorola_pgalloc.h | 4 +- arch/m68k/include/asm/motorola_pgtable.h | 32 +++++++----- arch/m68k/include/asm/page.h | 9 ++-- arch/m68k/include/asm/pgtable_mm.h | 11 +++-- arch/m68k/include/asm/pgtable_no.h | 2 +- arch/m68k/include/asm/sun3_pgalloc.h | 5 -- arch/m68k/include/asm/sun3_pgtable.h | 18 ------- arch/m68k/kernel/sys_m68k.c | 10 +++- arch/m68k/mm/init.c | 6 ++- arch/m68k/mm/kmap.c | 39 +++++++++++---- arch/m68k/mm/mcfmmu.c | 16 +++++- arch/m68k/mm/motorola.c | 17 ++++--- arch/m68k/sun3x/dvma.c | 7 ++- arch/microblaze/include/asm/page.h | 3 -- arch/microblaze/include/asm/pgalloc.h | 16 ------ arch/microblaze/include/asm/pgtable.h | 32 +----------- arch/microblaze/kernel/signal.c | 10 ++-- arch/microblaze/mm/init.c | 7 ++- arch/microblaze/mm/pgtable.c | 13 ++++- arch/nds32/include/asm/page.h | 3 -- arch/nds32/include/asm/pgalloc.h | 3 -- arch/nds32/include/asm/pgtable.h | 12 +---- arch/nds32/include/asm/tlb.h | 1 - arch/nds32/kernel/pm.c | 4 +- arch/nds32/mm/fault.c | 16 ++++-- arch/nds32/mm/init.c | 11 +++-- arch/nds32/mm/mm-nds32.c | 6 ++- arch/nds32/mm/proc.c | 26 ++++++---- arch/parisc/include/asm/page.h | 30 ++++++----- arch/parisc/include/asm/pgalloc.h | 41 ++++++--------- arch/parisc/include/asm/pgtable.h | 52 ++++++++++--------- arch/parisc/include/asm/tlb.h | 2 + arch/parisc/kernel/cache.c | 13 +++-- arch/parisc/kernel/pci-dma.c | 9 +++- arch/parisc/mm/fixmap.c | 10 ++-- arch/parisc/mm/hugetlbpage.c | 18 ++++--- arch/sparc/include/asm/pgalloc_32.h | 6 +-- arch/sparc/include/asm/pgtable_32.h | 28 +++++------ arch/sparc/mm/fault_32.c | 11 ++++- arch/sparc/mm/highmem.c | 6 ++- arch/sparc/mm/io-unit.c | 6 ++- arch/sparc/mm/iommu.c | 6 ++- arch/sparc/mm/srmmu.c | 51 ++++++++++++++----- arch/um/include/asm/pgtable-2level.h | 1 - arch/um/include/asm/pgtable-3level.h | 1 - arch/um/include/asm/pgtable.h | 3 ++ arch/um/kernel/mem.c | 8 ++- arch/um/kernel/skas/mmu.c | 12 ++++- arch/um/kernel/skas/uaccess.c | 7 ++- arch/um/kernel/tlb.c | 85 +++++++++++++++++++------------- arch/um/kernel/trap.c | 4 +- include/asm-generic/4level-fixup.h | 40 --------------- include/asm-generic/tlb.h | 2 - include/linux/mm.h | 10 ++-- mm/memory.c | 8 --- 64 files changed, 483 insertions(+), 418 deletions(-) delete mode 100644 include/asm-generic/4level-fixup.h -- 2.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Rapoport Date: Tue, 05 Nov 2019 07:15:22 +0000 Subject: [PATCH v4 00/13] mm: remove __ARCH_HAS_4LEVEL_HACK Message-Id: <1572938135-31886-1-git-send-email-rppt@kernel.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-mm@kvack.org Cc: Andrew Morton , Anton Ivanov , Arnd Bergmann , "David S. Miller" , Geert Uytterhoeven , Greentime Hu , Greg Ungerer , Helge Deller , "James E.J. Bottomley" , Jeff Dike , "Kirill A. Shutemov" , Linus Torvalds , Mark Salter , Matt Turner , Michal Simek , Peter Rosin , Richard Weinberger , Rolf Eike Beer , Russell King , Sam From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_4LEVEL_HACK along with include/asm-generic/4level-fixup.h. For the nommu configurations the folding is already implemented by the generic code so the only change was to use the appropriate header file. As for the rest, the changes are mostly about mechanical replacement of pgd accessors with pud/pmd ones and the addition of higher levels to page table traversals. With Vineet's patches from "elide extraneous generated code for folded p4d/pud/pmd" series [1] there is a small shrink of the kernel size of about -0.01% for the defconfig builds. The set is boot-tested on UML, qemu-{alpha,sparc} and aranym. v4 changes: * m68k: fix sun3x_defconfig build and reorder ifdefs as per Geert's suggestion v3 changes: * alpha: fix changelog to use pgtable-nopud.h rather than pgtable-nop4d.h * um: remove dead-code that was intended as provisioning for 4-level page tables v2 changes: * m68k: fixed ifdefs around pmd_t defintion to work with nommu * parisc: added conversion of hugetlb (thanks, Helge!); lexical fixups in comments and changelog * collected acks [1] https://lore.kernel.org/lkml/20191016162400.14796-1-vgupta@synopsys.com Helge Deller (1): parisc/hugetlb: use pgtable-nopXd instead of 4level-fixup Mike Rapoport (12): alpha: use pgtable-nopud instead of 4level-fixup arm: nommu: use pgtable-nopud instead of 4level-fixup c6x: use pgtable-nopud instead of 4level-fixup m68k: nommu: use pgtable-nopud instead of 4level-fixup m68k: mm: use pgtable-nopXd instead of 4level-fixup microblaze: use pgtable-nopmd instead of 4level-fixup nds32: use pgtable-nopmd instead of 4level-fixup parisc: use pgtable-nopXd instead of 4level-fixup sparc32: use pgtable-nopud instead of 4level-fixup um: remove unused pxx_offset_proc() and addr_pte() functions um: add support for folded p4d page tables mm: remove __ARCH_HAS_4LEVEL_HACK and include/asm-generic/4level-fixup.h arch/alpha/include/asm/mmzone.h | 1 - arch/alpha/include/asm/pgalloc.h | 4 +- arch/alpha/include/asm/pgtable.h | 24 ++++----- arch/alpha/mm/init.c | 12 +++-- arch/arm/include/asm/pgtable.h | 2 +- arch/c6x/include/asm/pgtable.h | 2 +- arch/m68k/include/asm/mcf_pgalloc.h | 7 --- arch/m68k/include/asm/mcf_pgtable.h | 28 ++++------- arch/m68k/include/asm/mmu_context.h | 12 ++++- arch/m68k/include/asm/motorola_pgalloc.h | 4 +- arch/m68k/include/asm/motorola_pgtable.h | 32 +++++++----- arch/m68k/include/asm/page.h | 9 ++-- arch/m68k/include/asm/pgtable_mm.h | 11 +++-- arch/m68k/include/asm/pgtable_no.h | 2 +- arch/m68k/include/asm/sun3_pgalloc.h | 5 -- arch/m68k/include/asm/sun3_pgtable.h | 18 ------- arch/m68k/kernel/sys_m68k.c | 10 +++- arch/m68k/mm/init.c | 6 ++- arch/m68k/mm/kmap.c | 39 +++++++++++---- arch/m68k/mm/mcfmmu.c | 16 +++++- arch/m68k/mm/motorola.c | 17 ++++--- arch/m68k/sun3x/dvma.c | 7 ++- arch/microblaze/include/asm/page.h | 3 -- arch/microblaze/include/asm/pgalloc.h | 16 ------ arch/microblaze/include/asm/pgtable.h | 32 +----------- arch/microblaze/kernel/signal.c | 10 ++-- arch/microblaze/mm/init.c | 7 ++- arch/microblaze/mm/pgtable.c | 13 ++++- arch/nds32/include/asm/page.h | 3 -- arch/nds32/include/asm/pgalloc.h | 3 -- arch/nds32/include/asm/pgtable.h | 12 +---- arch/nds32/include/asm/tlb.h | 1 - arch/nds32/kernel/pm.c | 4 +- arch/nds32/mm/fault.c | 16 ++++-- arch/nds32/mm/init.c | 11 +++-- arch/nds32/mm/mm-nds32.c | 6 ++- arch/nds32/mm/proc.c | 26 ++++++---- arch/parisc/include/asm/page.h | 30 ++++++----- arch/parisc/include/asm/pgalloc.h | 41 ++++++--------- arch/parisc/include/asm/pgtable.h | 52 ++++++++++--------- arch/parisc/include/asm/tlb.h | 2 + arch/parisc/kernel/cache.c | 13 +++-- arch/parisc/kernel/pci-dma.c | 9 +++- arch/parisc/mm/fixmap.c | 10 ++-- arch/parisc/mm/hugetlbpage.c | 18 ++++--- arch/sparc/include/asm/pgalloc_32.h | 6 +-- arch/sparc/include/asm/pgtable_32.h | 28 +++++------ arch/sparc/mm/fault_32.c | 11 ++++- arch/sparc/mm/highmem.c | 6 ++- arch/sparc/mm/io-unit.c | 6 ++- arch/sparc/mm/iommu.c | 6 ++- arch/sparc/mm/srmmu.c | 51 ++++++++++++++----- arch/um/include/asm/pgtable-2level.h | 1 - arch/um/include/asm/pgtable-3level.h | 1 - arch/um/include/asm/pgtable.h | 3 ++ arch/um/kernel/mem.c | 8 ++- arch/um/kernel/skas/mmu.c | 12 ++++- arch/um/kernel/skas/uaccess.c | 7 ++- arch/um/kernel/tlb.c | 85 +++++++++++++++++++------------- arch/um/kernel/trap.c | 4 +- include/asm-generic/4level-fixup.h | 40 --------------- include/asm-generic/tlb.h | 2 - include/linux/mm.h | 10 ++-- mm/memory.c | 8 --- 64 files changed, 483 insertions(+), 418 deletions(-) delete mode 100644 include/asm-generic/4level-fixup.h -- 2.7.4 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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=no 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 30010CA9EDA for ; Tue, 5 Nov 2019 07:15:58 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E8E1F21928 for ; Tue, 5 Nov 2019 07:15:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZajCKCR2"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="e8CnLOFF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E8E1F21928 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=kJDQjrIXuKo6eG7LEavMywwRpzq1MaduevBiGVmPND0=; b=Zaj CKCR2OibZYRyfv/dOSi4lfkA0JrxnYVxBFF4FgFF0+pftcTMUCxJOQvysuHsUbZ/PqeXqJLLrfaBv qiBsQ9sahCA9fEhyNGujaS7V7jvQ3nDmlISPRCnzMS+GUPYMBKuyUnMLCY3QWjjheV12+JXZ4AWXO bpg3vYlMXf5OjnU7FXNX7Efw7sG+BZBfU+NKTZUImbzT1ylR+I7DVpA9CFr8yivcSul2l2WvRX3th feLmpsbkte/0VpXckacoQZyMF7MjPpkKH//03KnilEqnBuFjXFi+2w9wHiIeFTRVXMFw/aoFjmJfy JXVwJi3D5RAoFV82erTKyyFUPBkCtqg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iRt4H-0005JM-8P; Tue, 05 Nov 2019 07:15:57 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iRt4D-0005I0-5c; Tue, 05 Nov 2019 07:15:54 +0000 Received: from aquarius.haifa.ibm.com (nesher1.haifa.il.ibm.com [195.110.40.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 376E820663; Tue, 5 Nov 2019 07:15:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572938149; bh=kjNCQHuIO20IAKAWjmpzSoXh0rbx0a5UW2oa2LBkQmM=; h=From:To:Cc:Subject:Date:From; b=e8CnLOFFAk03scBwXT2glhNQqZljnzKpdDdV9ssLH4vgZwUfT7sZlsQa0jZMc56FG hU/h/q0Zcr6pcZ40FngsJHQtvgJijqR5HEkxJc+40V8Vuj3up2Q03COp7V+pPOallg fILpyL0bn+D110+yGHv3uHDLybDa4PupJWXc/fN8= From: Mike Rapoport To: linux-mm@kvack.org Subject: [PATCH v4 00/13] mm: remove __ARCH_HAS_4LEVEL_HACK Date: Tue, 5 Nov 2019 09:15:22 +0200 Message-Id: <1572938135-31886-1-git-send-email-rppt@kernel.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191104_231553_257575_5975C923 X-CRM114-Status: GOOD ( 13.42 ) 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: "James E.J. Bottomley" , sparclinux@vger.kernel.org, Rolf Eike Beer , Vincent Chen , Greg Ungerer , Anton Ivanov , linux-arch@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Richard Weinberger , Helge Deller , Russell King , Mike Rapoport , Geert Uytterhoeven , Mark Salter , Matt Turner , Jeff Dike , Sam Creasey , Arnd Bergmann , Vineet Gupta , linux-um@lists.infradead.org, linux-m68k@lists.linux-m68k.org, Greentime Hu , "Kirill A. Shutemov" , linux-arm-kernel@lists.infradead.org, Michal Simek , linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , linux-alpha@vger.kernel.org, Andrew Morton , Linus Torvalds , Peter Rosin , Mike Rapoport MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_4LEVEL_HACK along with include/asm-generic/4level-fixup.h. For the nommu configurations the folding is already implemented by the generic code so the only change was to use the appropriate header file. As for the rest, the changes are mostly about mechanical replacement of pgd accessors with pud/pmd ones and the addition of higher levels to page table traversals. With Vineet's patches from "elide extraneous generated code for folded p4d/pud/pmd" series [1] there is a small shrink of the kernel size of about -0.01% for the defconfig builds. The set is boot-tested on UML, qemu-{alpha,sparc} and aranym. v4 changes: * m68k: fix sun3x_defconfig build and reorder ifdefs as per Geert's suggestion v3 changes: * alpha: fix changelog to use pgtable-nopud.h rather than pgtable-nop4d.h * um: remove dead-code that was intended as provisioning for 4-level page tables v2 changes: * m68k: fixed ifdefs around pmd_t defintion to work with nommu * parisc: added conversion of hugetlb (thanks, Helge!); lexical fixups in comments and changelog * collected acks [1] https://lore.kernel.org/lkml/20191016162400.14796-1-vgupta@synopsys.com Helge Deller (1): parisc/hugetlb: use pgtable-nopXd instead of 4level-fixup Mike Rapoport (12): alpha: use pgtable-nopud instead of 4level-fixup arm: nommu: use pgtable-nopud instead of 4level-fixup c6x: use pgtable-nopud instead of 4level-fixup m68k: nommu: use pgtable-nopud instead of 4level-fixup m68k: mm: use pgtable-nopXd instead of 4level-fixup microblaze: use pgtable-nopmd instead of 4level-fixup nds32: use pgtable-nopmd instead of 4level-fixup parisc: use pgtable-nopXd instead of 4level-fixup sparc32: use pgtable-nopud instead of 4level-fixup um: remove unused pxx_offset_proc() and addr_pte() functions um: add support for folded p4d page tables mm: remove __ARCH_HAS_4LEVEL_HACK and include/asm-generic/4level-fixup.h arch/alpha/include/asm/mmzone.h | 1 - arch/alpha/include/asm/pgalloc.h | 4 +- arch/alpha/include/asm/pgtable.h | 24 ++++----- arch/alpha/mm/init.c | 12 +++-- arch/arm/include/asm/pgtable.h | 2 +- arch/c6x/include/asm/pgtable.h | 2 +- arch/m68k/include/asm/mcf_pgalloc.h | 7 --- arch/m68k/include/asm/mcf_pgtable.h | 28 ++++------- arch/m68k/include/asm/mmu_context.h | 12 ++++- arch/m68k/include/asm/motorola_pgalloc.h | 4 +- arch/m68k/include/asm/motorola_pgtable.h | 32 +++++++----- arch/m68k/include/asm/page.h | 9 ++-- arch/m68k/include/asm/pgtable_mm.h | 11 +++-- arch/m68k/include/asm/pgtable_no.h | 2 +- arch/m68k/include/asm/sun3_pgalloc.h | 5 -- arch/m68k/include/asm/sun3_pgtable.h | 18 ------- arch/m68k/kernel/sys_m68k.c | 10 +++- arch/m68k/mm/init.c | 6 ++- arch/m68k/mm/kmap.c | 39 +++++++++++---- arch/m68k/mm/mcfmmu.c | 16 +++++- arch/m68k/mm/motorola.c | 17 ++++--- arch/m68k/sun3x/dvma.c | 7 ++- arch/microblaze/include/asm/page.h | 3 -- arch/microblaze/include/asm/pgalloc.h | 16 ------ arch/microblaze/include/asm/pgtable.h | 32 +----------- arch/microblaze/kernel/signal.c | 10 ++-- arch/microblaze/mm/init.c | 7 ++- arch/microblaze/mm/pgtable.c | 13 ++++- arch/nds32/include/asm/page.h | 3 -- arch/nds32/include/asm/pgalloc.h | 3 -- arch/nds32/include/asm/pgtable.h | 12 +---- arch/nds32/include/asm/tlb.h | 1 - arch/nds32/kernel/pm.c | 4 +- arch/nds32/mm/fault.c | 16 ++++-- arch/nds32/mm/init.c | 11 +++-- arch/nds32/mm/mm-nds32.c | 6 ++- arch/nds32/mm/proc.c | 26 ++++++---- arch/parisc/include/asm/page.h | 30 ++++++----- arch/parisc/include/asm/pgalloc.h | 41 ++++++--------- arch/parisc/include/asm/pgtable.h | 52 ++++++++++--------- arch/parisc/include/asm/tlb.h | 2 + arch/parisc/kernel/cache.c | 13 +++-- arch/parisc/kernel/pci-dma.c | 9 +++- arch/parisc/mm/fixmap.c | 10 ++-- arch/parisc/mm/hugetlbpage.c | 18 ++++--- arch/sparc/include/asm/pgalloc_32.h | 6 +-- arch/sparc/include/asm/pgtable_32.h | 28 +++++------ arch/sparc/mm/fault_32.c | 11 ++++- arch/sparc/mm/highmem.c | 6 ++- arch/sparc/mm/io-unit.c | 6 ++- arch/sparc/mm/iommu.c | 6 ++- arch/sparc/mm/srmmu.c | 51 ++++++++++++++----- arch/um/include/asm/pgtable-2level.h | 1 - arch/um/include/asm/pgtable-3level.h | 1 - arch/um/include/asm/pgtable.h | 3 ++ arch/um/kernel/mem.c | 8 ++- arch/um/kernel/skas/mmu.c | 12 ++++- arch/um/kernel/skas/uaccess.c | 7 ++- arch/um/kernel/tlb.c | 85 +++++++++++++++++++------------- arch/um/kernel/trap.c | 4 +- include/asm-generic/4level-fixup.h | 40 --------------- include/asm-generic/tlb.h | 2 - include/linux/mm.h | 10 ++-- mm/memory.c | 8 --- 64 files changed, 483 insertions(+), 418 deletions(-) delete mode 100644 include/asm-generic/4level-fixup.h -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel