From patchwork Thu Feb 29 08:42:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13576873 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 4EB3EC48BF6 for ; Thu, 29 Feb 2024 08:43:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D980A6B00AF; Thu, 29 Feb 2024 03:43:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D46966B00B0; Thu, 29 Feb 2024 03:43:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C116C6B00B1; Thu, 29 Feb 2024 03:43:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id AB0526B00AF for ; Thu, 29 Feb 2024 03:43:41 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 6C79E1612B8 for ; Thu, 29 Feb 2024 08:43:41 +0000 (UTC) X-FDA: 81844203042.10.3F2BA0E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf18.hostedemail.com (Postfix) with ESMTP id A86AB1C0012 for ; Thu, 29 Feb 2024 08:43:39 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Fbl809+w; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf18.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709196219; 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=vaO5rUUUwqL4Op281F/k7Urm37If4ycpPAb8kcf+Fps=; b=tTxqnLGbl0C+DL6EbAjT0mY6Gu81PfHSP5KO85jr2Xg+buAu0EPti/XBxpbR72nnyQas0z rIfrKxFt1l00vnDR0HDzLyA//aqawZOrY7gTtuAOVBsM0rUk0wlU4s/9jqJVcFt7awzxRb g2MQObuiOwuRjQS9gguE4YtBZ7XGs9U= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Fbl809+w; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf18.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709196219; a=rsa-sha256; cv=none; b=ka7rTeKvrExlDjYuxV2SrpHlUKjw+g/gDjJa/RiESnhoNa7niqJN4Fp+jhn4A7bgURFuv8 /tY9MouyilH9olnj3spU3XUdrzkTVvzZKC4EKcX7c7w1zBjXuAPTwEmL12UcZTvC9WABRn pgde4wldrZitpC/X6dmJ4gTJIJsyPE4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709196219; 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=vaO5rUUUwqL4Op281F/k7Urm37If4ycpPAb8kcf+Fps=; b=Fbl809+w5BinKyjR8PV47tbUpfH3A7qTEAHFVzdHMgBLNqR+Ugpy2CmRb6EGQ40zltKW9W zgm6ABbkgLverTMHdLYr7bXHO9Mxk6eIWNdgOl0fetdYJ48cH38moceR1A6WWEGeS9qtOA tQ93pU+Il2Zz7Jt5B6tCRwWKxEqFM30= 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-648-Kkkwr2teMLKh8mWF0KV25w-1; Thu, 29 Feb 2024 03:43:37 -0500 X-MC-Unique: Kkkwr2teMLKh8mWF0KV25w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 DBFF93C025B8; Thu, 29 Feb 2024 08:43:36 +0000 (UTC) Received: from x1n.redhat.com (unknown [10.72.116.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3759D28D; Thu, 29 Feb 2024 08:43:29 +0000 (UTC) From: peterx@redhat.com To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, Yang Shi , "Kirill A . Shutemov" , Jason Gunthorpe , peterx@redhat.com, Muchun Song , Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen Subject: [PATCH v2 4/7] mm/x86: Drop two unnecessary pud_leaf() definitions Date: Thu, 29 Feb 2024 16:42:55 +0800 Message-ID: <20240229084258.599774-5-peterx@redhat.com> In-Reply-To: <20240229084258.599774-1-peterx@redhat.com> References: <20240229084258.599774-1-peterx@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Rspam-User: X-Stat-Signature: aqj7mbqfcua1a73z9azt8fu3u9m3hcr3 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: A86AB1C0012 X-HE-Tag: 1709196219-440291 X-HE-Meta: U2FsdGVkX1/p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IrMo5SaODwYXNS+NTiJwhKMn1K5Hr4URTFNYB/F5k1GJY/C04KxC7+MLOm8jiA0XgcaTaLS+ieLgb/olcxkpTLtSJ0EQy1aFOgNzUfFeLBJUcZmTg8qVHmI5x8kY0dmpn3C07DZRq4P1vDu8DpReYh43fOdZZDnqe8rIbNa0hzhE0ewZ/EE24nrpVBsf+e7BM9ZVz+29A= 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 Signed-off-by: Peter Xu Reviewed-by: Jason Gunthorpe Acked-by: Thomas Gleixner --- 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 69ed0ea0641b..f884d5162507 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))