From patchwork Mon Aug 6 17:57:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Ghiti X-Patchwork-Id: 10557673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF8ED13BB for ; Mon, 6 Aug 2018 17:58:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF22C29A1F for ; Mon, 6 Aug 2018 17:58:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1A2529A2F; Mon, 6 Aug 2018 17:58:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FB4729A1F for ; Mon, 6 Aug 2018 17:58:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9C38A6B026A; Mon, 6 Aug 2018 13:58:35 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 972976B026B; Mon, 6 Aug 2018 13:58:35 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 889086B026C; Mon, 6 Aug 2018 13:58:35 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by kanga.kvack.org (Postfix) with ESMTP id 2ED526B026A for ; Mon, 6 Aug 2018 13:58:35 -0400 (EDT) Received: by mail-wr1-f72.google.com with SMTP id 40-v6so11262595wrb.23 for ; Mon, 06 Aug 2018 10:58:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=s7A7T+L1VS756FapPZbdAia5omZaBGV2Vsarr+SMg7U=; b=CTC0KTUpDHxQpmHBSqluyI62cxW8YrOLklAAzayA5SpTxlhDM/itAlYCVROnU3fObM K2EvVqa9x1zgmFxeml9YYHBUioaTT38SSUESdcvsDvy/ewuHCkhpawrteWxQSil/2jIC 08n8jW0DdK8bTnmkggzS+Bloww4ocgzeIr/lacnAK5XeGjglf+Evm37v7Z0wtdsyHfvG kAhapQcK5edjnl0G5ro/haHan+iV8Yi0xpYSSTJLd3aDxkJO3Oyt2LePrVGQkcMQv0Xr rslICVJzOMbb8x852IIzOIg5pfENsOVN0f/qdSHBNa7Agz8xSNE8OOXuQsdswdSa5hzt FsRA== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 217.70.183.193 is neither permitted nor denied by best guess record for domain of alex@ghiti.fr) smtp.mailfrom=alex@ghiti.fr X-Gm-Message-State: AOUpUlFKefAynwJeibGgpg5omt1wKZ7baF/cMZGeE2B58bafW+5P6nuz 7k9hnT74LNGbebet0yupQ2VOiVCu/k/+FwfOki/UlpkHnMCwRB7qK3vK1Tki5IG6g99ttf1o8yy gRD89Rr955xztHPu4uhHqEGvdmaIt1053bfPVGEAExpe8dbYMpWDh8LEhxPLFo6U= X-Received: by 2002:adf:f091:: with SMTP id n17-v6mr10934116wro.49.1533578314732; Mon, 06 Aug 2018 10:58:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd7E8MF6HU9JNfpVyaR62AEhPRs56cuubNNiWFy+o6cS5wWTLc9Ne3+ADjsUFJyiVBY7lf8 X-Received: by 2002:adf:f091:: with SMTP id n17-v6mr10934084wro.49.1533578313904; Mon, 06 Aug 2018 10:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533578313; cv=none; d=google.com; s=arc-20160816; b=r7Qqa3/OTfiNN1M00rkC4UE439hZy8RHfoiwvIU/PgZ/Y6LcmgknS3NU/Pbrlw8/S9 zOH6u/zfCa26bLPDHnTheseI5cK5/WFsp2JYX8LipBrpNgEixzMXp8mlwjrxoKJBSsYE a5E4kb/a9KFkJRRUfc3pDRsBFZaaFWVSCD+Do0PVKWEQ/MAM6c3gi12QQFL/Gyk8cVP0 zhoVsW1+rP8W/J4Q9LroLJw3T7YAcves0YWANsRFiU4NmzxWj2y3xDUj/EXC2uKiDdK2 Xew0TVT254kiOe3jO7QOUqkYSCw1BQvHXbkxSqeLVLozd988SzzreDrzBdthX8qC1KPU qZlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=s7A7T+L1VS756FapPZbdAia5omZaBGV2Vsarr+SMg7U=; b=Rrnt2R9z+OeBxPuaC3jSjT+mGOpAPgiRGbSiAZoeN7QcMa4mZVAqUAqcxCqkm4uKEA Bp5wNJr3IshaFD7cleo/vSKGgbdVFWs7AXEXItrCIu+YTveB+70MLsGsasx60NTS1NG6 X0F3ug/Dz+0mWvEzNka1iVnXyHzqQyeNXRTxgPQW13MbeV98RQEtc40yklbLToIff/Ra YD0BQELzkd4/EMfAyEhsMKeMOA4PnRbjqJ6PE7kNc2Qj5Am2ptLe0DdvjOHZH0/ZNXd2 0Gz1oeb8j+n63NLPpWb2ej7jjthjqWOKVkHYIOceprzCisDaCGUjAp8zhnwJ6hPOxoPV BTwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 217.70.183.193 is neither permitted nor denied by best guess record for domain of alex@ghiti.fr) smtp.mailfrom=alex@ghiti.fr Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net. [217.70.183.193]) by mx.google.com with ESMTPS id b15-v6si5629963wmg.88.2018.08.06.10.58.33 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Aug 2018 10:58:33 -0700 (PDT) Received-SPF: neutral (google.com: 217.70.183.193 is neither permitted nor denied by best guess record for domain of alex@ghiti.fr) client-ip=217.70.183.193; Authentication-Results: mx.google.com; spf=neutral (google.com: 217.70.183.193 is neither permitted nor denied by best guess record for domain of alex@ghiti.fr) smtp.mailfrom=alex@ghiti.fr 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 522E1240002; Mon, 6 Aug 2018 17:58:25 +0000 (UTC) From: Alexandre Ghiti To: 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 Cc: Alexandre Ghiti Subject: [PATCH v6 01/11] hugetlb: Harmonize hugetlb.h arch specific defines with pgtable.h Date: Mon, 6 Aug 2018 17:57:01 +0000 Message-Id: <20180806175711.24438-2-alex@ghiti.fr> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180806175711.24438-1-alex@ghiti.fr> References: <20180806175711.24438-1-alex@ghiti.fr> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP asm-generic/hugetlb.h proposes generic implementations of hugetlb related functions: use __HAVE_ARCH_HUGE* defines in order to make arch specific implementations of hugetlb functions consistent with pgtable.h scheme. Signed-off-by: Alexandre Ghiti Acked-by: Catalin Marinas # arm64 Reviewed-by: Luiz Capitulino Reviewed-by: Mike Kravetz --- arch/arm64/include/asm/hugetlb.h | 2 +- include/asm-generic/hugetlb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/hugetlb.h b/arch/arm64/include/asm/hugetlb.h index e73f68569624..3fcf14663dfa 100644 --- a/arch/arm64/include/asm/hugetlb.h +++ b/arch/arm64/include/asm/hugetlb.h @@ -81,9 +81,9 @@ extern void huge_ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep); extern void huge_ptep_clear_flush(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep); +#define __HAVE_ARCH_HUGE_PTE_CLEAR extern void huge_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep, unsigned long sz); -#define huge_pte_clear huge_pte_clear extern void set_huge_swap_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte, unsigned long sz); #define set_huge_swap_pte_at set_huge_swap_pte_at diff --git a/include/asm-generic/hugetlb.h b/include/asm-generic/hugetlb.h index 9d0cde8ab716..3da7cff52360 100644 --- a/include/asm-generic/hugetlb.h +++ b/include/asm-generic/hugetlb.h @@ -32,7 +32,7 @@ static inline pte_t huge_pte_modify(pte_t pte, pgprot_t newprot) return pte_modify(pte, newprot); } -#ifndef huge_pte_clear +#ifndef __HAVE_ARCH_HUGE_PTE_CLEAR static inline void huge_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep, unsigned long sz) {