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 (Oracle)" 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);