From patchwork Thu Jan 28 22:48:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Rasmussen X-Patchwork-Id: 12054677 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=-16.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 AFACFC433E0 for ; Thu, 28 Jan 2021 22:48:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 289BC64D9E for ; Thu, 28 Jan 2021 22:48:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 289BC64D9E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 468446B0073; Thu, 28 Jan 2021 17:48:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4429C6B0074; Thu, 28 Jan 2021 17:48:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3077D6B0075; Thu, 28 Jan 2021 17:48:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id 1AB586B0073 for ; Thu, 28 Jan 2021 17:48:33 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id D46E63641 for ; Thu, 28 Jan 2021 22:48:32 +0000 (UTC) X-FDA: 77756674464.22.twig00_3d01bd3275a3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id B6F8118038E6B for ; Thu, 28 Jan 2021 22:48:32 +0000 (UTC) X-HE-Tag: twig00_3d01bd3275a3 X-Filterd-Recvd-Size: 5634 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Thu, 28 Jan 2021 22:48:32 +0000 (UTC) Received: by mail-yb1-f202.google.com with SMTP id b125so65144ybg.10 for ; Thu, 28 Jan 2021 14:48:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=OciUxHGE8yPtNB1tP0JCFV9IjbQOZ16vEY+TJUcu0OU=; b=UjjKqRO5AOxn7VghbHUw7xvhRzuZWkeaAaVM7UsiVsZqqPPnVwNcjCankgnlRZhI2O PKHvFIYLdSWZ8DSeM5UKoTqDrxdc+9VL7KKtMtUlz4I7ql6WNJ+2cWIDBPoqd00aJIHv avryAgtCu84JvL4Vjvm2+EZiMKH0mBwzPYfyX361RqY9Xp/M/Vfbm9yH4nmc+zWgG9va Asy9CEXI/FQgKsvMW9lvHROA3BpwHhMLh4mhCKm3QKnEv4/Rs2DLAiSL/MZGC+/h7jmD nULMCwbHXvLa1OQE2xAMwR02xcdib9WnZ2x6HBTHU/UDRO5mwi2kYTt9441WjmAm5blH IzGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=OciUxHGE8yPtNB1tP0JCFV9IjbQOZ16vEY+TJUcu0OU=; b=W5VCiXBHOMtePVNDzI9+5FEdWwqZOizCKebQsYtquifoaW8/6LzPZyvZXvWK6iOaZR 5ekdhIZQUj3GRBfwHygEdF4TryWq7WcWyz9jMAwnXhcVjw2HU9Y5Dh5inhTbF6u2mJA1 l2YDLyC5+kljpG+zQH014W+xkCjy+/LmmgE3Swb21cg1dUVwXuDaY0TO7RW5a+p8Cg+k WVvw7YA+lk/jGj3Hwg3neu9yCbJzMxm1BaCUfYsVQ2yAI2m2WLghn/HEQ5h6+Ehpuami GF+QhDMxBKnsSlVJBWsIKohE6gqaLCIXtJf66BKzyVT+QWeQ5dw6fbmgEQ/5Z4kLKKrY UQaw== X-Gm-Message-State: AOAM5337Ok5APIgRHRgjBgPt7pZ77rAn+qbydz79nyxLzsklY0M6jYuB z5si0B1ZU9XQZH4h9O/3A2vds5toVpVDPYth/wb2 X-Google-Smtp-Source: ABdhPJw86pxf23g4Od2JKgL7AdfU/8fImCexkNA+9/GE9YYbkMW17SXES6xjCQ91GFP1lbryJ3LOBh8Tv4Ihn9H2FAtX X-Received: from ajr0.svl.corp.google.com ([2620:15c:2cd:203:f693:9fff:feef:c8f8]) (user=axelrasmussen job=sendgmr) by 2002:a25:3812:: with SMTP id f18mr2151012yba.207.1611874111477; Thu, 28 Jan 2021 14:48:31 -0800 (PST) Date: Thu, 28 Jan 2021 14:48:13 -0800 In-Reply-To: <20210128224819.2651899-1-axelrasmussen@google.com> Message-Id: <20210128224819.2651899-4-axelrasmussen@google.com> Mime-Version: 1.0 References: <20210128224819.2651899-1-axelrasmussen@google.com> X-Mailer: git-send-email 2.30.0.365.g02bc693789-goog Subject: [PATCH v3 3/9] mm/hugetlb: Move flush_hugetlb_tlb_range() into hugetlb.h From: Axel Rasmussen To: Alexander Viro , Alexey Dobriyan , Andrea Arcangeli , Andrew Morton , Anshuman Khandual , Catalin Marinas , Chinwen Chang , Huang Ying , Ingo Molnar , Jann Horn , Jerome Glisse , Lokesh Gidra , "Matthew Wilcox (Oracle)" , Michael Ellerman , " =?utf-8?q?Michal_Koutn=C3=BD?= " , Michel Lespinasse , Mike Kravetz , Mike Rapoport , Nicholas Piggin , Peter Xu , Shaohua Li , Shawn Anastasio , Steven Rostedt , Steven Price , Vlastimil Babka Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Adam Ruprecht , Axel Rasmussen , Cannon Matthews , "Dr . David Alan Gilbert" , David Rientjes , Oliver Upton 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: From: Peter Xu Prepare for it to be called outside of mm/hugetlb.c. Signed-off-by: Peter Xu Signed-off-by: Axel Rasmussen Reviewed-by: Mike Kravetz --- include/linux/hugetlb.h | 8 ++++++++ mm/hugetlb.c | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 4508136c8376..f94a35296618 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -962,4 +962,12 @@ static inline bool want_pmd_share(struct vm_area_struct *vma) #endif } +#ifndef __HAVE_ARCH_FLUSH_HUGETLB_TLB_RANGE +/* + * ARCHes with special requirements for evicting HUGETLB backing TLB entries can + * implement this. + */ +#define flush_hugetlb_tlb_range(vma, addr, end) flush_tlb_range(vma, addr, end) +#endif + #endif /* _LINUX_HUGETLB_H */ diff --git a/mm/hugetlb.c b/mm/hugetlb.c index d46f50a99ff1..30a087dda57d 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4924,14 +4924,6 @@ long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, return i ? i : err; } -#ifndef __HAVE_ARCH_FLUSH_HUGETLB_TLB_RANGE -/* - * ARCHes with special requirements for evicting HUGETLB backing TLB entries can - * implement this. - */ -#define flush_hugetlb_tlb_range(vma, addr, end) flush_tlb_range(vma, addr, end) -#endif - unsigned long hugetlb_change_protection(struct vm_area_struct *vma, unsigned long address, unsigned long end, pgprot_t newprot) {