Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp306095pxb; Mon, 2 Nov 2020 23:15:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwp9nYXyjm9tme8UnOruJnmRLLdBwmatGbMV8NvMF2UGh0KEKIVTzE0soi6V4lgjm6AsvPt X-Received: by 2002:a05:6402:3056:: with SMTP id bu22mr20057451edb.252.1604387719146; Mon, 02 Nov 2020 23:15:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604387719; cv=none; d=google.com; s=arc-20160816; b=iuQ/qzSkQiY0ZLGmrEgKG1pvjqras9GNUUk/Ea7Y2bdLDLJq4MwuLXl9df7JOaq+6z PBhZskYnF5VZj+nG9PGfKaxbeLVQsaK8+oVWGMAenjzaOhiDxJipc8V7mUzFoI/Yfnok Qe4tcK67ohmZcZiPVly7gQhq7d+bq9F1PLDqNg74PfipYtKCEcBHt5nY5NUjnxOP0f6c 4dNiKtG0jJiuSONFV3ooi+ZdC7zwcPvb8vyj53557pk7oX1UHxT31tFrQ17+CgZMT9M4 FtHJdiwLDJEcX+FcVfk5bAHu4Y2j41m9BdTigxVZHBWHtzGgYHPRYQ2JP85tSHcHelBD czZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=EapDubahX8Gzib9Eg6CZXLnSuDMh/hWncj4hhcOJIzs=; b=dMads++kw4oxyvs+WmjjAAZKQhBHAlEXBZpQ69czw4I8WpWu9cKwk2EhNb+pt5eqx3 lQXaJfaYzkE/R2uVtfB9z/0g9cSPWjKZbn8LQmdJ3CagiAEl1OQvbAhK6UzBqKsNOGo1 nlB0KWfdDRK+sgHWNxWeHCLdIwBDN8rYrq/Q9ocn16MVnO4FthQKYOJ998ZrojUSUyyv x8mKy9i/LnOmqI31d5FpPVxGCHf3VG4lPuBWPu98bUvKz6IX+yaJcWQgmBd52eIv62dV QssRkSkQkS7ua0zBgUHJRk1o354Kika0VO612kTMnub8cyPfkSK8tCzNZjSbFA9oSuB8 SsXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si11328798edy.599.2020.11.02.23.14.56; Mon, 02 Nov 2020 23:15:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727965AbgKCHMR (ORCPT + 99 others); Tue, 3 Nov 2020 02:12:17 -0500 Received: from mail.loongson.cn ([114.242.206.163]:37244 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727527AbgKCHMO (ORCPT ); Tue, 3 Nov 2020 02:12:14 -0500 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dx79PGAqFfIKEEAA--.12977S4; Tue, 03 Nov 2020 15:12:07 +0800 (CST) From: Tiezhu Yang To: Thomas Bogendoerfer , Huacai Chen , Jiaxun Yang Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li Subject: [PATCH v3 2/6] MIPS: Loongson64: Set the field ELPA of CP0_PAGEGRAIN only once Date: Tue, 3 Nov 2020 15:12:01 +0800 Message-Id: <1604387525-23400-3-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1604387525-23400-1-git-send-email-yangtiezhu@loongson.cn> References: <1604387525-23400-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANS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z2 80aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI 43ZEXa7sRRRwZ7UUUUU== X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The field ELPA of CP0_PAGEGRAIN register is set at the beginning of the kernel entry point in kernel-entry-init.h, no need to set it again in numa.c, we can remove enable_lpa() and only print the related information. Signed-off-by: Tiezhu Yang --- v2: No changes v3: No changes arch/mips/loongson64/numa.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/arch/mips/loongson64/numa.c b/arch/mips/loongson64/numa.c index c7e3cced..509b360 100644 --- a/arch/mips/loongson64/numa.c +++ b/arch/mips/loongson64/numa.c @@ -35,20 +35,6 @@ EXPORT_SYMBOL(__node_data); cpumask_t __node_cpumask[MAX_NUMNODES]; EXPORT_SYMBOL(__node_cpumask); -static void enable_lpa(void) -{ - unsigned long value; - - value = __read_32bit_c0_register($16, 3); - pr_info("CP0_Config3: CP0 16.3 (0x%lx)\n", value); - - value = __read_32bit_c0_register($5, 1); - value |= 0x20000000; - __write_32bit_c0_register($5, 1, value); - value = __read_32bit_c0_register($5, 1); - pr_info("CP0_PageGrain: CP0 5.1 (0x%lx)\n", value); -} - static void cpu_node_probe(void) { int i; @@ -240,7 +226,8 @@ EXPORT_SYMBOL(pcibus_to_node); void __init prom_init_numa_memory(void) { - enable_lpa(); + pr_info("CP0_Config3: CP0 16.3 (0x%x)\n", read_c0_config3()); + pr_info("CP0_PageGrain: CP0 5.1 (0x%x)\n", read_c0_pagegrain()); prom_meminit(); } EXPORT_SYMBOL(prom_init_numa_memory); -- 2.1.0