From patchwork Thu Sep 16 21:28:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 12500303 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 3868EC433EF for ; Thu, 16 Sep 2021 21:28:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AD9B461206 for ; Thu, 16 Sep 2021 21:28:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AD9B461206 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 E2380900002; Thu, 16 Sep 2021 17:28:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DAC166B0072; Thu, 16 Sep 2021 17:28:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4CF3900002; Thu, 16 Sep 2021 17:28:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B28C46B0071 for ; Thu, 16 Sep 2021 17:28:21 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 32EEC180991F5 for ; Thu, 16 Sep 2021 21:28:21 +0000 (UTC) X-FDA: 78594725202.31.D6324CE Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf01.hostedemail.com (Postfix) with ESMTP id D197E505D4F5 for ; Thu, 16 Sep 2021 21:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631827700; 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=KwOcye6xrd0c2npUbIp4jFSKybstikwSzxh/d2AxRGI=; b=esxI0AmrDUGvgghEMffmoDro6ACrhMcYkNLaL0atB0bme4TP0caTWDV9bIOGpCwKm5tEqp a5B8T3QyA2NbssghIjsKFbKp9qI9FhmikH7im1m/LJ0z0lzx43CQiJWmuXArqn7gYCGiD3 IxJTfyBdA9DBTP3KWaQhwOxlJGbf+PU= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-64-scp-BFbQMGi_kf4KDRARcA-1; Thu, 16 Sep 2021 17:28:19 -0400 X-MC-Unique: scp-BFbQMGi_kf4KDRARcA-1 Received: by mail-qt1-f198.google.com with SMTP id l22-20020a05622a175600b0029d63a970f6so72487005qtk.23 for ; Thu, 16 Sep 2021 14:28:19 -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=KwOcye6xrd0c2npUbIp4jFSKybstikwSzxh/d2AxRGI=; b=pecnX1eNiGaSjCfK0lJzkQZjOBab4Qc9SpMhMCWPLUqvmzt/ebl6yhMRWwMa72SDPC OS9fts6ML/b1qmMQ/FjPE+YHrH+Jx1i/ePZKICdGFlQSOt57UcKQTefmqkAtaRxLgxlR wmSRru6lHZtrW85QecepeGw/kbzSTPnU5d1rKx4m3Mul7aOGS1Sqmd6eT1yO3t+uNsoE Xj6mALeOAVhxS+pbpujKy51MG+XCmFcbZ+NKHcwN3WQU7fYUJUqyXKerjSabYk5xpV1Z j03J+AptLt9JNxV/sj5IFNUMVW53u3i2ljauX2qg3d+XgWTz6HD+wZyEnqMs6V6vFU7H iQ6g== X-Gm-Message-State: AOAM533BM5dmPQFd+QZsVqxXCgGreIyY1hxxwum7NT15M1NkGCINBOHY LEgevQ34G/MVVgUTXDv45pOm6kOysWsUIcQ9qbPpAObbannO5xZ5odE1k6vnsohy29yOWmctMvs +Fi8Irk2ktuo= X-Received: by 2002:a05:620a:1474:: with SMTP id j20mr7273197qkl.305.1631827698832; Thu, 16 Sep 2021 14:28:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ49jI9h4n7NI+wShjsr09zEjaWktqmpBsEFP7CE4EAHNoYjJwQsKgyzXWvhgMN2My1dy2eg== X-Received: by 2002:a05:620a:1474:: with SMTP id j20mr7273168qkl.305.1631827698421; Thu, 16 Sep 2021 14:28:18 -0700 (PDT) Received: from t490s.redhat.com ([2607:fea8:56a2:9100::d35a]) by smtp.gmail.com with ESMTPSA id w185sm3413567qkd.30.2021.09.16.14.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 14:28:17 -0700 (PDT) From: Peter Xu To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: peterx@redhat.com, Andrew Morton , Mike Kravetz Subject: [PATCH] mm/hugetlb: Drop __unmap_hugepage_range definition from hugetlb.h Date: Thu, 16 Sep 2021 17:28:16 -0400 Message-Id: <20210916212816.86838-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 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: D197E505D4F5 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=esxI0Amr; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf01.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=peterx@redhat.com X-Stat-Signature: ez7xag9qhz1kzhs8njmbcbfo5jonfkc9 X-HE-Tag: 1631827700-769115 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 Reviewed-by: Mike Kravetz Reviewed-by: John Hubbard Reviewed-by: Muchun Song --- 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;