Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3592149ybx; Sun, 3 Nov 2019 22:57:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwBVp7FicPN51+9S50j7I88W+YyhPgcL9ig7YpBIpIJA28UlNrfKf39a7VN/iaSIlKfou8p X-Received: by 2002:a50:c3c5:: with SMTP id i5mr27764636edf.137.1572850676036; Sun, 03 Nov 2019 22:57:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572850676; cv=none; d=google.com; s=arc-20160816; b=Ovy6f74mzp1kMjChoRl9aonYeil7oW62rWtwU4UQy5CNjfoaO2wUOMOZuZG/JhQiTH WiyYUB+Bg/B/fW7WSsgvbhchY2ofVv40l3SmDiczNlwXaSnkDP8pA9H5yssQ+ANgjlCF V4mx3ocmY33Lp4gmfOQlTB6nFDBisHwIjWLX+3I0xSbgXV9/1Rz0chOhVvAChSj+z5oE 9bRTnzFaYg6vt//ImEd2qN8ypWdYzHaNNbN7nHh3Sx2xYP7uxKceeif3Gjc1It7FhvKV g2J1KbWPVSZqPyd4k7SK/wQcSudC0AM8ANJa+xKYddi8yPzFO8xA3IHeFot0lUrUK4E5 Ydeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=u4C86+zcrlt5gcDZ2OZkjxfMRM3xhzSXmlSaUCRrhUM=; b=QwKsy3UNrofGBNLp/4ZL3lRrgNd8gn6jhC45cRrqyGYCpDJ3cUyvVzeSjCn9RMkGYm ZX4uT+sL8nWdFNaDsh92ktX6kDeZOG6iPLlqx1qp0Ka7MO4uSOMJitD2TEyOM0G9aIMY RrEzQi/AIQAlw6lEKElwdHnLWEoccxq9Wfb0fr7TZx8FrhKbZwmFjLNQHbKm03vG0ThO NXnOAquacVNR5TxLCqrfrZixo9ttRIsax4kXPBGT8s6krGbWkhtFExlzwm6doFcnwRza ZXagb5HFiEjMBBWsLkHg0h4sm/aYo9rq/R0+/wUk5PHKc1sjABpvGkEbEO6QFLR45aNr KSjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ufvujDJ1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e12si163800ejx.169.2019.11.03.22.57.32; Sun, 03 Nov 2019 22:57:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ufvujDJ1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727891AbfKDG4p (ORCPT + 99 others); Mon, 4 Nov 2019 01:56:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:60116 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726018AbfKDG4o (ORCPT ); Mon, 4 Nov 2019 01:56:44 -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 1839C218BA; Mon, 4 Nov 2019 06:56:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572850603; bh=UZnL6W7fzoNmw/OhMkvyyycP1QZb12IQhJVsWVGz/RM=; h=From:To:Cc:Subject:Date:From; b=ufvujDJ1qgAhIW3qe+bdVZEO5E0rHqYZjnBUzokF/oP9AoBsEdc+R3+3P8/YoTj4a tJ3bOXhmsQlaHy6LkAxQ8wDo6IehWpMyU7ldbTRMOqA6u6CDlfEl7g7nsljw27SjWB Kb/0cibANxe63PHtc/MRt9uonFlMuQIjaA1hEmh4= 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 v3 00/13] mm: remove __ARCH_HAS_4LEVEL_HACK Date: Mon, 4 Nov 2019 08:56:14 +0200 Message-Id: <1572850587-20314-1-git-send-email-rppt@kernel.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. 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 | 36 ++++++++++---- arch/m68k/mm/mcfmmu.c | 16 +++++- arch/m68k/mm/motorola.c | 17 ++++--- 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 --- 63 files changed, 476 insertions(+), 415 deletions(-) delete mode 100644 include/asm-generic/4level-fixup.h -- 2.7.4