From patchwork Tue Mar 5 04:37:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13581598 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 06B6DC54798 for ; Tue, 5 Mar 2024 04:38:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8F16A94000A; Mon, 4 Mar 2024 23:38:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C76A940007; Mon, 4 Mar 2024 23:38:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78FB494000A; Mon, 4 Mar 2024 23:38:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 66E56940007 for ; Mon, 4 Mar 2024 23:38:46 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 40CB0120209 for ; Tue, 5 Mar 2024 04:38:46 +0000 (UTC) X-FDA: 81861729852.04.C581857 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf14.hostedemail.com (Postfix) with ESMTP id A7643100005 for ; Tue, 5 Mar 2024 04:38:44 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hPL6FcQW; spf=pass (imf14.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709613524; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nuo5a0GW5hRUtMzV1v/fSGiWbuiuweegoPjxTUJCs50=; b=FhjWnZ1CUq5s/s9EixLcg7HxEqXC6Qb3xbpQY9T4SieoUpCemtj+PHWdDhxaTz5nbG8WGr w3qhAPHlUiJRQwt9LoLldUlTPCyq1N7iWnjt/LW4m87+uz7tj4u2WkpdAgbEVPgmV/4y+m n70Kr5qUThQgQgcpOR3lEXvHCaVb7yY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709613524; a=rsa-sha256; cv=none; b=T3zn3X+zYEA7ZWDSV7K2G5BDB7yXfzNoMriNI0ZxOY0g9XENGrP0F1igEvDDE/L46uWqjB fUWmGiSiOoJsUY2zs82V/Q5dEbb5nhWlhpHrWokefMCq4Mbn1lsJDGoo+BGZHDFHjhEile H78RK+O+atUch01zd6Wx3mx8rXgg6Co= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hPL6FcQW; spf=pass (imf14.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709613524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nuo5a0GW5hRUtMzV1v/fSGiWbuiuweegoPjxTUJCs50=; b=hPL6FcQWsCmF+etDS7o9m7q9KKeqyq0u7pZ2NEcJS5Ki3pYx6t9kkIt3nZ1ZkCCtJx6wrP hDue0nLqPUxefpVcGa6ubs5BRaEqnjeBWHPu3r2WhPuMnVQPCOitJ9NkznwnIXUKLULdIS DSFb2c8AJVHX9jK1XXi6CuJ3HyetIZY= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-582-v793_kpWOh62Z2pm1XC8lA-1; Mon, 04 Mar 2024 23:38:39 -0500 X-MC-Unique: v793_kpWOh62Z2pm1XC8lA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id AD7FD38049F2; Tue, 5 Mar 2024 04:38:38 +0000 (UTC) Received: from x1n.redhat.com (unknown [10.72.116.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D0B0C1F086; Tue, 5 Mar 2024 04:38:30 +0000 (UTC) From: peterx@redhat.com To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Christophe Leroy , x86@kernel.org, "Kirill A . Shutemov" , Jason Gunthorpe , Yang Shi , peterx@redhat.com, Andrew Morton , linuxppc-dev@lists.ozlabs.org, Muchun Song , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen Subject: [PATCH v3 05/10] mm/x86: Drop two unnecessary pud_leaf() definitions Date: Tue, 5 Mar 2024 12:37:45 +0800 Message-ID: <20240305043750.93762-6-peterx@redhat.com> In-Reply-To: <20240305043750.93762-1-peterx@redhat.com> References: <20240305043750.93762-1-peterx@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Rspamd-Queue-Id: A7643100005 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: ept18rt939u7nzpt17j15pp49qrqdzfu X-HE-Tag: 1709613524-313381 X-HE-Meta: U2FsdGVkX1/Kx6Q4Tf3VrUMQmx5UTzV3HkXOVisgxfF0aiiSg+cl3ODtDVfeOyybga1uOiRgNldqbN6XtwGsk8eynVUcya/STyJ6bymG7yksGkOg520zXQkYwSP3hhF89j61TwhuDh11dzCddbSjq8y35KSgq6gWd2o+KYPrszrX2hIukl80X5TP2Sk8f7WNwGwGiON53p4nhB1IEUGh6uPHEfbJ5FX0il84PU9MlFTz/B99iWGykq1mHALuk9OArn6rXzpfL5hjQs2gzb9TsxfDRLU0HQ6P2HhKT1LXjfibk3W5bzjPKCXFRpLRt+jZWEimIdNiQrY1V6iLUPSXJyTuc/c85UzDIOmsJh4rSphVo1S9B/NlLpOyJhJkwyjNNkGbMEsRysmca0dSrHH24DTxdWB27KEZYAd94x49YJIUOqV31ouP/I/grFnxklVocmiUKulBpJvTVGJLAYrljze7sDhuB/Bxwb7eIRoWHPR87fnmbONBS3qEWKNtdFK8rmWrtl9HoPRVbNhECdQz4oJEAQAcmquSIeZetGZLnCGVf3Q795pd95ExiY7OqgFUzB4ba0x/eqxWpBmS/IfE773EpCTuGEqp4LM/4i72j+JWdXN5OwtnxHDIC01KjYvZzmUwy1nZnrRgMa1NGne2t+eC1o/lLJS4DZdFmDEZOWTJoQDFQcKLyg8qSKT2A5ZnmviCWi2xnsihk2ToL0C+HebmHGgIEf7ScXahhop/driHuRRZ3y+SCiRB1R56DKxKjr0fs5MgsLHtTJKsgrZIT9AvffzmKdSV5Qp/6rzwOLWSriwcS+LMmjnXED0/8Xh0hAgTItjS/YuH/7UNJ8B+7MNGavzrPslxu/xdfS6P9WZN4K9IRIacetDboTtVltgd+1o5+rKc9DFlpjfvUN2b/otO6CjRCTQyu4Fh+qyVer3IUbNhIzyRWs67NjLDIgPb 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: From: Peter Xu pud_leaf() has a fallback macro defined in include/linux/pgtable.h already. Drop the extra two for x86. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Reviewed-by: Jason Gunthorpe Acked-by: Thomas Gleixner Signed-off-by: Peter Xu Reviewed-by: Mike Rapoport (IBM) --- arch/x86/include/asm/pgtable.h | 1 - include/asm-generic/pgtable-nopmd.h | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index d6e993a5659f..9db7a38a0e9f 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -1097,7 +1097,6 @@ static inline int pud_bad(pud_t pud) return (pud_flags(pud) & ~(_KERNPG_TABLE | _PAGE_USER)) != 0; } #else -#define pud_leaf pud_large static inline int pud_large(pud_t pud) { return 0; diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h index 8ffd64e7a24c..fa27e16bbe1b 100644 --- a/include/asm-generic/pgtable-nopmd.h +++ b/include/asm-generic/pgtable-nopmd.h @@ -31,7 +31,6 @@ static inline int pud_none(pud_t pud) { return 0; } static inline int pud_bad(pud_t pud) { return 0; } static inline int pud_present(pud_t pud) { return 1; } static inline int pud_user(pud_t pud) { return 0; } -static inline int pud_leaf(pud_t pud) { return 0; } static inline void pud_clear(pud_t *pud) { } #define pmd_ERROR(pmd) (pud_ERROR((pmd).pud))