From patchwork Thu Sep 20 06:03:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Ghiti X-Patchwork-Id: 10606881 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 86F381508 for ; Thu, 20 Sep 2018 06:05:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 748082BC46 for ; Thu, 20 Sep 2018 06:05:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67D6D2D1F9; Thu, 20 Sep 2018 06:05:23 +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 9D53E2BC46 for ; Thu, 20 Sep 2018 06:05:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BB0F98E0003; Thu, 20 Sep 2018 02:05:21 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B379A8E0001; Thu, 20 Sep 2018 02:05:21 -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 A0C508E0003; Thu, 20 Sep 2018 02:05:21 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by kanga.kvack.org (Postfix) with ESMTP id 3F8DB8E0001 for ; Thu, 20 Sep 2018 02:05:21 -0400 (EDT) Received: by mail-ed1-f70.google.com with SMTP id g18-v6so3666560edg.14 for ; Wed, 19 Sep 2018 23:05:21 -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=b3RRLu3UtZI9TvWG1bER3yEUmNb4FuItFGiW0drO9n6hQzfbeVLpDFutMsJdjnpqdX zp+ZDPuN1d4n+LtGYwcWaSDe2mwvm5ezvk6WqtguWAUhWx1hbuA5KL88MuW50bD224bs rXbeClUd9BGc/E3eQtde5llCTuurEQNpxqFGtSiMrZhPlfp9SpGG07a2eDlunC+DF36a XgIt0Zk4HPC9QEyhMXBzrxHRvLtiGXLAvIkgkzIe13wOq1azdAFU2yFqafnZIoj9aWwb 5BiZBR19ieo55NM5u00oyjcDcpPHeX0nNY4JB/eu3UliMbdiWONrkNZyNSr7EQBKLDVC z7Qw== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 217.70.183.194 is neither permitted nor denied by best guess record for domain of alex@ghiti.fr) smtp.mailfrom=alex@ghiti.fr X-Gm-Message-State: APzg51DxvT7BZeNjH4CyDKpHF6ZsTe2qZCr3q/6UrjLXTul5R74kvVF7 ghKI+IQ4NdiK/Mj0AroLdWWtwP/eE+VIfDDDIYoussf1WwiwkPwVlgUWqgkLGmOJniqBUlmywGw /na1yS3ZJPIT9TewX0OqJLz23sCJGUjeb0cfkxPFiD2OUvTI2zEBOqbb4k6cF31M= X-Received: by 2002:a50:c181:: with SMTP id m1-v6mr2092991edf.199.1537423520693; Wed, 19 Sep 2018 23:05:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbJoMxCfx1Tutur7pKWbOs/OPC60iqX2dgS6g873UOdAhM+OMijmkOeJNt764qKbCLPMfdB X-Received: by 2002:a50:c181:: with SMTP id m1-v6mr2092885edf.199.1537423519646; Wed, 19 Sep 2018 23:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537423519; cv=none; d=google.com; s=arc-20160816; b=CWtkJfJE7oa2+6mEu3+FRC4dAuwzl3akV+E5LGt4uFFxc1qehxq2RaCYXowUUE57Bs TopoNGeiZ4bBx9IKpRtdyf6EVV4HA2yHJx2PoCP/OcUhf7N8cLW4zwwGzP1xsjZjWeFY LtL4XQGH0EvhBoRrdvt6XRp1COUvEPRRhNe8QsJsqIh6enss8EoSS0jkUdehBbozfEC3 Ltk5e4rk7EHZbqAvTA2qI+vU0ppMK+67wQaFNFrO9WruZcAKKtZXl+7LL3IlBqU/Mlxx EwaNctktOAhyG6M+qELHYYSLHCPYz87vdy+6JOJKqvwj+MlKvvhNzh9V8PgtQtI7BJmN fTtQ== 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; bh=s7A7T+L1VS756FapPZbdAia5omZaBGV2Vsarr+SMg7U=; b=b5c7oA+4d5Y4efr2vqstV7lny3AwxxNrWWJ0OZHcb4/Va6l5rmQwztI8QfuuQCNGxq oXU+2pWYfx8rFHQOqG6nUTCGIOTLRYx9Nf69XfZQHeuQ9seRe9hbIrUfj8+z21DQsjjI sDv23X9ZVJPs+95y3UFlAxBV0AwAQUxE79xMcomW6y8HZecKODUjuCxuCBl/RHr2ohzx BIRVBAh7Uo+FOLHKaV88WUFDALFMPVVaUx16jiyLFF/wigVBjaPtfZNP1FolwDAbXnT/ czAwM+nZwKiasriUPUk8+pPNEyqlC1JYKMPKHii8lMQwT4zZ92DK82qIXUfkde64Uim1 lAtg== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 217.70.183.194 is neither permitted nor denied by best guess record for domain of alex@ghiti.fr) smtp.mailfrom=alex@ghiti.fr Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net. [217.70.183.194]) by mx.google.com with ESMTPS id v24-v6si1117252edq.63.2018.09.19.23.05.19 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Sep 2018 23:05:19 -0700 (PDT) Received-SPF: neutral (google.com: 217.70.183.194 is neither permitted nor denied by best guess record for domain of alex@ghiti.fr) client-ip=217.70.183.194; Authentication-Results: mx.google.com; spf=neutral (google.com: 217.70.183.194 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 relay2-d.mail.gandi.net (Postfix) with ESMTPSA id E499440009; Thu, 20 Sep 2018 06:05:09 +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 01/11] hugetlb: Harmonize hugetlb.h arch specific defines with pgtable.h Date: Thu, 20 Sep 2018 06:03:48 +0000 Message-Id: <20180920060358.16606-2-alex@ghiti.fr> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180920060358.16606-1-alex@ghiti.fr> References: <20180920060358.16606-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) {