From patchwork Tue Jul 5 15:46:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 12906740 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 D9F7EC43334 for ; Tue, 5 Jul 2022 15:47:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7873B6B0074; Tue, 5 Jul 2022 11:47:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7369F6B0075; Tue, 5 Jul 2022 11:47:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 64D636B0078; Tue, 5 Jul 2022 11:47:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 593BF6B0074 for ; Tue, 5 Jul 2022 11:47:40 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 3279B1208CD for ; Tue, 5 Jul 2022 15:47:40 +0000 (UTC) X-FDA: 79653476280.23.1C67749 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf02.hostedemail.com (Postfix) with ESMTP id A82DA8000D for ; Tue, 5 Jul 2022 15:47: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 52EFCB8181C; Tue, 5 Jul 2022 15:47:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77D15C341CB; Tue, 5 Jul 2022 15:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657036057; bh=yII5UNWZKGsbdktmuyJMDCcQNmFGi0PKtAPWkTX44+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qaLjiQFhyHDfW36wq/6nru8GfWGyEzg5fUbs6v3lYDItFli5Crx68fyYHWaAvFRBO ScGG3r5m7DMl3AOG0GlxFiJbuso46mLCVQnEaQ4IpuS3yMEufTX2OIU097bun08x3k 0cyw59FyQOczQqoaaGYSN9BdFYCUfNN6/2gKjlALGUQiR0811lIjNWtHy5IDY9Lg+m HjW4DHtYSoaNDb15Ojv7TeVeKbJqfPzFyPa2HL5upxQQ5RhTxASWA4S50LzQ4mtDpm 3kFTtVBy6FnCijV6aL4WJ8bGa9252Wo24hPE0wWTjkIDSOZuvLwE3tKfHL/MoMq0Vc 676sVFBmG4zOQ== 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 02/15] csky: drop definition of PGD_ORDER Date: Tue, 5 Jul 2022 18:46:55 +0300 Message-Id: <20220705154708.181258-3-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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657036059; a=rsa-sha256; cv=none; b=5XLNIWzvhIleVw3O1oegbzxQBETMNwQbFiIZAUEiuiFhVeDvCrV3dQ6ibiw3HcSNMG31LF E6dPhcMmwVYJWaJ5iCQQDQg9Fkln/+vIAVopqS8jEbS1cESZDihAdC5Lb1UXH6PTHpKwGg ZN2o99oJZhftA33nGhJqW+YZvzB39L0= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=qaLjiQFh; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf02.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=1657036059; 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=Of9rj7WbSyFyriRLhmJHiG7y5C5ewBKiwPpNWLSN/Cs=; b=fPMx9fDelwQ9+hUbubxu6/Ee3PCVjwuXdZuxVhVSuFhQ039qEpi3UD5t7thzI49bMXZJkw a+ib3wPAQVc//3FC7w4eS/Bvtfke/1qOn1IC1D2WQs9JXfI2onMkoCNLuSqfGcWBiTyOMO MHw6/sXf2O3FOKT62kILqPgedmSl/mE= X-Rspam-User: X-Rspamd-Server: rspam07 Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=qaLjiQFh; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf02.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org X-Stat-Signature: ofek33ep37bpddzkjk8u8zenb3zy9p3g X-Rspamd-Queue-Id: A82DA8000D X-HE-Tag: 1657036059-324924 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 Acked-by: Guo Ren --- 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))