Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1597158imm; Wed, 19 Sep 2018 23:04:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZHqEhe1w8umK0KX5L3/mlQbgri78i400NDJBjjrtMsJmTvu/qhkjQsH6a9tz26z3uVTCZD X-Received: by 2002:a17:902:b03:: with SMTP id 3-v6mr5411076plq.156.1537423472730; Wed, 19 Sep 2018 23:04:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537423472; cv=none; d=google.com; s=arc-20160816; b=CAhfOn0uDiliyXY24gEZm02i70RizEufNSTTNLGBTJYV5e2ov2RdhgCVVL3fB8lp1t BTwpcbRT23OX4Agj0EflgeUiT/M1wcwp4o7CaHfwgYjrlQyfQqHcZ2YGlHG9QX31Bu0C b4X818/YtXr/tZKNUJzMWdIzwtB8HW/mes1c3/cj4K0Vu0cq7QcQRy6of2m1/rzM7L5p oHg+WPy0pHffgTUhIEM1aZJ4fjiEQf5qtRcgAYF3rxnLfYW1PbwLaVtlhq2nfyhtu8M+ 2BCvm8r3tYWS9RRjRhoGRQWNT1wKzv/zSbr7vPoStBQO9fPJji+1e0wlNjBK3Y0+QQID PA1Q== 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; bh=C/C8KzgkoxBWMUzT9G/0YpBeJhCT4sViYVz0fJKBtv0=; b=SJk5rki4Mp+vqE/JLVXeXtINAAyp+crUIecgRScHmPwZNCdi56QY19uRybCLiPk/Rn bywM008e5IUOTYBSEJAE9/fnNmNZxhQhX1set/0fG+l6Z1HAOO1iYHbpQgUCqwOlOx0J a0MHbzHoU+WECnTOZiqe9BAkaA7WCxiN7X9KPtguf0M++xeTZXJUmZWIU3s/t8p35gYz UIE1igP0OPvySokOC71JMBJhn9dxRILcTH2yQqBBiF3jX0W6JDA80LwWbsADm1VHdKq4 B1T7QucXV9mRck2HE6RzsTjsa/br/jG23rt2qnz6xggqjD2NuAlV+KET5WsAKAkrHnvU XJkA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e39-v6si23975845plg.386.2018.09.19.23.04.17; Wed, 19 Sep 2018 23:04:32 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731590AbeITLpy (ORCPT + 99 others); Thu, 20 Sep 2018 07:45:54 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:45057 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731240AbeITLpy (ORCPT ); Thu, 20 Sep 2018 07:45:54 -0400 X-Originating-IP: 79.86.19.127 Received: from alex.numericable.fr (127.19.86.79.rev.sfr.net [79.86.19.127]) (Authenticated sender: alex@ghiti.fr) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 67E5F24000D; Thu, 20 Sep 2018 06:04:01 +0000 (UTC) From: Alexandre Ghiti To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, mike.kravetz@oracle.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, tony.luck@intel.com, fenghua.yu@intel.com, ralf@linux-mips.org, paul.burton@mips.com, jhogan@kernel.org, jejb@parisc-linux.org, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, Alexandre Ghiti Subject: [PATCH v7 00/11] hugetlb: Factorize hugetlb architecture primitives Date: Thu, 20 Sep 2018 06:03:47 +0000 Message-Id: <20180920060358.16606-1-alex@ghiti.fr> X-Mailer: git-send-email 2.16.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, As suggested by people who reviewed/acked this series, please consider including this series into -mm tree. In order to reduce copy/paste of functions across architectures and then make riscv hugetlb port (and future ports) simpler and smaller, this patchset intends to factorize the numerous hugetlb primitives that are defined across all the architectures. Except for prepare_hugepage_range, this patchset moves the versions that are just pass-through to standard pte primitives into asm-generic/hugetlb.h by using the same #ifdef semantic that can be found in asm-generic/pgtable.h, i.e. __HAVE_ARCH_***. s390 architecture has not been tackled in this serie since it does not use asm-generic/hugetlb.h at all. This patchset has been compiled on all addressed architectures with success (except for parisc, but the problem does not come from this series). v7: Add Ingo Molnar Acked-By for x86. v6: - Remove nohash/32 and book3s/32 powerpc specific implementations in order to use the generic ones. - Add all the Reviewed-by, Acked-by and Tested-by in the commits, thanks to everyone. v5: As suggested by Mike Kravetz, no need to move the #include for arm and x86 architectures, let it live at the top of the file. v4: Fix powerpc build error due to misplacing of #include outside of #ifdef CONFIG_HUGETLB_PAGE, as pointed by Christophe Leroy. v1, v2, v3: Same version, just problems with email provider and misuse of --batch-size option of git send-email Alexandre Ghiti (11): hugetlb: Harmonize hugetlb.h arch specific defines with pgtable.h hugetlb: Introduce generic version of hugetlb_free_pgd_range hugetlb: Introduce generic version of set_huge_pte_at hugetlb: Introduce generic version of huge_ptep_get_and_clear hugetlb: Introduce generic version of huge_ptep_clear_flush hugetlb: Introduce generic version of huge_pte_none hugetlb: Introduce generic version of huge_pte_wrprotect hugetlb: Introduce generic version of prepare_hugepage_range hugetlb: Introduce generic version of huge_ptep_set_wrprotect hugetlb: Introduce generic version of huge_ptep_set_access_flags hugetlb: Introduce generic version of huge_ptep_get arch/arm/include/asm/hugetlb-3level.h | 32 +--------- arch/arm/include/asm/hugetlb.h | 30 ---------- arch/arm64/include/asm/hugetlb.h | 39 +++--------- arch/ia64/include/asm/hugetlb.h | 47 ++------------- arch/mips/include/asm/hugetlb.h | 40 +++---------- arch/parisc/include/asm/hugetlb.h | 33 +++-------- arch/powerpc/include/asm/book3s/32/pgtable.h | 6 -- arch/powerpc/include/asm/book3s/64/pgtable.h | 1 + arch/powerpc/include/asm/hugetlb.h | 43 ++------------ arch/powerpc/include/asm/nohash/32/pgtable.h | 6 -- arch/powerpc/include/asm/nohash/64/pgtable.h | 1 + arch/sh/include/asm/hugetlb.h | 54 ++--------------- arch/sparc/include/asm/hugetlb.h | 40 +++---------- arch/x86/include/asm/hugetlb.h | 69 ---------------------- include/asm-generic/hugetlb.h | 88 +++++++++++++++++++++++++++- 15 files changed, 135 insertions(+), 394 deletions(-) -- 2.16.2