From patchwork Tue Jul 31 06:01:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Ghiti X-Patchwork-Id: 10550001 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 66BB914E0 for ; Tue, 31 Jul 2018 06:04:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54CD2295B0 for ; Tue, 31 Jul 2018 06:04:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4700029C5D; Tue, 31 Jul 2018 06:04:11 +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 D649E295B0 for ; Tue, 31 Jul 2018 06:04:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0D98E6B0007; Tue, 31 Jul 2018 02:04:10 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 08AC96B0008; Tue, 31 Jul 2018 02:04:10 -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 EE30A6B000A; Tue, 31 Jul 2018 02:04:09 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by kanga.kvack.org (Postfix) with ESMTP id 966DB6B0007 for ; Tue, 31 Jul 2018 02:04:09 -0400 (EDT) Received: by mail-wm0-f70.google.com with SMTP id u9-v6so371164wmc.8 for ; Mon, 30 Jul 2018 23:04:09 -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=o/AgyAG4mUG53I1V9hAwgzNadjNMbd6kB7OlRt/NDDg=; b=Xg7f+9CmD1en824OzlKFafm4jgkUUYqYhhj6SxxUhDFRRMm66htZUpKIN3xN+CoVLa 7Uri8Dyl5AEdh0HtRPG8w2GY2/c8+gyWlxme18rLCRrpLA96GQF4qbotYVwig9gRdECJ r+6BpARPmrAMUHZc7OvCx/cQC7UI6C6ABEOdF6N9GtnQqvxYduEBe05I04nQgHzvmom/ q5w3muKcLxP0clE8/WoD7WfoJZVULP/Z1oEMRDdM87GMuc1uoWvKTmaXmDO/I6kQU2cI YU/1xq+mRNe9YaPL8KGNjJocTXkJ7iESK7bfU51C8Mt29/+t/G7JwI4m4xtPsAnLXqC0 DlJA== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 217.70.178.230 is neither permitted nor denied by best guess record for domain of alex@ghiti.fr) smtp.mailfrom=alex@ghiti.fr X-Gm-Message-State: AOUpUlE5Utk1DLI92wOapp89+bxdmhD/vH9dbSFoJm176sh+F44fDR9T KukGjAQdHf5gEYCyuHK1K9j1opj3CMXLzzK8su+uHOiVHUuC4RHxsGFuJ9KMDw0SICePE2GYIph QRtQ+QkvIMr73Uir7zNmMpn+HuZTMSMV/fjb7H6vHKwf+YGOPg8PAIX2vsn373yQ= X-Received: by 2002:adf:f342:: with SMTP id e2-v6mr19754411wrp.161.1533017049202; Mon, 30 Jul 2018 23:04:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcsiOq+JKttHLBVewjhOn0o/16sXEZCmUuXsAq+gD74gjTKidKU+8Oxr22o6bTWHeiITcTo X-Received: by 2002:adf:f342:: with SMTP id e2-v6mr19754376wrp.161.1533017048560; Mon, 30 Jul 2018 23:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533017048; cv=none; d=google.com; s=arc-20160816; b=IFWFacaYB8JpSyX+djHl0QsBioPxzAp5B1KpqrLAJDgMvKbnI5js6fVDyuHt99gTXk ycioRlbdF4BGgm7BjnZqQoYcrDB2Iz2bIsWR7CBiVBlovptfRrY08+WO2bMYo3OyDqi+ W6AW4+AK7DBcyqKNtbzoRIOlQMaG+3k+yk4ZREuTr4kRGLip8GYr+RyFRmTG2HflwjdV 5FsxM9gsEUnvzuJgnpU6ty/CSl/MNRzywpcdaDWWiKQkQVqnCtBU6Jy0wEVv6eALGC4u z4MKQjgcLahaJqdpNfb8LnT97U5DyyKh7W33HGuW787rCOTo0I4o2y9ZKtF/yz4Jh7CR GxaQ== 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=o/AgyAG4mUG53I1V9hAwgzNadjNMbd6kB7OlRt/NDDg=; b=t4yjbCJ++T8/xp443U+UdXo5em3QjntVXGtsh6JIFXLCzcjOwdOpfVUhUzT6/lupNG WS1QiSS7zv5rTcvsq59hTxGvurChzzUKWloDgruOf6iUCycF4b4hLHeIZhnhHcbkBlPY YlccWC42euFQk75OA7ssOE/+kDjL/ioUdfclZlmm0mDxsW2foPOdn+zYRCmt0dEhnqEv VrOl2IgJskT/hDopnDM9lcyH/wGQA9wM8XVYLORUqnrv9ZdByGoMPskB5NoMx1F4b+K2 u6UlD5nka29adox3F6+Lm90dvTBHvfSbO1yx4WHTqrE+4OpTkv3sEzNPGYHiEDI1dHvH nWEA== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 217.70.178.230 is neither permitted nor denied by best guess record for domain of alex@ghiti.fr) smtp.mailfrom=alex@ghiti.fr Received: from relay10.mail.gandi.net (relay10.mail.gandi.net. [217.70.178.230]) by mx.google.com with ESMTPS id 192-v6si1037304wmv.14.2018.07.30.23.04.08 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jul 2018 23:04:08 -0700 (PDT) Received-SPF: neutral (google.com: 217.70.178.230 is neither permitted nor denied by best guess record for domain of alex@ghiti.fr) client-ip=217.70.178.230; Authentication-Results: mx.google.com; spf=neutral (google.com: 217.70.178.230 is neither permitted nor denied by best guess record for domain of alex@ghiti.fr) smtp.mailfrom=alex@ghiti.fr Received: from alex.numericable.fr (127.19.86.79.rev.sfr.net [79.86.19.127]) (Authenticated sender: alex@ghiti.fr) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 0DBF3240005; Tue, 31 Jul 2018 06:03:59 +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 v5 01/11] hugetlb: Harmonize hugetlb.h arch specific defines with pgtable.h Date: Tue, 31 Jul 2018 06:01:45 +0000 Message-Id: <20180731060155.16915-2-alex@ghiti.fr> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180731060155.16915-1-alex@ghiti.fr> References: <20180731060155.16915-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 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) {