From patchwork Thu Jul 15 20:16:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 12380953 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.6 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,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 98657C636C9 for ; Thu, 15 Jul 2021 20:16:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4B5F9613C4 for ; Thu, 15 Jul 2021 20:16:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B5F9613C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B145D8D0108; Thu, 15 Jul 2021 16:16:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AEB5C8D00EC; Thu, 15 Jul 2021 16:16:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 93F0F8D0108; Thu, 15 Jul 2021 16:16:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 71B5A8D00EC for ; Thu, 15 Jul 2021 16:16:21 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 590DD18061 for ; Thu, 15 Jul 2021 20:16:20 +0000 (UTC) X-FDA: 78365929320.08.BE25745 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 EB292500FC17 for ; Thu, 15 Jul 2021 20:16:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626380179; 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: in-reply-to:in-reply-to:references:references; bh=TlkC2X960t2EN/CZQ9J+R9eQf4JoaOaAVaibAmcHcE8=; b=DTH1OsZCgnTf58fe/jUHQWaVi0qhC8iTcQQcV/wmjohpmQrHHp3e/sOZvXEsLXECT7dTFv 0w3BW4bi01FbpWqw8tnxeFWjt+G/wHjanSbZ8vs4Icfba4YMaaGE4H3HsTfiwcGuYA2VU0 MuUs7TNIvv5tWKap9F50BgNFZI4ao34= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-440-0ZIUTG0NMUSuSMAdAgLhag-1; Thu, 15 Jul 2021 16:16:18 -0400 X-MC-Unique: 0ZIUTG0NMUSuSMAdAgLhag-1 Received: by mail-qk1-f198.google.com with SMTP id f203-20020a379cd40000b02903b861bec838so4685812qke.7 for ; Thu, 15 Jul 2021 13:16:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TlkC2X960t2EN/CZQ9J+R9eQf4JoaOaAVaibAmcHcE8=; b=RXaziRU4bOGt0UUjXgi08EVvvllRi/P75YWqovRXsYZN+e5rPIvyLSCCEJsjR9fjfz 0EkPK2g9NB8Rc23ZzQN2W2H7cK4dxlXTTgVwKM+hIt0qMIHWMZoZ6TiHXxHqaQGEuFfw 4Kja+AhzG9ZCubXc8xUrkJoEy2XXtXgZdV5fTyBkrdkSCn4TYAlaH0bQKawNBPkD8AlO uiCB7abs1M7ynROyXAmFHB//y8xdbQIZNsjdP4/ylypO0phbacHpH8/jc4IvE0VJqK0B YdKIbjjVLK/yjE2xdg4RkPTZb9ZSfpPyFWCn26Aii8N2L59hXSrb3d3XlBc6dPXrldNk GlcQ== X-Gm-Message-State: AOAM5330QePlXxxtFaRtj2CE6tKCvz00HmCgjBRLRONbY7NSS3ImcOeO yErhucHNgTxmz1DzMfdDMxtWDnHnGKBM1NLJ0Bx4m8Lyy7qf5zppjD3lTigdgC1kCW1+PPNM7iT kQm1KYaprPf0= X-Received: by 2002:a05:620a:1a08:: with SMTP id bk8mr5868647qkb.158.1626380177773; Thu, 15 Jul 2021 13:16:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+Mh8bqfMRmlD7VtuT3BfvCjnYBOcmGPKPMJX4as9wjPV1emUfAXJm6miIcoMPleVO1W14yg== X-Received: by 2002:a05:620a:1a08:: with SMTP id bk8mr5868618qkb.158.1626380177566; Thu, 15 Jul 2021 13:16:17 -0700 (PDT) Received: from localhost.localdomain (bras-base-toroon474qw-grc-65-184-144-111-238.dsl.bell.ca. [184.144.111.238]) by smtp.gmail.com with ESMTPSA id i21sm2980326qkl.20.2021.07.15.13.16.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 13:16:17 -0700 (PDT) From: Peter Xu To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Axel Rasmussen , Nadav Amit , Jerome Glisse , "Kirill A . Shutemov" , Jason Gunthorpe , Alistair Popple , Andrew Morton , David Hildenbrand , peterx@redhat.com, Andrea Arcangeli , Matthew Wilcox , Mike Kravetz , Tiberiu Georgescu , Hugh Dickins , Miaohe Lin , Mike Rapoport Subject: [PATCH v5 15/26] mm/hugetlb: Drop __unmap_hugepage_range definition from hugetlb.h Date: Thu, 15 Jul 2021 16:16:14 -0400 Message-Id: <20210715201614.211661-1-peterx@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210715201422.211004-1-peterx@redhat.com> References: <20210715201422.211004-1-peterx@redhat.com> 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=DTH1OsZC; 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: xmsm9ssgpcyfeh7du66ijyq14pixmq6y X-Rspamd-Queue-Id: EB292500FC17 X-Rspamd-Server: rspam01 X-HE-Tag: 1626380179-883902 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: Drop it in the header since it's only used in hugetlb.c. Suggested-by: Mike Kravetz Signed-off-by: Peter Xu --- 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 f7ca1a3870ea..c30f39815e13 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 924553aa8f78..4bdd637b0c29 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4331,9 +4331,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;