From patchwork Wed Apr 28 16:46:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 12229729 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=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 30307C433B4 for ; Wed, 28 Apr 2021 16:48:22 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 BB26561400 for ; Wed, 28 Apr 2021 16:48:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB26561400 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgroup.eu Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Date:Cc:To:Subject:From:Message-Id: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=l7oH8SGx49RB0H94RoyU+59D19Wj9YRoR5cFB3bMB1A=; b=YI8CSJz8iVfvpjfwQXrelINpHG KUryFrYbK09msMoDyYVcvc5m2uXHkPGLTtkG1OtBK6cw0oWp+v6iAH3U7n1yKviv2Mk+jKalk91G/ 5GYu4hTAHpA1+zUGWiHnXee+EoCgCEhIywVHWSSh+FE669nVc2NytQ5ivq6yHL5SzfW7+5K0FZ5Ap q5knouRVIznaYc/VOzTgvtCTpetsrAADTwMLuxkppHMvkEQdKjzlvcuPi3aLbnXqZl/i3OUOdGciB UKZCNxmuu0FreYxCYfe37+a4p4uyt06m5Nkv+IOzqZOfDGkM3uf1nFG07b1q8X2vUUB1EectIiDpZ B8kEZOBg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbnKh-003sqe-Ve; Wed, 28 Apr 2021 16:46:40 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbnKO-003skj-Cj for linux-arm-kernel@desiato.infradead.org; Wed, 28 Apr 2021 16:46:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Date:Cc:To:Subject:From:Message-Id: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=8dWKeYvvimqYtkJfd/myKId8QejXF02+siiCDGN5FdU=; b=5G8YMiu4vMK7PlcJz4xTdt8CmL kbZXeqgtMVCJFXEmaZdRNWk41AG4Z/OK98HZEYDpB43NwdqgZ4KE2eGkbwoOx7t7UjmLypHynDXyC VJbuhFHKPk47SUd0Vn8LW5ywLOwULsTn4NZcs/GVWeFf8fhvvkAprQxy1aZREhIVRakVTPv0fU4tW UDoFP7Qr70+zXTAkgrzJh149gm5vrlbPDQ2lORgdJBYURwo1vaSpsaxnhAlx3b7Q7Rp9cG+SwHHBt mE/c1H0zZU5J/GXgFX9isj7ri/EjOR8ZAKafNea8GAR6YFQlQaVaFZ9IXRvnjqezbZ2P1PWK2QHlS 2X8FAGrA==; Received: from pegase1.c-s.fr ([93.17.236.30]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbnKJ-0001t7-BK for linux-arm-kernel@lists.infradead.org; Wed, 28 Apr 2021 16:46:17 +0000 Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4FVkzS05MQz9tcb; Wed, 28 Apr 2021 18:46:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0mBuk7O_7kHk; Wed, 28 Apr 2021 18:46:11 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4FVkzR6Cxgz9tcY; Wed, 28 Apr 2021 18:46:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 720158B839; Wed, 28 Apr 2021 18:46:11 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id ikFClZJogkW5; Wed, 28 Apr 2021 18:46:11 +0200 (CEST) Received: from po15610vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id EDB278B831; Wed, 28 Apr 2021 18:46:10 +0200 (CEST) Received: by po15610vm.idsi0.si.c-s.fr (Postfix, from userid 0) id B90C16428C; Wed, 28 Apr 2021 16:46:10 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [RFC PATCH v1 0/4] Implement huge VMAP and VMALLOC on powerpc 8xx To: Andrew Morton , Nicholas Piggin , Mike Kravetz , Mike Rapoport Cc: linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sparclinux@vger.kernel.org, linux-mm@kvack.org Date: Wed, 28 Apr 2021 16:46:10 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210428_094615_581806_892C05A1 X-CRM114-Status: UNSURE ( 8.50 ) X-CRM114-Notice: Please train this message. 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series is a first tentative to implement huge VMAP and VMALLOC on powerpc 8xx. This series applies on Linux next. For the time being the 8xx specificities are plugged directly into generic mm functions. I have no real idea on how to make it a nice beautiful generic implementation for the time being, hence this RFC in order to get suggestions. powerpc 8xx has 4 page sizes: - 4k - 16k - 512k - 8M At the time being, vmalloc and vmap only support huge pages which are leaf at PMD level. Here the PMD level is 4M, it doesn't correspond to any supported page size. For the time being, implement use of 16k and 512k pages which is done at PTE level. Support of 8M pages will be implemented later, it requires use of hugepd tables. Christophe Leroy (4): mm/ioremap: Fix iomap_max_page_shift mm/hugetlb: Change parameters of arch_make_huge_pte() mm/pgtable: Add stubs for {pmd/pub}_{set/clear}_huge mm/vmalloc: Add support for huge pages on VMAP and VMALLOC for powerpc 8xx arch/arm64/include/asm/hugetlb.h | 3 +- arch/arm64/mm/hugetlbpage.c | 5 +- arch/powerpc/Kconfig | 3 +- .../include/asm/nohash/32/hugetlb-8xx.h | 5 +- arch/sparc/include/asm/pgtable_64.h | 3 +- arch/sparc/mm/hugetlbpage.c | 6 +- include/linux/hugetlb.h | 4 +- include/linux/pgtable.h | 26 ++++++- mm/hugetlb.c | 6 +- mm/ioremap.c | 6 +- mm/migrate.c | 4 +- mm/vmalloc.c | 74 ++++++++++++++++--- 12 files changed, 111 insertions(+), 34 deletions(-)