From patchwork Mon Mar 31 08:13:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 14033714 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15C91C3600B for ; Mon, 31 Mar 2025 15:24:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1F843280003; Mon, 31 Mar 2025 11:24:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 180BA280002; Mon, 31 Mar 2025 11:24:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3E08280003; Mon, 31 Mar 2025 11:24:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 39D4C280002 for ; Mon, 31 Mar 2025 11:24:05 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 51A7EB4A6F for ; Mon, 31 Mar 2025 08:14:11 +0000 (UTC) X-FDA: 83281133502.11.6EBFFD4 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf24.hostedemail.com (Postfix) with ESMTP id B91D8180009 for ; Mon, 31 Mar 2025 08:14:09 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Wdo7LSv8; dmarc=pass (policy=quarantine) header.from=redhat.com; spf=pass (imf24.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743408849; a=rsa-sha256; cv=none; b=pqpeV+uptivm/3Q69BzTsaIjYGavEmrd+HwO4HqOWeUpXLLnWlhwGPUoRHkYa2u5dGjV2n hDChLM6xsr8XqTUAp+oZi/jTBF3KzOTyPqTx6EhogmzGVhiDwN65tXD/ZcCP1VWbDKns+3 Fdd1bTijT9KtdBeJJj5jvRAMEmsedes= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Wdo7LSv8; dmarc=pass (policy=quarantine) header.from=redhat.com; spf=pass (imf24.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743408849; h=from:from:sender: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:dkim-signature; bh=OLa+87RL1ZqH7qyvR+sAYoFO3JtN0cQjwozLl9C4JYM=; b=kPHkIx2l3OfYQlkCBPHFU12N6tX7kR4woEBMz8pfTyUNhmZmwkDUyH/mOvLXhCgh9xuJa1 d3sWER9M5jmGg3uDF0YlYTxjLqAgZLyq2WagmTbEJSrUCFjzG7uXXbOLM8W0iIGhED1xiz OMngNxRBfmgoN1KdvaBiPlyVRKIeHdo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743408849; 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=OLa+87RL1ZqH7qyvR+sAYoFO3JtN0cQjwozLl9C4JYM=; b=Wdo7LSv8Ogh3017gT5VFsk8pBILk5AAszZ4urnWAvPjNrc3BSdhUYIdNrn556kHgF3+us7 CcZ7bzBSbINnHOPRG2Mlwti2WZxBT1JyisFfwHDTwTMax5JewXCX6Bgdf7gH6ldmA6JwzD cJZGQ6S1qWDkhuK91hHjIQ7P0+LoWYM= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-516-21WSEHhDPMuuTzpdv--LEg-1; Mon, 31 Mar 2025 04:14:05 -0400 X-MC-Unique: 21WSEHhDPMuuTzpdv--LEg-1 X-Mimecast-MFC-AGG-ID: 21WSEHhDPMuuTzpdv--LEg_1743408844 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id ADC0D1800260; Mon, 31 Mar 2025 08:14:04 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.112.9]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A6EF81955BF1; Mon, 31 Mar 2025 08:14:01 +0000 (UTC) From: Baoquan He To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, yanjun.zhu@linux.dev, Baoquan He Subject: [PATCH v2 7/7] mm/pgtable: remove unneeded pgd_devmap() Date: Mon, 31 Mar 2025 16:13:27 +0800 Message-ID: <20250331081327.256412-8-bhe@redhat.com> In-Reply-To: <20250331081327.256412-1-bhe@redhat.com> References: <20250331081327.256412-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Rspam-User: X-Rspamd-Server: rspam03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qhL44UbypJuSH7v3Ao0Xm9L/O9hM+rag5xkmEqfPHIMEEdh/fH7QNGMjcj/PV+wWNfxlyETSuRi3kr0kF0Vi/XRjHlbIAApHbTzFlKaWmdbu68c= 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: List-Subscribe: List-Unsubscribe: There's no user of pgd_devmap() now, remove it from all ARCH-es and linux/pgtable.h. Signed-off-by: Baoquan He --- arch/arm64/include/asm/pgtable.h | 5 ----- arch/loongarch/include/asm/pgtable.h | 1 - arch/powerpc/include/asm/book3s/64/pgtable.h | 5 ----- arch/riscv/include/asm/pgtable-64.h | 5 ----- arch/x86/include/asm/pgtable.h | 5 ----- include/linux/pgtable.h | 4 ---- 6 files changed, 25 deletions(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 84f05f781a70..e0cab581edc9 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -1230,11 +1230,6 @@ static inline int pud_devmap(pud_t pud) { return 0; } - -static inline int pgd_devmap(pgd_t pgd) -{ - return 0; -} #endif #ifdef CONFIG_PAGE_TABLE_CHECK diff --git a/arch/loongarch/include/asm/pgtable.h b/arch/loongarch/include/asm/pgtable.h index da346733a1da..d9b04296d9f5 100644 --- a/arch/loongarch/include/asm/pgtable.h +++ b/arch/loongarch/include/asm/pgtable.h @@ -615,7 +615,6 @@ static inline long pmd_protnone(pmd_t pmd) #ifdef CONFIG_TRANSPARENT_HUGEPAGE #define pud_devmap(pud) (0) -#define pgd_devmap(pgd) (0) #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ /* diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index 6d98e6f08d4d..0da1c8d7f778 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h @@ -1405,11 +1405,6 @@ static inline int pud_devmap(pud_t pud) { return pte_devmap(pud_pte(pud)); } - -static inline int pgd_devmap(pgd_t pgd) -{ - return 0; -} #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ #define __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION diff --git a/arch/riscv/include/asm/pgtable-64.h b/arch/riscv/include/asm/pgtable-64.h index 0897dd99ab8d..c6da4c8354a3 100644 --- a/arch/riscv/include/asm/pgtable-64.h +++ b/arch/riscv/include/asm/pgtable-64.h @@ -411,11 +411,6 @@ static inline int pud_devmap(pud_t pud) { return 0; } - -static inline int pgd_devmap(pgd_t pgd) -{ - return 0; -} #endif #endif /* _ASM_RISCV_PGTABLE_64_H */ diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 5ddba366d3b4..3d6e78af525a 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -361,11 +361,6 @@ static inline pud_t pud_mkspecial(pud_t pud) return pud_set_flags(pud, _PAGE_SPECIAL); } #endif /* CONFIG_ARCH_SUPPORTS_PUD_PFNMAP */ - -static inline int pgd_devmap(pgd_t pgd) -{ - return 0; -} #endif #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 94d267d02372..9d2dd5f71443 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -1615,10 +1615,6 @@ static inline int pud_devmap(pud_t pud) { return 0; } -static inline int pgd_devmap(pgd_t pgd) -{ - return 0; -} #endif #if !defined(CONFIG_TRANSPARENT_HUGEPAGE) || \