From patchwork Wed Jul 10 07:51:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 13728971 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 2747DC38150 for ; Wed, 10 Jul 2024 07:51:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B0A226B008A; Wed, 10 Jul 2024 03:51:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AB9DC6B008C; Wed, 10 Jul 2024 03:51:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9814A6B0092; Wed, 10 Jul 2024 03:51:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 7B3966B008A for ; Wed, 10 Jul 2024 03:51:48 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 053A6141B5E for ; Wed, 10 Jul 2024 07:51:47 +0000 (UTC) X-FDA: 82323073896.25.9455917 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by imf25.hostedemail.com (Postfix) with ESMTP id DCE8DA0002 for ; Wed, 10 Jul 2024 07:51:45 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=none; spf=pass (imf25.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=pass (policy=quarantine) header.from=csgroup.eu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720597889; 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; bh=kXLlm6Wxr7Bxgj5fGzNjy34TkL5KXYwxij6j6SAa8vo=; b=CH3NLLRbaYVVZ9I4tddEkR67gWvVtjwq/zhpmbY1zZ+Pb3es2dQTyusHNTVN7k4OvjSNDs Bqi7SyAjYTc/ngqUKR7QTSaESPH376Qo5fl0UNDwS9/l+xokVJE2nJKGBN/ROZuW4fqwOU DkOODP4O1gyQFx375uvyijS6QrsRBwA= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=none; spf=pass (imf25.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=pass (policy=quarantine) header.from=csgroup.eu ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720597889; a=rsa-sha256; cv=none; b=27SNbTpX/8Q9LfgXCD36tNDQLjIn5vZx0cmpPfZFXSCVsAUMJ4xEIfwgMv5yxbxti36CVx Xx59rJxgeCVVVr2mxcp/4M43hU1OuQCYgyTeujsJCThNpVKaMi+GEegEe5xzt0nRDAvMWj uI/LoXO5zyUw8pOSZiNPGJk7ebnIzF8= Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4WJqn72Jh2z9sSy; Wed, 10 Jul 2024 09:51:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Msdeejhv638O; Wed, 10 Jul 2024 09:51:39 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4WJqmw5HDpz9sTK; Wed, 10 Jul 2024 09:51:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 715EE8B779; Wed, 10 Jul 2024 09:51:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 5aOEaBIr4O0c; Wed, 10 Jul 2024 09:51:28 +0200 (CEST) Received: from PO20335.idsi0.si.c-s.fr (unknown [192.168.233.26]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 31AA68B778; Wed, 10 Jul 2024 09:51:28 +0200 (CEST) From: Christophe Leroy To: Andrew Morton , Arnd Bergmann Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, linux-riscv@lists.infradead.org, Oscar Salvador , Peter Xu Subject: [PATCH v2 2/3] mm: Remove pud_user() from asm-generic/pgtable-nopmd.h Date: Wed, 10 Jul 2024 09:51:21 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1720597882; l=1658; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=P+XptGl9DFkWiOOf5gEDy59BT6RaK29b7Gl+mTkrxXs=; b=4OAIfRcbzGZiTThCn+52k1t3OLfWXpjONvRAqOB3CJHAKApZphNbftRQQVoK9x0oBHpC3u7Sh lQY8C28x+HSAHuZKfuXlBaRhY70+1c0WDh8lUCy4Op4atGDbaMZoNRm X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: DCE8DA0002 X-Stat-Signature: cdyq11iuhysta4gkbbg91mj5gb9am1w9 X-Rspam-User: X-HE-Tag: 1720597905-301412 X-HE-Meta: U2FsdGVkX19mon76wfJqBMF42fN8C2GEPbduHKVpIEcY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BajGEXd1vAxOLT6Ez+zdd48brm/ersskG5WnV8xg= 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: Commit 2c8a81dc0cc5 ("riscv/mm: fix two page table check related issues") added pud_user() in include/asm-generic/pgtable-nopmd.h But pud_user() only exists on ARM64 and RISCV and is not expected by any part of MM. Add the missing definition in arch/riscv/include/asm/pgtable-32.h and remove it from asm-generic/pgtable-nopmd.h Signed-off-by: Christophe Leroy Reviewed-by: Peter Xu Reviewed-by: Oscar Salvador --- arch/riscv/include/asm/pgtable-32.h | 5 +++++ include/asm-generic/pgtable-nopmd.h | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/pgtable-32.h b/arch/riscv/include/asm/pgtable-32.h index 00f3369570a8..37878ef37466 100644 --- a/arch/riscv/include/asm/pgtable-32.h +++ b/arch/riscv/include/asm/pgtable-32.h @@ -36,4 +36,9 @@ static const __maybe_unused int pgtable_l4_enabled; static const __maybe_unused int pgtable_l5_enabled; +static inline int pud_user(pud_t pud) +{ + return 0; +} + #endif /* _ASM_RISCV_PGTABLE_32_H */ diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h index 8ffd64e7a24c..b01349a312fa 100644 --- a/include/asm-generic/pgtable-nopmd.h +++ b/include/asm-generic/pgtable-nopmd.h @@ -30,7 +30,6 @@ typedef struct { pud_t pud; } pmd_t; 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))