Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1367738pxb; Thu, 28 Jan 2021 14:53:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJykjttPq0uQuAQ1CNzZRR9Hr7E4XJkMy7w9YNZdCtUzPd5uVEUWy1Ck644q7d4FbvQaP2Ea X-Received: by 2002:a17:906:388b:: with SMTP id q11mr1684402ejd.421.1611874388325; Thu, 28 Jan 2021 14:53:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611874388; cv=none; d=google.com; s=arc-20160816; b=vBh8DjbOTsVzGghovENfWzYLQneEJYLbPIaE8DTT9mFihuPeemrhPZ1tfsurx68xd1 Cq60755Mr1LX2/BZi0rgRjucAniE0+dMSuP8qbIt0HmVv3NcPS1NkPI9Zu08lfeQ1j7Q 0bHUKjtq2UWwvU16qGW+XEE3RnkYRpOkqRucuD8rD+dMjycKvCBBp0rJrHEmhZ3DJdyq Tp8TL0m/NIxh05ZznNfX/bmsLmtqpkFWCnq+i1dzU21ezyNoc3m625Qsn46rpskbSHrx QZSB/OdMOxroRtlErdb83t3ALSUgIwnP73u9zw77vB0RZBSsMh2kj0+qX9kj6Yx0dKeh 6hVA== 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=OciUxHGE8yPtNB1tP0JCFV9IjbQOZ16vEY+TJUcu0OU=; b=dg4ARFrF9Ow/LmtpJTY2T+1mWHiecjpZ1btO8OoZqoXD6IOLmYQ4PVbcOHsBMWxss6 TjLq1uUywO9gt5kJLkHmWtiPGWW8QZXrBcv+5fgeMvmCiEDRnF3NloQrjgPms6wUlJBB AtcMHLXL5oxWqh5mBjWbjvPFtvsqqwL++RU5U+mAaXkhYdbqs1CN5XbPPGN1VnnT+UMq sAz5nw17M9QMRLP886HGKInu99wobG2j42T5gUBhUOlKA4u04mth5CxcPiTF6bWx+z1u bUCRWB/CR+D7Y/jjLO2DdbP6cJBUQjmXeWIjHmc6p3hpfjsAj/YkCz9cuj0gYgZHfxlh Wszg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UjjKqRO5; 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 m26si4504777edp.591.2021.01.28.14.52.44; Thu, 28 Jan 2021 14:53:08 -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=UjjKqRO5; 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 S231737AbhA1WwE (ORCPT + 99 others); Thu, 28 Jan 2021 17:52:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231685AbhA1Wuq (ORCPT ); Thu, 28 Jan 2021 17:50:46 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C994C06178B for ; Thu, 28 Jan 2021 14:48:32 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id c13so7708279ybg.8 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=WhmJfXcp1YguLiYtCHViUrusY+DvrAq6pUU+kNvrsQ+BEGl5ueeftJJtOD8YuQQgVQ 5UyXz0I0HoDezKkqsCFZtBiZD5gxMxdR+RyymfWIVaTSNQV27OVSPKwLfPH/OkEH1ErE Jj8rN6/orAoatwid33vXhEcODKPgk9OvI6MDFSs9JZ2PePEyBT6VCeX0RNzIbv38EFr6 PuQqMatwMDVk3TtJ3E2sciB0kRizRNsl3SZYboCHYbWqNZXE3EBJkLSnAmSD/zdZl77B iitBDYwVUo5JnJS56iXAVeuDhMSIOSCQopEnTKPphh5lCw9eDc7ZjKygDs7nD+6A1MvP 7IWg== X-Gm-Message-State: AOAM530QxE/BGFLUW5Eoseu7mZtKo2keX3x1OhRX1tEAGgArfaCrOGF2 qadfWap7WPGQSyRdNuKf9iDdUM2yKZ3syJI3tCVs Sender: "axelrasmussen via sendgmr" 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=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 , 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. 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 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) { -- 2.30.0.365.g02bc693789-goog