From patchwork Sun Jul 3 14:11:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 12904361 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 A1E79C43334 for ; Sun, 3 Jul 2022 14:13:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 48BA36B0078; Sun, 3 Jul 2022 10:13:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 43B00900004; Sun, 3 Jul 2022 10:13:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 329D0900003; Sun, 3 Jul 2022 10:13:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 2559D6B0078 for ; Sun, 3 Jul 2022 10:13:09 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 00ED7603A6 for ; Sun, 3 Jul 2022 14:13:09 +0000 (UTC) X-FDA: 79645980498.01.394F668 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf10.hostedemail.com (Postfix) with ESMTP id AE44AC006A for ; Sun, 3 Jul 2022 14:13:08 +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 1F5A760EB7; Sun, 3 Jul 2022 14:13:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3250EC341D0; Sun, 3 Jul 2022 14:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656857587; bh=Vue7H8LCr+M1pj6DZ3BvkAhUx8ulVRB7UqrqmOhXw0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lj3LSvmd8HZOaUHvmwa/XcErWXTay6KQYVI7bVrWrZ7qEJeJS9irgXslO+8w59ptJ xt8froGTzHRAHZ1Sjq+xCMO103Kr8Ytt5cIQ5iv2OZOKobt1AtIr2l3phDsihSSgRz 2Bwh6kdWnkXcGPzkQhbnt24mzTrvyQKaA8W8oeRMAR9MBa3bOpE344IzuHtImHCWpn HE+r3Ut6kj5nqe33auzbizSTcCuUqMjbBd1ivAWfMn1AOCIHkJdrMV80LBx3v/4Uhm ngbpzfsvLmK6hH0hhUFLvRg0oAZjURrBoCyqIuPZKsBqhMZIfWn+HZja1iq89H5b3E F18KrH5X5nyQA== 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 08/14] nios2: drop definition of PGD_ORDER Date: Sun, 3 Jul 2022 17:11:57 +0300 Message-Id: <20220703141203.147893-9-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-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=lj3LSvmd; spf=pass (imf10.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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656857588; 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=xqeFx/hEiHeiLFUZSradoBktCTFSt9U4DFx3M+zjXMY=; b=fwwvxvwh+2X+5xTMXHvKsDfkm/bLWmu+tFDC33BBwg1yk5osKxW3H+dD9wbeVuUN2vAgAt IWuchOyc21b82U00qugbvPZCqXPdhLKuLDjEHO9SfaDNPA04bTFfHOBfi0U/G5kE8uGh+K 0nTg5gcuro0lfaGInsWLYa5iY8uIkOM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656857588; a=rsa-sha256; cv=none; b=3rVf2FAzhq0Cn94Aen1yZR7WDpDX1NzUXI2WO9o9oNj6QDC/PN9/4RSub8KbDKG69HCEnb F6qSlk9CcBZig6fAeijcDpxdZVIT+YMUOLWHbUSFJTzrq4uhq83G7II8osdaj/jn+/snNp JyVbbq+mV7mthT3a4zya6vWuW87+LiM= X-Stat-Signature: 8cax43rtf4wxzhg9x1p6osjomtqt3a4w X-Rspamd-Queue-Id: AE44AC006A Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=lj3LSvmd; spf=pass (imf10.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-Rspamd-Server: rspam12 X-Rspam-User: X-HE-Tag: 1656857588-712739 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. Since its always hardwired to 0, simply drop it. Signed-off-by: Mike Rapoport --- arch/nios2/include/asm/pgtable.h | 4 +--- arch/nios2/mm/init.c | 3 +-- arch/nios2/mm/pgtable.c | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/nios2/include/asm/pgtable.h b/arch/nios2/include/asm/pgtable.h index eaf8f28baa8b..74af16dafe86 100644 --- a/arch/nios2/include/asm/pgtable.h +++ b/arch/nios2/include/asm/pgtable.h @@ -68,9 +68,7 @@ struct mm_struct; #define PAGE_COPY MKP(0, 0, 1) -#define PGD_ORDER 0 - -#define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t)) +#define PTRS_PER_PGD (PAGE_SIZE / sizeof(pgd_t)) #define PTRS_PER_PTE (PAGE_SIZE / sizeof(pte_t)) #define USER_PTRS_PER_PGD \ diff --git a/arch/nios2/mm/init.c b/arch/nios2/mm/init.c index 2d6dbf7701f6..eab65e8ea69c 100644 --- a/arch/nios2/mm/init.c +++ b/arch/nios2/mm/init.c @@ -78,8 +78,7 @@ void __init mmu_init(void) flush_tlb_all(); } -#define __page_aligned(order) __aligned(PAGE_SIZE << (order)) -pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER); +pgd_t swapper_pg_dir[PTRS_PER_PGD] __aligned(PAGE_SIZE); pte_t invalid_pte_table[PTRS_PER_PTE] __aligned(PAGE_SIZE); static struct page *kuser_page[1]; diff --git a/arch/nios2/mm/pgtable.c b/arch/nios2/mm/pgtable.c index 9b587fd592dd..7c76e8a7447a 100644 --- a/arch/nios2/mm/pgtable.c +++ b/arch/nios2/mm/pgtable.c @@ -54,7 +54,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) { pgd_t *ret, *init; - ret = (pgd_t *) __get_free_pages(GFP_KERNEL, PGD_ORDER); + ret = (pgd_t *) __get_free_page(GFP_KERNEL); if (ret) { init = pgd_offset(&init_mm, 0UL); pgd_init(ret);