From patchwork Sun Jul 3 14:11:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 12904355 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 61DFBCCA473 for ; Sun, 3 Jul 2022 14:12:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 01E836B0073; Sun, 3 Jul 2022 10:12:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F10268E0002; Sun, 3 Jul 2022 10:12:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DD8B48E0001; Sun, 3 Jul 2022 10:12:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id CD8806B0073 for ; Sun, 3 Jul 2022 10:12:35 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 9E433342CD for ; Sun, 3 Jul 2022 14:12:35 +0000 (UTC) X-FDA: 79645979070.14.F5E8AA8 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf09.hostedemail.com (Postfix) with ESMTP id DAEC314004B for ; Sun, 3 Jul 2022 14:12:34 +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 9CEEAB80B1B; Sun, 3 Jul 2022 14:12:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3D8EC341CB; Sun, 3 Jul 2022 14:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656857552; bh=DI2oxzurFMYqSzd7nO4fq973zusvJhghlTwe6lxPMqs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t/zlNbN/Q8wxA4e8/ycdSWMEVdV3TtSgYTBHpMxnZRLvanxF3+f9DUAqdWKdfpHlo fFAyZ4ugjxnn4bC84GIV7zy0iQJKjXtFH2/nbtMA91iMSkvAFdPwlYuzV1AX5pyhl8 uaMrInJ00ptJoJDUFCEHewp5xfmB3hQzGdQRauUgc6vHeYklU5tvn1T2fMBvWeXIZm 0bUggdGaNm4TeDcZvBWkL/ZJeiWCOM4cGwCxu0xzoNDCt2z22erznjTaqbKcTX7ME4 x2Mtr9OSUxNf8hnXp1y0Qwdpf9jq3W4FEBmALpw6ueos8y44pZwabhqG5ATObcqJnZ fVGdL7LUTkWVw== 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 02/14] csky: drop definition of PGD_ORDER Date: Sun, 3 Jul 2022 17:11:51 +0300 Message-Id: <20220703141203.147893-3-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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656857555; a=rsa-sha256; cv=none; b=tVfUE3Cr5aseFBh2OrXEB5Fhdbl8gqydjkEN00LtA0MUCbWK1ychoriyG8Aja2R96F1xr/ t22Oa+mq1IehF0cVSFgdpD+U/cChuktyh35WpOwOBE9earOGGftTilFFzP74UWu2vcNBWW I5QPsOstbasB96N2ro8TMZXBizay9/k= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="t/zlNbN/"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf09.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656857555; 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=ro5f3rCfi4OSfASMzq4jqQ3tBO4Vc3ag87TB7gqV4nI=; b=QNqYFzbrr1UC0esmukT2r0MNU7B/6KK12DkQvVG84efPlOz7sBW8FgXLKKJtTtKq6QU0nq atBiEdUgiZgbgzTcF7qxgigKxkd3Rx8F3GLXNXKQDVGI82gp4VYOoZxdeFYWfjsXrt91a8 oan6xOE4lqlUePVF+8ITGPVEhkNnXqM= X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: DAEC314004B Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="t/zlNbN/"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf09.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org X-Rspam-User: X-Stat-Signature: jd7wguooobzjtp7zd3ft1sqrt94mrggb X-HE-Tag: 1656857554-871208 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/csky/include/asm/pgalloc.h | 2 +- arch/csky/include/asm/pgtable.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/csky/include/asm/pgalloc.h b/arch/csky/include/asm/pgalloc.h index bbbd0698b397..7d57e5da0914 100644 --- a/arch/csky/include/asm/pgalloc.h +++ b/arch/csky/include/asm/pgalloc.h @@ -44,7 +44,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) pgd_t *ret; pgd_t *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((unsigned long *)ret); diff --git a/arch/csky/include/asm/pgtable.h b/arch/csky/include/asm/pgtable.h index f8bb1e12334b..0f1e2eda1601 100644 --- a/arch/csky/include/asm/pgtable.h +++ b/arch/csky/include/asm/pgtable.h @@ -18,9 +18,8 @@ /* * C-SKY is two-level paging structure: */ -#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_PMD 1 #define PTRS_PER_PTE (PAGE_SIZE / sizeof(pte_t))