From patchwork Sat Jul 13 07:08:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 13732357 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 C1F42C3DA42 for ; Sat, 13 Jul 2024 07:09:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3C2526B008A; Sat, 13 Jul 2024 03:09:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 371F66B008C; Sat, 13 Jul 2024 03:09:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 212E26B0092; Sat, 13 Jul 2024 03:09:12 -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 025706B008A for ; Sat, 13 Jul 2024 03:09:11 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 774ABA2F7E for ; Sat, 13 Jul 2024 07:09:11 +0000 (UTC) X-FDA: 82333852902.19.0CCF67C Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by imf20.hostedemail.com (Postfix) with ESMTP id 676671C000F for ; Sat, 13 Jul 2024 07:09:09 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=csgroup.eu; spf=pass (imf20.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=1720854510; 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=VUbJGBUtYkL0HCKm49pw+6gboq/9sc9+tQT/FWl5FYY=; b=47x/Z5j/n4Zk7POKJyrb+myCtQAJ118G4Ux7zGE7ttwpV2Ff4J/00gAGsHU0n9WE42ktSx i9N38sInASLEcLH68H/DGidicpu7xNYE7Iy8OZLkRXvaxRRB5IZ4Dpeaoxru+U0N/dzPHy n1qbo/h8BVgBEjo9j0K4gAHvvyYrpmo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720854510; a=rsa-sha256; cv=none; b=lzzY+bkhybx5MK3srBBhCU3WCgsGqFlfA6kqCV1Geg2YsVM9aBShWD8axNgQmVIQg9qZUS yAC9f30nOPR0vuiAmYLjNZ7lprjEF0ZQnEZ1+EBSnFkwmLzTyehDYqF6pRY4uWv6UmnhtA msLL5f3nLG80djP+6J8CIHi+iUT+NI8= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=csgroup.eu; spf=pass (imf20.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4WLfhX1pTzz9sSW; Sat, 13 Jul 2024 09:09:00 +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 QGR30cHzyt9i; Sat, 13 Jul 2024 09:09:00 +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 4WLfhW68VNz9sSS; Sat, 13 Jul 2024 09:08:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C0DA28B76C; Sat, 13 Jul 2024 09:08:59 +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 Is4Ot-2G3sfo; Sat, 13 Jul 2024 09:08:59 +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 CA20E8B764; Sat, 13 Jul 2024 09:08:58 +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 3/5] LoongArch: Do not define pud_leaf() when there is no PMD Date: Sat, 13 Jul 2024 09:08:25 +0200 Message-ID: <732f3bdff0eed9cadfd35c698fd625e6e6cd6a04.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=1137; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=RQbVBWOxUSgTrrtTd+PLaiyfFRNFBzohHDDwKNmlF88=; b=kyeTq4tTk01pp+vPiGqPZ3xAI/bTN/2nOUDzVVH38OHwoM7j5I4X1quNwT1FsruuJa0FOTAwZ rE5KJnkCyhRC1DTqMd1fiL38cWn3qM95rUdVmXFoo9KKFZEIFgqwdKA X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 676671C000F X-Stat-Signature: wangyicbxmxkhooyfnng6rs9p8uw8tff X-Rspam-User: X-HE-Tag: 1720854549-284250 X-HE-Meta: U2FsdGVkX19KMquwyKpAq9C12/h5a+wi+tJxLIVlKViDXceLx2pykDYAMSWKdID+oFkqckHr5vjJjVfJgBXhlML4WoYuI/F/tWa+WvNxcxaIupktjnGb/QvucqWVhmvh7k43gpsUiF+4JFTNyNcVESfbzkUq1q7YrqjDu4A+sij8t1YXCQroXk6zIhrM3fjClkwC4QkyP5iVyolt8L7Ax8J4fsvcC7hX8BVChFUKLdfWgVhVMoDdvuTbGlRWky+Ypsa2ZFFlStgFv0a7o/qq/waGo6kRM1foiFXggfniAKsrlviSMikGjqWqeCRYJT52KnxURujLFVoEj7yXGYhA2WBMmmr8tjeYy5jzz1iCngK1GFUsCUMRp9XjIFHCnnMzoXtzDswS26QbGj9iHQZfiElaoQkRUbXYPJmVqsTlb0qnYkH9cZx2qvhRSRA2J9qi7gOx0C2NdP5Bi3dck0OHS1/W9Iwdiw68Sw0akpP6+Ahm5HKJmnPOTnwMlxrZaXUgSY9IVUeOlpoFlOE4pJ2220HBPxA0Troh4zLLotI+Tj1jvtUqBe29if509gtFsDmnF589brss3UtZa1hZeNoulAc4KPAZjjhUYsAJ8x5OnmbTOzQh1SpxScL0+AFxWI1FDj0MlwhnhBdGFjhP7Ju8qcVj9LzZNOQ3YQ3YrpkXxzgsP/iNTKyvp6yxaNagZKSM4UisIVQDOd4/uHn3sif5g385+SCGxe8CcyKbf/1G3okdWUz1MR0jaheKnWTsUUaiWaQL6Ajtj4+M8+Er9j2q4bkRIuYGmLh387GxmYPwxdRy/UoTkRKMTv4sBzyVh1cRUpk4DEUwtdsJETWeGtGB60236jIR4iTq2y8TB6BUl7+I4+McSgI6oxIWaAS8kcyN1wadCZzPuTkJnBmDX8QTwbK80kKe2IsNkmZ7mCVLppDxGuzXeIXyl+Z4NRZm1Ubril77of7+vgj5QprND7T TawBLE6b 1Qm7wFnRjcCCzi95WM22XvbC4Eix8jRjaXR82Htqp1n02wuQLyfIUG/Qz7Xz2NjRkx0vlWXsfqn68ie64Vwt2oF5pla4KkBHYriAJx36vGdSwxA6nNItAFa+e4YlXBrDALML8burdtcDVd3VmmFCRC4mbNVGRJpe69eUtkXNyXEB1IOLFPzLOLcHjTxF0qZSptoznDeiYZ35MS2g= 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/loongarch/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/include/asm/pgtable.h b/arch/loongarch/include/asm/pgtable.h index 161dd6e10479..da91b2d8bc6f 100644 --- a/arch/loongarch/include/asm/pgtable.h +++ b/arch/loongarch/include/asm/pgtable.h @@ -207,6 +207,7 @@ static inline pmd_t *pud_pgtable(pud_t pud) #define pud_phys(pud) PHYSADDR(pud_val(pud)) #define pud_page(pud) (pfn_to_page(pud_phys(pud) >> PAGE_SHIFT)) +#define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0) #endif @@ -611,7 +612,6 @@ static inline long pmd_protnone(pmd_t pmd) #endif /* CONFIG_NUMA_BALANCING */ #define pmd_leaf(pmd) ((pmd_val(pmd) & _PAGE_HUGE) != 0) -#define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0) /* * We provide our own get_unmapped area to cope with the virtual aliasing