From patchwork Sun Jul 3 14:12:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 12904375 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 C5135CCA481 for ; Sun, 3 Jul 2022 14:13:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6867F900005; Sun, 3 Jul 2022 10:13:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 637126B0080; Sun, 3 Jul 2022 10:13:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4FFE0900005; Sun, 3 Jul 2022 10:13:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 4235E6B007E for ; Sun, 3 Jul 2022 10:13:40 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 17C2420E5F for ; Sun, 3 Jul 2022 14:13:40 +0000 (UTC) X-FDA: 79645981800.24.F2F8D16 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf14.hostedemail.com (Postfix) with ESMTP id 451BF100008 for ; Sun, 3 Jul 2022 14:13:39 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 32BCFB80A39; Sun, 3 Jul 2022 14:13:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CACAC341CB; Sun, 3 Jul 2022 14:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656857616; bh=oXZW+dUjDDPpDV6V5KTSTxOrdigIFbUT4mUe7nec500=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o6CjB0J11WxgCdNY+KJBZq6cPCrF0uiW8afxPX6gF0HFKA4RMMDTiYl+ggu6gVgp3 QEhcUCw8yexCinnJo51BP3xFsZBkvQdnAkhdFlxdTUK3j/tqoo5TB7Plise33XB6PX cW3Ua/PoG00+osKgXds6MoZg+ZjFWUjw/ClFWu34WoKygnApMETD1ojNIOaQK1MXZo nkQMW4Gui4bhFyB7tTpdWp3/xHRf4ud6yzoUEvFM8CBsKu2vZdRURoiF0GSu6fD96/ bWsZP5O9zqC/3tCh5MOwg2ceqs0LdT/aK/js0xlPy7XY+u94c8qZD/cNcG/k6c5q/F IlCAAgFu9qHIQ== From: Mike Rapoport To: Andrew Morton Cc: Arnd Bergmann , Dinh Nguyen , Guo Ren , Helge Deller , Huacai Chen , "James E.J. Bottomley" , Matthew Wilcox , Max Filippov , Mike Rapoport , Mike Rapoport , Thomas Bogendoerfer , WANG Xuerui , linux-arch@vger.kernel.org, linux-csky@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linux-xtensa@linux-xtensa.org, loongarch@lists.linux.dev Subject: [PATCH 13/14] parisc: Rename PGD_ORDER to PGD_TABLE_ORDER Date: Sun, 3 Jul 2022 17:12:02 +0300 Message-Id: <20220703141203.147893-14-rppt@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220703141203.147893-1-rppt@kernel.org> References: <20220703141203.147893-1-rppt@kernel.org> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656857619; 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:dkim-signature; bh=veC3+dxxtHas2SNfQveEK4qup2DmVMy+Kr71iTNyvmg=; b=sLJYJbJq9Hk7awloe+OnRLHyVxHDopalgAp0A3TxUgM1lGvs3FF9/6OXAy+ns8+nwG7f9Z FUr+I8GpbJcCU7xZlPYQtiWyUj0ND1OBXhXrBem9nkvo/4OjT+DU1Y9FBQPmA7/up3YmLO r3QQZ9NDrs/IFWA3iuDd9liea94nhJI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656857619; a=rsa-sha256; cv=none; b=YbP1FsvfICSrEiI3ozWl5iIRyu03RlWGLl0SsSM++fpeuP1VDTN59YALgNr1nyvoWhfgYb V701BTsWEzLnx4IqGnH9o6Ga/8Elwd4FwdNSEgh+ImFqI4qOr7GqXY9RdJKtulmlRHcJ8l dql+ndnEyZDAnaSPJq0eYeA7ZpbkCvE= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=o6CjB0J1; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf14.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org X-Stat-Signature: kmrykkps6nmwzrfru5c7q5orfxfcue8f X-Rspam-User: Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=o6CjB0J1; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf14.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 451BF100008 X-HE-Tag: 1656857619-672488 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: From: Mike Rapoport This is the order of the page table allocation, not the order of a PGD. Signed-off-by: Mike Rapoport --- arch/parisc/include/asm/pgalloc.h | 6 +++--- arch/parisc/include/asm/pgtable.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h index 54b63374579b..e3e142b1c5c5 100644 --- a/arch/parisc/include/asm/pgalloc.h +++ b/arch/parisc/include/asm/pgalloc.h @@ -20,18 +20,18 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) { pgd_t *pgd; - pgd = (pgd_t *) __get_free_pages(GFP_KERNEL, PGD_ORDER); + pgd = (pgd_t *) __get_free_pages(GFP_KERNEL, PGD_TABLE_ORDER); if (unlikely(pgd == NULL)) return NULL; - memset(pgd, 0, PAGE_SIZE << PGD_ORDER); + memset(pgd, 0, PAGE_SIZE << PGD_TABLE_ORDER); return pgd; } static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) { - free_pages((unsigned long)pgd, PGD_ORDER); + free_pages((unsigned long)pgd, PGD_TABLE_ORDER); } #if CONFIG_PGTABLE_LEVELS == 3 diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index 69765a6dbe89..6790b554bdfd 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h @@ -118,9 +118,9 @@ extern void __update_cache(pte_t pte); #if CONFIG_PGTABLE_LEVELS == 3 #define PMD_TABLE_ORDER 1 -#define PGD_ORDER 0 +#define PGD_TABLE_ORDER 0 #else -#define PGD_ORDER 1 +#define PGD_TABLE_ORDER 1 #endif /* Definitions for 3rd level (we use PLD here for Page Lower directory @@ -144,10 +144,10 @@ extern void __update_cache(pte_t pte); /* Definitions for 1st level */ #define PGDIR_SHIFT (PLD_SHIFT + BITS_PER_PTE + BITS_PER_PMD) -#if (PGDIR_SHIFT + PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY) > BITS_PER_LONG +#if (PGDIR_SHIFT + PAGE_SHIFT + PGD_TABLE_ORDER - BITS_PER_PGD_ENTRY) > BITS_PER_LONG #define BITS_PER_PGD (BITS_PER_LONG - PGDIR_SHIFT) #else -#define BITS_PER_PGD (PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY) +#define BITS_PER_PGD (PAGE_SHIFT + PGD_TABLE_ORDER - BITS_PER_PGD_ENTRY) #endif #define PGDIR_SIZE (1UL << PGDIR_SHIFT) #define PGDIR_MASK (~(PGDIR_SIZE-1))