From patchwork Fri Sep 17 16:51:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 12502777 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_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 BD6F8C433F5 for ; Fri, 17 Sep 2021 16:59:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6484C61216 for ; Fri, 17 Sep 2021 16:59:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6484C61216 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C63106B0071; Fri, 17 Sep 2021 12:59:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C12F46B0072; Fri, 17 Sep 2021 12:59:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AB4376B0073; Fri, 17 Sep 2021 12:59:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0036.hostedemail.com [216.40.44.36]) by kanga.kvack.org (Postfix) with ESMTP id 9CA506B0071 for ; Fri, 17 Sep 2021 12:59:00 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5A6D9184D425B for ; Fri, 17 Sep 2021 16:59:00 +0000 (UTC) X-FDA: 78597675240.19.F50D31F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf05.hostedemail.com (Postfix) with ESMTP id F0A7753597C5 for ; Fri, 17 Sep 2021 16:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631897472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VDHAOThaMHoseHUQ432qzhgijX2FLFoEAGXvQBtEyCE=; b=IxYw3BrWXQN0siw6orS1GAooJxfKOMAiBnDe4ElaIoZTOYkReCiMftixiYJrIJ2aMUTJjJ iVVtHfupgpe2AEaIljM5OFeJdxdb4qj5voq5lHG94Ui+CMRBMRdYMgnxB9Dw/1tOb55IS2 5Zo2IVl7YOXVdUF1da4HxUf2HeNjW3o= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-156-xvt91271Osa0kQP4boFF9Q-1; Fri, 17 Sep 2021 12:51:11 -0400 X-MC-Unique: xvt91271Osa0kQP4boFF9Q-1 Received: by mail-qt1-f197.google.com with SMTP id b15-20020a05622a020f00b0029e28300d94so90683660qtx.16 for ; Fri, 17 Sep 2021 09:51:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VDHAOThaMHoseHUQ432qzhgijX2FLFoEAGXvQBtEyCE=; b=yw2X3DcxraAPWRb6GyMesONnEU455jg1i2nNhO8sVGdyrumjptjGO5ML2hqtJjBAFp cx6eHajNJBwdg8YcmaQRpxbsASeMTaH1lMcb5NNW8zNKZV5LDVKVRsSJZyUeWYverKMh eugUzborHSpFRerIpplLsjqw0UVp8RwoL1q6gFxDF4KI47ZOJYvk7w/ZCBCHaOHlBe4n q3wjhBTywnFoDoSHcPerK5LUg+EV0VwhDI84t0jatLXBBJG5st4WJVmM2tphPgzZ01oZ +9M874S5bJ4x2u6pdW8p3Gwi44QA9ePkSzbeoT11JLMYkvqiG6I1/+V2k4lDTSVJKpLe Qwyg== X-Gm-Message-State: AOAM5331t6+h5MhtvPkj5Q3spJUOLdjGZT4oLzQdMnCFslWNm8Uxqk+M dwYsMfa3wY1uemeiXSTdQ/clotNholmqW1b+y9nZgkC79JJPmfRzSQV8MSTmQiStY0kx42cDZU5 uB7uxlnhJ/X79p/0Wt883BDdjnUZHjnugE5stAO3MlEc57dh7B3aYvMA3tmYH X-Received: by 2002:ae9:e8d2:: with SMTP id a201mr10763248qkg.347.1631897470306; Fri, 17 Sep 2021 09:51:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNoUNhd4p+MbQu/md9JIosMUKEdV122juI5QM2JvWfkK8kCuicWJjvOFgAhIeeZJtMVJxulw== X-Received: by 2002:ae9:e8d2:: with SMTP id a201mr10763224qkg.347.1631897470019; Fri, 17 Sep 2021 09:51:10 -0700 (PDT) Received: from t490s.phub.net.cable.rogers.com ([2607:fea8:56a2:9100::d35a]) by smtp.gmail.com with ESMTPSA id 10sm4896924qtu.66.2021.09.17.09.51.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:51:09 -0700 (PDT) From: Peter Xu To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Andrew Morton , peterx@redhat.com, Mike Kravetz , John Hubbard , Muchun Song Subject: [PATCH v2] mm/hugetlb: Drop __unmap_hugepage_range definition from hugetlb.h Date: Fri, 17 Sep 2021 12:51:08 -0400 Message-Id: <20210917165108.9341-1-peterx@redhat.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=IxYw3BrW; spf=none (imf05.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Stat-Signature: rbwpmnsc5cjk64eo55f6ezu9fjcwhkb1 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: F0A7753597C5 X-HE-Tag: 1631897472-110767 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: Remove __unmap_hugepage_range() from the header file, because it is only used in hugetlb.c. Suggested-by: Mike Kravetz Reviewed-by: Mike Kravetz Reviewed-by: John Hubbard Reviewed-by: Muchun Song Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand --- include/linux/hugetlb.h | 10 ---------- mm/hugetlb.c | 6 +++--- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 1faebe1cd0ed..3cbf60464398 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -143,9 +143,6 @@ void __unmap_hugepage_range_final(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page); -void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, - unsigned long start, unsigned long end, - struct page *ref_page); void hugetlb_report_meminfo(struct seq_file *); int hugetlb_report_node_meminfo(char *buf, int len, int nid); void hugetlb_show_meminfo(void); @@ -385,13 +382,6 @@ static inline void __unmap_hugepage_range_final(struct mmu_gather *tlb, BUG(); } -static inline void __unmap_hugepage_range(struct mmu_gather *tlb, - struct vm_area_struct *vma, unsigned long start, - unsigned long end, struct page *ref_page) -{ - BUG(); -} - static inline vm_fault_t hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, unsigned int flags) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 95dc7b83381f..d394d9545c4e 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4426,9 +4426,9 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, return ret; } -void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, - unsigned long start, unsigned long end, - struct page *ref_page) +static void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, + unsigned long start, unsigned long end, + struct page *ref_page) { struct mm_struct *mm = vma->vm_mm; unsigned long address;