From patchwork Thu Jul 15 13:46:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 12380185 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A0D5C1B08C for ; Thu, 15 Jul 2021 13:50:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5613861279 for ; Thu, 15 Jul 2021 13:50:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5613861279 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DVaSO83iu05Nb/18UtEyf7OpR/PBvaRkZlMyeoCuJT8=; b=dxvZIbq7QB+O34 5IkbwG9qF6pt7vp8jG5O3QLt0ZzEg8BY1DaqZ/YO32MMW0IQHKDvZG7hw6BoXRpW+93ROyYVxJf4W zaCJRWgQmLJPQym+68BYSYmBnZtqLFzttJ/u3u8rK/1LBg9bLldLNhvP70kEfpXRCE0nushHv+Fdj lXo/bE7swQeS0AVT+FovER8SulSCNQX9p1BIvyU7xD11Fyl9TbQxy3Grq8rdQoGzwR6TiZLulQ3kb QE/5C4r41RskWChmkes7b/TZ2HBorVxM8jZT7F4v5SZYtnzZd4jm4avW1z5XIEl+C3yF3kcwHaN67 ZNOdAWDPT/aJemlRNWsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m41iq-000zcT-LG; Thu, 15 Jul 2021 13:48:16 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m41io-000zcK-47 for linux-arm-kernel@bombadil.infradead.org; Thu, 15 Jul 2021 13:48:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=WOLvypKMIjhFPizMST7OeOsTsse8mwCG5b0u88ACeC0=; b=hn4BABqA9+08E5oQGD1ybUF0OQ oEipt+lhZBPhGk0KMO3WiqncwArQJJL6220EYvjN6E4zTmpOR/cjaxGVPyc21zEIMsfc74UZQhO// guEg5Yo8jFvczS5xweMQBHW8V9/37Zn9MvpxTB1HHrUHGYRyF+eMS8sQQfwJEP76QIcN+avETZdT0 JOAdrU9RM4z3O0U3dMjA+F/sYbri/3I+5MqGsi3EYycBPRBjdKRzgS9MUVxcLV1qugBKNtX4WUUzh NvI+3s9lui3Nt9UPfMNTSFXC/nUm/ZoWQ+NUaUxU+wmB81705gNlJ3eM5rkV41aZeSbOaJZoE3zKP z58D/93w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m41hd-003OeO-PS; Thu, 15 Jul 2021 13:47:12 +0000 From: "Matthew Wilcox (Oracle)" To: linux-arch@vger.kernel.org, linux-parisc@vger.kernel.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] arm: Rename PMD_ORDER to PMD_TABLE_ORDER Date: Thu, 15 Jul 2021 14:46:10 +0100 Message-Id: <20210715134612.809280-2-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210715134612.809280-1-willy@infradead.org> References: <20210715134612.809280-1-willy@infradead.org> MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is the order of the page table allocation, not the order of a PMD. Signed-off-by: Matthew Wilcox (Oracle) --- arch/arm/kernel/head.S | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 9eb0b4dbcc12..6da39a1d70ba 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -38,10 +38,10 @@ #ifdef CONFIG_ARM_LPAE /* LPAE requires an additional page for the PGD */ #define PG_DIR_SIZE 0x5000 -#define PMD_ORDER 3 +#define PMD_TABLE_ORDER 3 #else #define PG_DIR_SIZE 0x4000 -#define PMD_ORDER 2 +#define PMD_TABLE_ORDER 2 #endif .globl swapper_pg_dir @@ -237,7 +237,7 @@ __create_page_tables: mov r6, r6, lsr #SECTION_SHIFT 1: orr r3, r7, r5, lsl #SECTION_SHIFT @ flags + kernel base - str r3, [r4, r5, lsl #PMD_ORDER] @ identity mapping + str r3, [r4, r5, lsl #PMD_TABLE_ORDER] @ identity mapping cmp r5, r6 addlo r5, r5, #1 @ next section blo 1b @@ -247,13 +247,13 @@ __create_page_tables: * set two variables to indicate the physical start and end of the * kernel. */ - add r0, r4, #KERNEL_OFFSET >> (SECTION_SHIFT - PMD_ORDER) + add r0, r4, #KERNEL_OFFSET >> (SECTION_SHIFT - PMD_TABLE_ORDER) ldr r6, =(_end - 1) adr_l r5, kernel_sec_start @ _pa(kernel_sec_start) str r8, [r5] @ Save physical start of kernel orr r3, r8, r7 @ Add the MMU flags - add r6, r4, r6, lsr #(SECTION_SHIFT - PMD_ORDER) -1: str r3, [r0], #1 << PMD_ORDER + add r6, r4, r6, lsr #(SECTION_SHIFT - PMD_TABLE_ORDER) +1: str r3, [r0], #1 << PMD_TABLE_ORDER add r3, r3, #1 << SECTION_SHIFT cmp r0, r6 bls 1b @@ -269,14 +269,14 @@ __create_page_tables: mov r3, pc mov r3, r3, lsr #SECTION_SHIFT orr r3, r7, r3, lsl #SECTION_SHIFT - add r0, r4, #(XIP_START & 0xff000000) >> (SECTION_SHIFT - PMD_ORDER) - str r3, [r0, #((XIP_START & 0x00f00000) >> SECTION_SHIFT) << PMD_ORDER]! + add r0, r4, #(XIP_START & 0xff000000) >> (SECTION_SHIFT - PMD_TABLE_ORDER) + str r3, [r0, #((XIP_START & 0x00f00000) >> SECTION_SHIFT) << PMD_TABLE_ORDER]! ldr r6, =(_edata_loc - 1) - add r0, r0, #1 << PMD_ORDER - add r6, r4, r6, lsr #(SECTION_SHIFT - PMD_ORDER) + add r0, r0, #1 << PMD_TABLE_ORDER + add r6, r4, r6, lsr #(SECTION_SHIFT - PMD_TABLE_ORDER) 1: cmp r0, r6 add r3, r3, #1 << SECTION_SHIFT - strls r3, [r0], #1 << PMD_ORDER + strls r3, [r0], #1 << PMD_TABLE_ORDER bls 1b #endif @@ -286,10 +286,10 @@ __create_page_tables: */ mov r0, r2, lsr #SECTION_SHIFT cmp r2, #0 - ldrne r3, =FDT_FIXED_BASE >> (SECTION_SHIFT - PMD_ORDER) + ldrne r3, =FDT_FIXED_BASE >> (SECTION_SHIFT - PMD_TABLE_ORDER) addne r3, r3, r4 orrne r6, r7, r0, lsl #SECTION_SHIFT - strne r6, [r3], #1 << PMD_ORDER + strne r6, [r3], #1 << PMD_TABLE_ORDER addne r6, r6, #1 << SECTION_SHIFT strne r6, [r3] @@ -308,7 +308,7 @@ __create_page_tables: addruart r7, r3, r0 mov r3, r3, lsr #SECTION_SHIFT - mov r3, r3, lsl #PMD_ORDER + mov r3, r3, lsl #PMD_TABLE_ORDER add r0, r4, r3 mov r3, r7, lsr #SECTION_SHIFT @@ -338,7 +338,7 @@ __create_page_tables: * If we're using the NetWinder or CATS, we also need to map * in the 16550-type serial port for the debug messages */ - add r0, r4, #0xff000000 >> (SECTION_SHIFT - PMD_ORDER) + add r0, r4, #0xff000000 >> (SECTION_SHIFT - PMD_TABLE_ORDER) orr r3, r7, #0x7c000000 str r3, [r0] #endif @@ -348,10 +348,10 @@ __create_page_tables: * Similar reasons here - for debug. This is * only for Acorn RiscPC architectures. */ - add r0, r4, #0x02000000 >> (SECTION_SHIFT - PMD_ORDER) + add r0, r4, #0x02000000 >> (SECTION_SHIFT - PMD_TABLE_ORDER) orr r3, r7, #0x02000000 str r3, [r0] - add r0, r4, #0xd8000000 >> (SECTION_SHIFT - PMD_ORDER) + add r0, r4, #0xd8000000 >> (SECTION_SHIFT - PMD_TABLE_ORDER) str r3, [r0] #endif #endif From patchwork Thu Jul 15 13:46:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 12380189 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 749A3C07E96 for ; Thu, 15 Jul 2021 13:51:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3FA3861278 for ; Thu, 15 Jul 2021 13:51:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FA3861278 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+Hl9/Eo5x+BeZTXwDWtvc1rUQ2u9PKrvtN49HzNnmSk=; b=1bLzmb+387kqcK 70hgdCQCAqwqfXYlPoqgVlm42AWoia8RXXCZkEp7VCnTodGXUh1B5mgBJlN0Mr39S9khX94W9IbNl lPzWFlRXqOZuQjiaGvtpR8tR11dT0bwPajQT2VCd2/PrZMZ3CRzADxgiCbcPr0huMxqv5gTqTjNO0 ozc7DlCylls9DnVtlaKMsgBSt3tW6x7vZ2CI1v32XyZcXwi51Seb75FhGfB7lsiPj5/0UiUYkGsk1 AOFgR1a/N0ejxAioJmEYV6/uNxfwHJDFQ2DbyrFZdqkU6KftUoXm1ujIg1ub2iPWKo9I1dWp/x5QA MsGhpS+jUpK8RnhiZUXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m41kP-00100V-F7; Thu, 15 Jul 2021 13:49:53 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m41kM-000zzl-8q for linux-arm-kernel@bombadil.infradead.org; Thu, 15 Jul 2021 13:49:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=AplXofgFmj6oGBE3wtqK7qdaZsU8n7D/+VR9nSQYob4=; b=n/U2CvWTGD3wXFKQLauXQt7DBo Et7YSyxAA6ZOpVc0zh9P+2+cI7HyxO2SkXq5Ce4YSyJqRFxUi3YH0U0hq4tlSg2y920ppqG9kryxi go5Dn18LUwLSo7hgSHALSRtdzm/zIsxhbbXHeQZj2SH9fiaB06gF1CFp917qutnLGTp/Ji3vchblg gjUbpDErFbGxd/7NiBIeqWaqCth9bCOIEGB+1/RqV02G2i5bjhKOnjRLYwDnzw9+RFMbgyDa0eodn 8XkSOSg7IVLPNU/TYuOs/Iy6AF3JhNKg7peAy1MzTSKnwTNj8iRVUVZTw3ixylqaFYth8pMmpqCey dR7vKokg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m41iH-003Oiz-P4; Thu, 15 Jul 2021 13:47:50 +0000 From: "Matthew Wilcox (Oracle)" To: linux-arch@vger.kernel.org, linux-parisc@vger.kernel.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org Subject: [PATCH 2/3] mips: Rename PMD_ORDER to PMD_TABLE_ORDER Date: Thu, 15 Jul 2021 14:46:11 +0100 Message-Id: <20210715134612.809280-3-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210715134612.809280-1-willy@infradead.org> References: <20210715134612.809280-1-willy@infradead.org> MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is the order of the page table allocation, not the order of a PMD. Signed-off-by: Matthew Wilcox (Oracle) --- arch/mips/include/asm/pgalloc.h | 2 +- arch/mips/include/asm/pgtable-32.h | 2 +- arch/mips/include/asm/pgtable-64.h | 18 +++++++++--------- arch/mips/kernel/asm-offsets.c | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/mips/include/asm/pgalloc.h b/arch/mips/include/asm/pgalloc.h index 4b2567d6b2df..795e9e2219c9 100644 --- a/arch/mips/include/asm/pgalloc.h +++ b/arch/mips/include/asm/pgalloc.h @@ -61,7 +61,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) pmd_t *pmd = NULL; struct page *pg; - pg = alloc_pages(GFP_KERNEL | __GFP_ACCOUNT, PMD_ORDER); + pg = alloc_pages(GFP_KERNEL | __GFP_ACCOUNT, PMD_TABLE_ORDER); if (pg) { pgtable_pmd_page_ctor(pg); pmd = (pmd_t *)page_address(pg); diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgtable-32.h index 95df9c293d8d..8d57bd5b0b94 100644 --- a/arch/mips/include/asm/pgtable-32.h +++ b/arch/mips/include/asm/pgtable-32.h @@ -82,7 +82,7 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, #define PGD_ORDER (__PGD_ORDER >= 0 ? __PGD_ORDER : 0) #define PUD_ORDER aieeee_attempt_to_allocate_pud -#define PMD_ORDER aieeee_attempt_to_allocate_pmd +#define PMD_TABLE_ORDER aieeee_attempt_to_allocate_pmd #define PTE_ORDER 0 #define PTRS_PER_PGD (USER_PTRS_PER_PGD * 2) diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index 41921acdc9d8..ae0d5a09064d 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h @@ -51,12 +51,12 @@ #define PMD_MASK (~(PMD_SIZE-1)) # ifdef __PAGETABLE_PUD_FOLDED -# define PGDIR_SHIFT (PMD_SHIFT + (PAGE_SHIFT + PMD_ORDER - 3)) +# define PGDIR_SHIFT (PMD_SHIFT + (PAGE_SHIFT + PMD_TABLE_ORDER - 3)) # endif #endif #ifndef __PAGETABLE_PUD_FOLDED -#define PUD_SHIFT (PMD_SHIFT + (PAGE_SHIFT + PMD_ORDER - 3)) +#define PUD_SHIFT (PMD_SHIFT + (PAGE_SHIFT + PMD_TABLE_ORDER - 3)) #define PUD_SIZE (1UL << PUD_SHIFT) #define PUD_MASK (~(PUD_SIZE-1)) #define PGDIR_SHIFT (PUD_SHIFT + (PAGE_SHIFT + PUD_ORDER - 3)) @@ -91,13 +91,13 @@ # define PGD_ORDER 1 # define PUD_ORDER aieeee_attempt_to_allocate_pud # endif -#define PMD_ORDER 0 +#define PMD_TABLE_ORDER 0 #define PTE_ORDER 0 #endif #ifdef CONFIG_PAGE_SIZE_8KB #define PGD_ORDER 0 #define PUD_ORDER aieeee_attempt_to_allocate_pud -#define PMD_ORDER 0 +#define PMD_TABLE_ORDER 0 #define PTE_ORDER 0 #endif #ifdef CONFIG_PAGE_SIZE_16KB @@ -107,22 +107,22 @@ #define PGD_ORDER 0 #endif #define PUD_ORDER aieeee_attempt_to_allocate_pud -#define PMD_ORDER 0 +#define PMD_TABLE_ORDER 0 #define PTE_ORDER 0 #endif #ifdef CONFIG_PAGE_SIZE_32KB #define PGD_ORDER 0 #define PUD_ORDER aieeee_attempt_to_allocate_pud -#define PMD_ORDER 0 +#define PMD_TABLE_ORDER 0 #define PTE_ORDER 0 #endif #ifdef CONFIG_PAGE_SIZE_64KB #define PGD_ORDER 0 #define PUD_ORDER aieeee_attempt_to_allocate_pud #ifdef CONFIG_MIPS_VA_BITS_48 -#define PMD_ORDER 0 +#define PMD_TABLE_ORDER 0 #else -#define PMD_ORDER aieeee_attempt_to_allocate_pmd +#define PMD_TABLE_ORDER aieeee_attempt_to_allocate_pmd #endif #define PTE_ORDER 0 #endif @@ -132,7 +132,7 @@ #define PTRS_PER_PUD ((PAGE_SIZE << PUD_ORDER) / sizeof(pud_t)) #endif #ifndef __PAGETABLE_PMD_FOLDED -#define PTRS_PER_PMD ((PAGE_SIZE << PMD_ORDER) / sizeof(pmd_t)) +#define PTRS_PER_PMD ((PAGE_SIZE << PMD_TABLE_ORDER) / sizeof(pmd_t)) #endif #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c index 04ca75278f02..d6b89080d245 100644 --- a/arch/mips/kernel/asm-offsets.c +++ b/arch/mips/kernel/asm-offsets.c @@ -198,7 +198,7 @@ void output_mm_defines(void) BLANK(); DEFINE(_PGD_ORDER, PGD_ORDER); #ifndef __PAGETABLE_PMD_FOLDED - DEFINE(_PMD_ORDER, PMD_ORDER); + DEFINE(_PMD_TABLE_ORDER, PMD_TABLE_ORDER); #endif DEFINE(_PTE_ORDER, PTE_ORDER); BLANK(); From patchwork Thu Jul 15 13:46:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 12380187 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8541AC07E96 for ; Thu, 15 Jul 2021 13:51:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 53C2B61278 for ; Thu, 15 Jul 2021 13:51:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53C2B61278 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mQkdH4ManSFITi0Kw1vQc2s71Y0ut1zZwzmV1AXl6o8=; b=RI6PIEvvuB4+X4 qCsNEcotx9g64WOF98G3k/PWjoS2zpNoIf3pAP/+ePk/pB7VI3+8IvSZPtUXbB/JKxRWlYmTFJd11 Er6+QrFv5n2VqKSfFAIJXrsHWy5/S+wHAyX9cs7zSKFbwpR2Y12VxEpGYLaxqABEpmSmwA13mFDjS MNWt8mtKyDalyJ281SHqN+qN03GZ/muqX5ZVAGL91wK8lJJKBtmiphgKmGrLDxyuca9Ojq00fcQNu DhvtZQ55Wm0F113rt0rHvhLcY5Tqkijt/vYVA6nsRxhCtqC3pRy3oovE7M7P8mb06yN3VACNolHYK MuwUVte9tv3GSq95jlTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m41l8-0010Dj-2l; Thu, 15 Jul 2021 13:50:38 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m41l4-0010CU-4x for linux-arm-kernel@bombadil.infradead.org; Thu, 15 Jul 2021 13:50:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=F0uHGnaKYlt+4Ccxjip6cwGR1WaebuCnkA/cVWUYbK0=; b=aHD2N0CpQApz1uEx3wNPk8vTYq wWEkWxaMX4sVd4gm5TJ1Q3HAXnv5x/7xG93pGVbr+CQV1VrB6Xk/BbpbvPOOGDS+jOwKZFfL5D269 d6z1j8ZSzf+QfX4D8/1nr4XXfqfyWJupUouTrF6R92Ug5xrdHNjat4j97tDJwnxqok7n+txBCGqgy 40ZUdS4twDwiHV4rdjIBvJO01ILL3BgHSox9GBqo3zOhnW650SL71Ly124E4TxFkGrr1kJPHqgQo3 NmdFNCfqELAWZUdncJ7SCcqnw6jV4kWVMcqW3GXmG9SR4G2zB28LF3SGcWtQmPNCaYnemPjVWZKc5 84Yd3XyQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m41jB-003Ooe-QF; Thu, 15 Jul 2021 13:48:56 +0000 From: "Matthew Wilcox (Oracle)" To: linux-arch@vger.kernel.org, linux-parisc@vger.kernel.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] parisc: Rename PMD_ORDER to PMD_TABLE_ORDER Date: Thu, 15 Jul 2021 14:46:12 +0100 Message-Id: <20210715134612.809280-4-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210715134612.809280-1-willy@infradead.org> References: <20210715134612.809280-1-willy@infradead.org> MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is the order of the page table allocation, not the order of a PMD. Signed-off-by: Matthew Wilcox (Oracle) --- arch/parisc/include/asm/pgalloc.h | 6 +++--- arch/parisc/include/asm/pgtable.h | 4 ++-- arch/parisc/mm/init.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h index 6a7e98e71f1d..54b63374579b 100644 --- a/arch/parisc/include/asm/pgalloc.h +++ b/arch/parisc/include/asm/pgalloc.h @@ -48,15 +48,15 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) { pmd_t *pmd; - pmd = (pmd_t *)__get_free_pages(GFP_PGTABLE_KERNEL, PMD_ORDER); + pmd = (pmd_t *)__get_free_pages(GFP_PGTABLE_KERNEL, PMD_TABLE_ORDER); if (likely(pmd)) - memset ((void *)pmd, 0, PAGE_SIZE << PMD_ORDER); + memset ((void *)pmd, 0, PAGE_SIZE << PMD_TABLE_ORDER); return pmd; } static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) { - free_pages((unsigned long)pmd, PMD_ORDER); + free_pages((unsigned long)pmd, PMD_TABLE_ORDER); } #endif diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index 43937af127b1..7badd872f05a 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h @@ -112,7 +112,7 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr) #define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER) #if CONFIG_PGTABLE_LEVELS == 3 -#define PMD_ORDER 1 +#define PMD_TABLE_ORDER 1 #define PGD_ORDER 0 #else #define PGD_ORDER 1 @@ -131,7 +131,7 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr) #define PMD_SHIFT (PLD_SHIFT + BITS_PER_PTE) #define PMD_SIZE (1UL << PMD_SHIFT) #define PMD_MASK (~(PMD_SIZE-1)) -#define BITS_PER_PMD (PAGE_SHIFT + PMD_ORDER - BITS_PER_PMD_ENTRY) +#define BITS_PER_PMD (PAGE_SHIFT + PMD_TABLE_ORDER - BITS_PER_PMD_ENTRY) #define PTRS_PER_PMD (1UL << BITS_PER_PMD) #else #define BITS_PER_PMD 0 diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 591a4e939415..3f7d6d5b56ac 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c @@ -378,8 +378,8 @@ static void __init map_pages(unsigned long start_vaddr, #if CONFIG_PGTABLE_LEVELS == 3 if (pud_none(*pud)) { - pmd = memblock_alloc(PAGE_SIZE << PMD_ORDER, - PAGE_SIZE << PMD_ORDER); + pmd = memblock_alloc(PAGE_SIZE << PMD_TABLE_ORDER, + PAGE_SIZE << PMD_TABLE_ORDER); if (!pmd) panic("pmd allocation failed.\n"); pud_populate(NULL, pud, pmd);