From patchwork Sat Jul 13 07:08:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 13732358 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 53729C3DA42 for ; Sat, 13 Jul 2024 07:09:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CEA016B0092; Sat, 13 Jul 2024 03:09:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C9BE46B0095; Sat, 13 Jul 2024 03:09:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC5A66B0096; Sat, 13 Jul 2024 03:09:16 -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 8B57E6B0092 for ; Sat, 13 Jul 2024 03:09:16 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 47C0B40DF3 for ; Sat, 13 Jul 2024 07:09:16 +0000 (UTC) X-FDA: 82333853112.22.AC7DF4C Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by imf17.hostedemail.com (Postfix) with ESMTP id 2144A40007 for ; Sat, 13 Jul 2024 07:09:13 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=csgroup.eu; spf=pass (imf17.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720854526; a=rsa-sha256; cv=none; b=yHitOIndNMOT33OuXJfS6f9nSnmrJL78MldQU0i7+QK8nqXFXWt2q9OyJMROHUEyOyWi7Q uHZLLlaFZbz8vem9+MdhMiEWxsTzS1/VAPguJ0lMB5FmIyB5J0fj5V+jS4+Pyd6DJYatO2 arjVON4XB4Rz2CPCCDTDeisGrgsfeHI= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=csgroup.eu; spf=pass (imf17.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720854526; 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=/6r4ajoFwKI7Sx2g5/kngMWszUxdPl4hxNWlsqQR4Fc=; b=Do3OBUoWr+qLGCNLEG0u2pjc5wYOpIO2sdzPtk660LKv2aq7mhBLCKHqZ2XFxiLDtbIGLR Q3A+D6DwHWBUVHfkcKbe+2juxzHvKM33YyMPLZdRiBz8dbLGYhBsaxH+IM9Q6CC1/AuGWY M3cYYXjArG2DiObD27wtqhmOGSJ192Q= Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4WLfhY1Ky4z9sSY; Sat, 13 Jul 2024 09:09:01 +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 A-AU9RRVGJNq; Sat, 13 Jul 2024 09:09:01 +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 4WLfhX5qbsz9sSS; Sat, 13 Jul 2024 09:09:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B4D378B764; Sat, 13 Jul 2024 09:09:00 +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 g1jIk9GeChEz; Sat, 13 Jul 2024 09:09:00 +0200 (CEST) Received: from PO20335.idsi0.si.c-s.fr (unknown [192.168.233.195]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C2AE78B77B; Sat, 13 Jul 2024 09:08:59 +0200 (CEST) From: Christophe Leroy To: Andrew Morton Cc: Christophe Leroy , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , Arnd Bergmann , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org Subject: [PATCH v3 4/5] mips: Do not define pud_leaf() when there is no PMD Date: Sat, 13 Jul 2024 09:08:26 +0200 Message-ID: <1cb28532d832b48b0a41f169615fec40546a5398.1720854135.git.christophe.leroy@csgroup.eu> 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=1720854504; l=1388; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=+hQ+cxc/Ik0JwvL+Bfnn1kxrsZliqHaKk8FlBgA+6Fo=; b=PLrrIe9d7K8ajU9r5dWm0pYSfP8m3PYAmv4ou0R1F/fHVq5h7MJVKy8XI87mc+oO63w30Q/0N 999CdgHyAKNBeKPL3EK6axF0jxci7jZZYgenwddYCjhEEnjixrFTwoj X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 2144A40007 X-Stat-Signature: 7t1qujfxprr67fw7hoaarkbj8okpjoxn X-Rspam-User: X-HE-Tag: 1720854553-759603 X-HE-Meta: U2FsdGVkX19g9a+JVJwdHeit0mdT8ew0ImqJ7d+MF5Ei7A6rGoRNYe0vRJQ6yNksdhckLWDKvMKU0aGD9vCJsyUXzUzCYnlkV3m7UsZ0fe3EclqvnOZcNmF6/jaLDZrfOR387us9k8q++dw1TO9hy5t7wSznYUnBXNYsOppt5nQTt9sJsdmGKCBw3Oog5trs038a8rNjvwKJYKnbKa0yMfTz5dMphjeVNSEb5TqV1jBNExmd5VvBbcvNY16nc/RwPZ8RfnfgYL2olwmw/1jcfQhhYlOKeKof01xFRfu5hbmHPQXv5mWvq9TthXzsZOwOlEV1RwRuQkWkg3hfFCQXSzqkJ8VK/Hll1/yzkh3+cQxqYKimUjssT9eLmuvRpdxVYvkrxEv60eq17mjPNi86TF/ZxM4uL51e1X01r2yn2B+hxa1Co4htvfGMlX2i0B6snY9/YiL37G2o74MbyrA362aNbxKtQpUxeCNniSs6YoFBTkxoKzRcFRMCnrFZ+ovX7+X5uoAxBd8kZJchwSzbTW/gWAjkBiyBhK7u6YOUP70XkOW8u7yGFkkFSMWV6KvXyUTh5qYL4WUVVhYmYK8IjNkeYUMmYzubruxErqfjp7JcyFi1QJA1fcsDN7I+pg25xirvBWnDQ52W+Pbs/k66+ie0tzKyvr1J0LdC9xbtLdIRXj/T+GEIlNdfrCWbZBJzk8g4BUGVPrLGqfOOsYV2F3I2dK1ME3OeBt4E3QN+J3/iS4fchuOICTiBVN38K4htn2quY/o7Ip8KJ27AWenYTRlc3KEmMPuctwDxKzyOUvhsj3W5sQcGYKP4SmkfX/cSdX1sLirzbgF1vpwhD9kMJ4ZCslLWZpLreLT8IxIE6FVlxPbKUfkSEDGKvw6KT+7HBpxVIDhgvS9tg0K3w0ksDy97Qvj7MSR9SKv5fWASvHB3mZWoMOaBqaj8ZlA4e8XMYmWVH9u0oB+ew/FrFIn iKOEZP4E +qgABW469p20zrFVKScC83EFYvjxvjyhdRmba49AbyXjT8wW4JHmpD8vbiNFvvKisrBYxQTKZIu9tnpxLuksx4VLPtwP1AxNXWFXRLoSI1u4u3YXiVq2ap2UwafCN18Bkm6fk0r/QjGOH4o5l7WfYcB/FElKG+GefjXT/UMCFas62keymFBDPOh5bFjDoY16rL5q4wb1xkKyZDDc= 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: pud_leaf() is already provided by asm-generic/pgtable-nopmd.h Do not add a macro that hides and overrides the static inline definition in asm-generic/pgtable-nopmd.h. Signed-off-by: Christophe Leroy --- arch/mips/include/asm/pgtable-64.h | 4 ++++ arch/mips/include/asm/pgtable.h | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index 401c1d9e4409..d2de4e2800be 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h @@ -294,6 +294,10 @@ static inline void pud_clear(pud_t *pudp) { pud_val(*pudp) = ((unsigned long) invalid_pmd_table); } + +#ifdef _PAGE_HUGE +#define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0) +#endif #endif #define pte_page(x) pfn_to_page(pte_pfn(x)) diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index c29a551eb0ca..28233025f884 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h @@ -755,7 +755,6 @@ static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm, #ifdef _PAGE_HUGE #define pmd_leaf(pmd) ((pmd_val(pmd) & _PAGE_HUGE) != 0) -#define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0) #endif #define gup_fast_permitted(start, end) (!cpu_has_dc_aliases)