From patchwork Thu Jul 4 04:30:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 13723179 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 B91F7C3271F for ; Thu, 4 Jul 2024 04:31:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E9AAA6B0088; Thu, 4 Jul 2024 00:31:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E226A6B008A; Thu, 4 Jul 2024 00:31:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD8556B008C; Thu, 4 Jul 2024 00:31:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A03566B0088 for ; Thu, 4 Jul 2024 00:31:54 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 29F621A105E for ; Thu, 4 Jul 2024 04:31:54 +0000 (UTC) X-FDA: 82300797348.10.54186E8 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf26.hostedemail.com (Postfix) with ESMTP id F170E140008 for ; Thu, 4 Jul 2024 04:31:51 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=TnzHIbUf; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=bF+fGAUR; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=TnzHIbUf; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=bF+fGAUR; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf26.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720067492; a=rsa-sha256; cv=none; b=7lGp3260Unqu5BfHzHcBF/V+G1ZtfL/ZEAEMMKCXeFp2z5sAiTx7MEE+SRoWS2Ep/CE0FD evWWt8YhzB3vNERDaVklc7ry27IuSHd74F4VU5K5RTmPt2tRr1YwTH6opfxJ3EjCs065aC ITTanQTh23UjRG2lLuRwpqz7KK4RjzE= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=TnzHIbUf; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=bF+fGAUR; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=TnzHIbUf; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=bF+fGAUR; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf26.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720067492; 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=bJqkPqmkpON5Zxkai/QS1QclW4CGF+6WU8c6arXYcis=; b=SBnLaxmSXCvuBvBuV2F633NAnGTRNNTSG28G1JhhjKEGAZr+LVP1ZE6Y8aOmxe4tv4+fNS dCv2WMXcwfdEFhOVBhd2J9NTyZvj1auSiZZPHTGDowQQtTGo5RPXODHyXNiALUVlnmALnR uS9x8HcdIUVVQpmVPIPiHdhJmfAGulQ= Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 97BAB1FCF7; Thu, 4 Jul 2024 04:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1720067510; h=from:from:reply-to: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=bJqkPqmkpON5Zxkai/QS1QclW4CGF+6WU8c6arXYcis=; b=TnzHIbUfH5DwSZglMNw4Qi9u/goipKZZo3b5tCXWSNzXHcGWuTfIuyoCPpBaZ7EQWJZ4xP xc8s51VaseURhWTMdpAiOLKejN3kTYWph/K3arXExfBqJilkikxqtS1oEa7zsCdFYmuN0K Qf9du4CansKgid+LQOtm3331g59SMt8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1720067510; h=from:from:reply-to: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=bJqkPqmkpON5Zxkai/QS1QclW4CGF+6WU8c6arXYcis=; b=bF+fGAURxq2QVQDGIfnETCWk/28DcKQ+0DPeiRUpZJTGyNdki5AfAv3X8A2SjYr3HMCp0b 41nDiQe78mUbZ7Aw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1720067510; h=from:from:reply-to: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=bJqkPqmkpON5Zxkai/QS1QclW4CGF+6WU8c6arXYcis=; b=TnzHIbUfH5DwSZglMNw4Qi9u/goipKZZo3b5tCXWSNzXHcGWuTfIuyoCPpBaZ7EQWJZ4xP xc8s51VaseURhWTMdpAiOLKejN3kTYWph/K3arXExfBqJilkikxqtS1oEa7zsCdFYmuN0K Qf9du4CansKgid+LQOtm3331g59SMt8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1720067510; h=from:from:reply-to: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=bJqkPqmkpON5Zxkai/QS1QclW4CGF+6WU8c6arXYcis=; b=bF+fGAURxq2QVQDGIfnETCWk/28DcKQ+0DPeiRUpZJTGyNdki5AfAv3X8A2SjYr3HMCp0b 41nDiQe78mUbZ7Aw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7C25713A82; Thu, 4 Jul 2024 04:31:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id YDqrGbUlhmbnDAAAD6G6ig (envelope-from ); Thu, 04 Jul 2024 04:31:49 +0000 From: Oscar Salvador To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Peter Xu , Muchun Song , David Hildenbrand , SeongJae Park , Miaohe Lin , Michal Hocko , Matthew Wilcox , Christophe Leroy , Oscar Salvador Subject: [PATCH 01/45] arch/x86: Drop own definition of pgd,p4d_leaf Date: Thu, 4 Jul 2024 06:30:48 +0200 Message-ID: <20240704043132.28501-2-osalvador@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240704043132.28501-1-osalvador@suse.de> References: <20240704043132.28501-1-osalvador@suse.de> MIME-Version: 1.0 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: F170E140008 X-Stat-Signature: uw5t3syit76kz88fcwgrndxjxcdmrpyp X-Rspam-User: X-HE-Tag: 1720067511-638215 X-HE-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F75yX7SrWbuWDmetFRNApEv00dhZ4LrtJcu1gjoOt5K3CxSdFoBq0V9Gy2klWzW4+Up5kX/wcrYG+ARYU7Qej6Pzt5ZfK1mNVxX9CkyzX1A5aFbXnKASlb8m50LaW0RhalDR2GRJzpESW9NIYTK1ptj3rlKS6uBWIYrmFa9dlU50+h7KFsWnk4wXCypQ== 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: We provide generic definitions of pXd_leaf in pgtable.h when the arch do not define their own, where the generic pXd_leaf always return false. Although x86 defines {pgd,p4d}_leaf, they end up being a no-op, so drop them and make them fallback to the generic one. Signed-off-by: Oscar Salvador --- arch/x86/include/asm/pgtable.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 65b8e5bb902c..772f778bac06 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -252,13 +252,6 @@ static inline unsigned long pgd_pfn(pgd_t pgd) return (pgd_val(pgd) & PTE_PFN_MASK) >> PAGE_SHIFT; } -#define p4d_leaf p4d_leaf -static inline bool p4d_leaf(p4d_t p4d) -{ - /* No 512 GiB pages yet */ - return 0; -} - #define pte_page(pte) pfn_to_page(pte_pfn(pte)) #define pmd_leaf pmd_leaf @@ -1396,9 +1389,6 @@ static inline bool pgdp_maps_userspace(void *__ptr) return (((ptr & ~PAGE_MASK) / sizeof(pgd_t)) < PGD_KERNEL_START); } -#define pgd_leaf pgd_leaf -static inline bool pgd_leaf(pgd_t pgd) { return false; } - #ifdef CONFIG_MITIGATION_PAGE_TABLE_ISOLATION /* * All top-level MITIGATION_PAGE_TABLE_ISOLATION page tables are order-1 pages