From patchwork Tue Jul 5 15:47:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 12906803 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 D4E26C43334 for ; Tue, 5 Jul 2022 15:48:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7884C6B0081; Tue, 5 Jul 2022 11:48:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7107D6B0082; Tue, 5 Jul 2022 11:48:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D84E6B0083; Tue, 5 Jul 2022 11:48:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 4C7E16B0081 for ; Tue, 5 Jul 2022 11:48:46 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 292E080CFD for ; Tue, 5 Jul 2022 15:48:46 +0000 (UTC) X-FDA: 79653479052.04.2C99F62 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf28.hostedemail.com (Postfix) with ESMTP id BBF39C0059 for ; Tue, 5 Jul 2022 15:48:45 +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 dfw.source.kernel.org (Postfix) with ESMTPS id B87CC61B50; Tue, 5 Jul 2022 15:48:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 941B5C36AE2; Tue, 5 Jul 2022 15:48:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657036124; bh=9oaDWzRU6R0GkjSESj8xB0w7pNOdSSaExN3Vy3D6ls8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cAfMts3hGwakKfseM8AZpijDZr4H9urWzpwNHqBWOGC/J2thqz6Q7V+VJXrNotL/4 yaiztHNM0qSW8XYTkHylOjgM08kCHXZ6cxSjjqJR/BmqhY0EAU9qO1jn6l4NQNfhbW 7eMU4fqbWgfMxzxC0C5NniYlNoAfabHyegMlfcisMGqFTRjGUsGesf5Y0CocKNLRi6 7W+TvZKbJLUYR9ss9hEgMRV77Hy+JoigITZMvmNcahZysMrcw7kiCF4CLMiAQPx72h XUylFJ1YQ9pVlFOo27H5jyvHNjew2ZquZi9Qqzua7/n6nOxbaQ6Ur3TM2QKZCeXQxM nM6xNf0OuqgsA== 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 , "Russell King (Oracle)" , 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 v2 13/15] parisc: Rename PGD_ORDER to PGD_TABLE_ORDER Date: Tue, 5 Jul 2022 18:47:06 +0300 Message-Id: <20220705154708.181258-14-rppt@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220705154708.181258-1-rppt@kernel.org> References: <20220705154708.181258-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=1657036125; 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=/a7Dwh/eWkN6pwi+qUIK2yzFJerD9f2k6f5w64Ux80M=; b=Htm/idu4lG2Nv259bR3Wd28QrsbWmH9ghiXay7qleUJlXS01bl461pVL5HldyAH6LisWRX T+H0r+naoGdHH/sPH/j8OSmvnF9YeSIwxy/RiP2zNODSMHgkkKdca+Le1al9ho1Y3Kg/wM VpgbOFgd70AhTbd+vnuysZmTVZmc18s= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=cAfMts3h; spf=pass (imf28.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657036125; a=rsa-sha256; cv=none; b=WpQo4mIQ8Rr5c2jpKPxHmx1tysG1hZhRyt26dohjnYf5nScpL33rLYdDgPzLJUrIteyruf nIiiRKHMuaSPj0gx8cAde8MbrAjyssd9P6oZ3OFOzMDEZsq6GV4Bs3R0ATKFcmJGY7AVi6 sJ94wYhRGTB175sHrwayXiDfOJgQJ4E= X-Stat-Signature: gqx494c8aciuc1naojonneyt718w9ksh X-Rspamd-Queue-Id: BBF39C0059 Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=cAfMts3h; spf=pass (imf28.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspam-User: X-Rspamd-Server: rspam02 X-HE-Tag: 1657036125-756714 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 Acked-by: Helge Deller --- 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))