Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp746298imk; Sun, 3 Jul 2022 07:55:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1visbyqFuvg173eggSeVb/mLeh2YHUHHoY0MSdfQlV80XtHtYQC82UnmfUqGFOkC1VU/Lj2 X-Received: by 2002:a17:906:5a46:b0:72a:9098:9a19 with SMTP id my6-20020a1709065a4600b0072a90989a19mr12127291ejc.638.1656860120392; Sun, 03 Jul 2022 07:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656860120; cv=none; d=google.com; s=arc-20160816; b=WKs3ooDZ2/4+fs3R4C+QEvNE3uxVpM22KzdeWhy+konV7NyMeiKG+ggESv0L+8CkCx MrJx7Ewg3gZORmyRT1HwO3KWo9PzkpAdISOewiNJdIfJvvG46pKAulxe3dMi8wSvvk+J FoHZSlNoLg/oSRyoZK5iyzd+87w/3EvIU4IAzhlbrA2KGOlleYJIfc2fp59QdKP08Zvg gCeDiDTqQWiW1S1Z8lYU9LBxbdxMx9+x3oE2/+6tPtmBBSXSQrwrZo/OV78Il8svkA/p PzPnUkTKN0+7VzI/NsjcGfHvqGgiA1NSyzqPZeep+jL0g5mUSzMs9goLzX/Mpe78sY7K Lx/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=y9qFlgGsRTenJh7dZ/UtcT8tw1ERtza/zu90SuTu6Gc=; b=0CSTnqYCn1M+LRA6lmj0XXpnDCi825G4HQZ5DPl9tFFi0LPlT+lWMBvEDYqeRRKz+k k/oHENANQKhiMdwcWqeGL5mfNh2f1td9objDjWN0P6llwACFphK7TQzz2XsTqr42QDdJ 3EuY5W8npiIg7m1YIS6xXG7H+hVIJEKezkKEWOHlUriF5Yw0R7H4SbgdOY2IjOwN82Mz 8PVg+GV4VjJIMq5BkEA5ovfkutfgdtia+qZPNtmfxEFpWNiyeIXRCOEyke4VOX8vrKgw cRPfgUr0IuxxRk5i0u76gPQK5TS7COua6CR1LWMBy1HvM6Ug2UH72f5UdGQhkvPWWOod Uk/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TJFDg9Bg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t17-20020a056402525100b004358125190csi18093366edd.627.2022.07.03.07.54.55; Sun, 03 Jul 2022 07:55:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TJFDg9Bg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232896AbiGCON1 (ORCPT + 99 others); Sun, 3 Jul 2022 10:13:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232723AbiGCONF (ORCPT ); Sun, 3 Jul 2022 10:13:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A1C360DE; Sun, 3 Jul 2022 07:13:02 -0700 (PDT) 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 3CE0960EAE; Sun, 3 Jul 2022 14:13:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 532C0C341CB; Sun, 3 Jul 2022 14:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656857581; bh=/GRO3PH1/o87mSyvNwgnC65awjhLFzdc6wqe5YuxHNo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TJFDg9Bgulgv5UqAd8swJwn0kDrs3Y3ocmaBsuM0mujV/oZeAthGWtZMn7kKUAQ80 SZ0MHLBIR9xIepLWav3peBr3s34BVb7UJdRO7mOGvuUTNhUVUggPAS7xJzvwcIL9tf SdZUYaAorua9UevqjSAm7SPv3Kcps/fPqkCG6Rql2QrThsgFKAmf8OI1WYxxr0J8hF lsDw76I+i8jyR0XHcDuxnrKDN/66uz4amgsNT061C29l4RY9Ju6IW2m/m744KzlSpZ 4ro4AkvEQT0RAkgYVfpyGhh7rvtGBg4VHYhw0quxUnIr59djXCx+Jys+aaFkHZp9Dz iE3YIX4ZRdtSQ== 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 07/14] nios2: drop definition of PTE_ORDER Date: Sun, 3 Jul 2022 17:11:56 +0300 Message-Id: <20220703141203.147893-8-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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Rapoport This is the order of the page table allocation, not the order of a PTE. Since its always hardwired to 0, simply drop it. Signed-off-by: Mike Rapoport --- arch/nios2/include/asm/pgtable.h | 3 +-- arch/nios2/mm/init.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/nios2/include/asm/pgtable.h b/arch/nios2/include/asm/pgtable.h index 262d0609268c..eaf8f28baa8b 100644 --- a/arch/nios2/include/asm/pgtable.h +++ b/arch/nios2/include/asm/pgtable.h @@ -69,10 +69,9 @@ struct mm_struct; #define PAGE_COPY MKP(0, 0, 1) #define PGD_ORDER 0 -#define PTE_ORDER 0 #define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t)) -#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) +#define PTRS_PER_PTE (PAGE_SIZE / sizeof(pte_t)) #define USER_PTRS_PER_PGD \ (CONFIG_NIOS2_KERNEL_MMU_REGION_BASE / PGDIR_SIZE) diff --git a/arch/nios2/mm/init.c b/arch/nios2/mm/init.c index 613fcaa5988a..2d6dbf7701f6 100644 --- a/arch/nios2/mm/init.c +++ b/arch/nios2/mm/init.c @@ -80,7 +80,7 @@ void __init mmu_init(void) #define __page_aligned(order) __aligned(PAGE_SIZE << (order)) pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER); -pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER); +pte_t invalid_pte_table[PTRS_PER_PTE] __aligned(PAGE_SIZE); static struct page *kuser_page[1]; static int alloc_kuser_page(void) -- 2.34.1