Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1581015pxb; Thu, 4 Feb 2021 17:31:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxR5/jY159o5GAT/EuRLaTn25/28syPXv5iaCR1W8+X4mBtjum6iJXeatZGm1OIHkNTO2Ng X-Received: by 2002:a17:906:7804:: with SMTP id u4mr1773641ejm.97.1612488709632; Thu, 04 Feb 2021 17:31:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612488709; cv=none; d=google.com; s=arc-20160816; b=syJMqrogggtIW6yyAp2GW7eW3l+IPvmom5fbN+5ciEsvqLemzJPTGOAk0cL6ieOGAF Ry74GNpBC11xhrQmYhSt3v+3U4krrqlFmnfBScZ9MtWH4+idjdkBV/x1ZeLJN8y7de5J Iumk2izh7nkpq6pKBvenG40P6Z2IVMgr8RyMe4aPeNf6Jhz7KCrR7I76M8FBQKLJlk0m /X4XI6ud5waSxpMGDLW+rRRS313mj/5CESOydFuCYPqg51Pge4/QNxSkRSinQts2IdEn orOQ+J29P50Ds56YmqRnel73lXonPxuJqbe3oC4n8x7uCgdwdyw8pqZIu+kPmyadhLBW 3RKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=OEiarKErHeQBPZKsYeL3IkSXq4c5mYMZ0dIk1JQlp5Y=; b=DUwB/Hln4y51bUIgzw38tABzG/0MdUPMa37c5+jiEIxk4GVaWmobGU/ODtl5XtSvxu y63y7HFCcLj5WUS83G4TqkVGNY2YQrabrPo7kG6skLFonA+395gTPd48uWFRQ+QMDrvk 92llb5sDvH9bIBvyaLxjZFFkZIl6ATXlHJBti3YyJBx45vglCyLbjKueZ/7tR0Rnu9gk ypsPeodyDw94NsONE+EJz+r+nxSh7/3PmNQMmx6RTjVP15tVfhsGNF5eQ3suJKi7ZX/u +2etpKxg6owvObyeGVEivJ5PIXVOa3aPF9FP59vfLu3pu08+vIRd85abluNzGeDkUxc2 eFlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="HaC1/BN3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t1si4238556ejg.390.2021.02.04.17.31.25; Thu, 04 Feb 2021 17:31:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="HaC1/BN3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238131AbhBDSlV (ORCPT + 99 others); Thu, 4 Feb 2021 13:41:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238642AbhBDSgP (ORCPT ); Thu, 4 Feb 2021 13:36:15 -0500 Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 836BAC061797 for ; Thu, 4 Feb 2021 10:34:50 -0800 (PST) Received: by mail-qk1-x74a.google.com with SMTP id t186so3471489qke.5 for ; Thu, 04 Feb 2021 10:34:50 -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=OEiarKErHeQBPZKsYeL3IkSXq4c5mYMZ0dIk1JQlp5Y=; b=HaC1/BN3UFOD+8cUBOspMU73ct/e+qcOiXXFRVMYRHECbtjGH4eFsMreWMsc1gLI8E D4HwfqBpv8ifvkQ0WTBn6pGbOvbPMH5naPNpoq6uIrdBp6aAsuqDwCDf2SHMU8U7EnQf as+ddooJ5YbrDa0uuHll/bhyoJhHSwd8mgvYbwJbZpIPtS3RdBrNlhZIAxBzHn83KTEe ColYJ67sQiwpnOsZb66BnQz+LGNeOAusyJeYaEc/NUueGhZQKpMBT4BxAkZqBVp13ukv WAAZ4mkE7OgDpUP7dnncZRPz8SVVk3PinhZ4MkQv9OelGo/fPIj3rr0yOBddPveGFIiu udHg== 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=OEiarKErHeQBPZKsYeL3IkSXq4c5mYMZ0dIk1JQlp5Y=; b=Uit7St1iCN6PnDT6bbfUoKG/+lNp0B/qiCESTmUeXjj88M2fsQ66OBWNZSU9N8sU5j qQbvz8CCUNb6n5pcVsvux+ez9nnJ1N/BiZgI6WGSF8Kro9KgnPAXPr3vIea/MX2KujeU uLyQhy+CmxtskziVo8gRhoQ/qBqSEyoGUEReozuzm4V6RVaQKyfF+bHR3xqiXb32yjhZ woyyuZBVuAKbXpGbcgmbf3SfMJmh88DpqIJUMjvdjqu16eLyOqpVTQ3VqYOj2kCUIVaA N9zfmPGRTZCpuRf9dGGgFJ1XjjqFr7A1YAolCMGdTSDRN6KBg+zD3YHMCd20JzXK0/Rl gwqA== X-Gm-Message-State: AOAM533qawn+gl72lEyntey/PjQPxIHSmz44wAhpy76ursTjOeV8vdxR 9qoQgTaz5uKbG2fkOIPxssJUPMBfwSaw70R2jyQz Sender: "axelrasmussen via sendgmr" X-Received: from ajr0.svl.corp.google.com ([2620:15c:2cd:203:b001:12c1:dc19:2089]) (user=axelrasmussen job=sendgmr) by 2002:a0c:a692:: with SMTP id t18mr803070qva.18.1612463689620; Thu, 04 Feb 2021 10:34:49 -0800 (PST) Date: Thu, 4 Feb 2021 10:34:26 -0800 In-Reply-To: <20210204183433.1431202-1-axelrasmussen@google.com> Message-Id: <20210204183433.1431202-4-axelrasmussen@google.com> Mime-Version: 1.0 References: <20210204183433.1431202-1-axelrasmussen@google.com> X-Mailer: git-send-email 2.30.0.365.g02bc693789-goog Subject: [PATCH v4 03/10] 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=20Koutn=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 , Mina Almasry , Oliver Upton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Xu Prepare for it to be called outside of mm/hugetlb.c. Reviewed-by: Mike Kravetz Signed-off-by: Peter Xu Signed-off-by: Axel Rasmussen --- 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 f6d5939a6eb0..af40500c99f0 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -950,4 +950,12 @@ static inline __init void hugetlb_cma_check(void) bool want_pmd_share(struct vm_area_struct *vma, unsigned long addr); +#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 588c4c28c44d..5b3f00a1e276 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) { -- 2.30.0.365.g02bc693789-goog