Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp211493pxb; Mon, 2 Nov 2020 19:18:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyuAsXScVStsfNZERw7OeoSpJ2fC6d0lL6e/cg4P/GvUgrvFQ7WB5eT8v+rPiiLVyBKZhgR X-Received: by 2002:a17:906:43c6:: with SMTP id j6mr18075176ejn.547.1604373515253; Mon, 02 Nov 2020 19:18:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604373515; cv=none; d=google.com; s=arc-20160816; b=uQggwc60VS2vUDr0rglmJzv0yvg0TZTUXx0PJj9mWnbR2FAsHQA50gxbyfslwRjdnH qlMgqElM0ChurNwfUy3duffxhyZWoyP53IQ79hjf6He1ooDlwi81by21AakxxsdlzcVh +Ug1HiNvIVOyIn5/XAd0JlLRZJfVrDTc20694lVaR2zXEob9eFrbInyc1hUPwgWUWsVq pCqCgTBeMB2tmf9f6VzP/fF7C/68/BMSr98gchIZt+tUJ2R1X5izluI73wJNUrw61e1v 6q4zOyTv/jeQ85EJDdkIgRuogAvU9iOaSVkuCOZFgg8YkLYk4yFd2hWDe7K0WjfrTh76 QZOQ== 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=1r6jqC2DYBELY/jJFt+MJ86pvxer+l6Tt9naKERP/eA=; b=gSSIL+t8D1Dz7UT+i+kmMgPOkg3z49dQae7GGUHv5oWE0MaCzugtNnhLZ2NyUwxaMT 3BwbqBN5EuxQqQn9QzvkUqQyg7eFlXwJwR90aID0v3R335PNSgMoX9qRt/Y48NNdQK7V A1QPGQJ+5qF298JXp9wQce8WGNgoZBGhq9ZUGsS+tE+TenUgy9durzf9tgenrSICIbXa KRLh7mIWaRW8nK+70inP8WFm5rDCSztrSwnFIPCHvxngzGd5u2aZiKCr4Xi050i8/XjG L6EIEdBfFqROVk7k9WpIK2NfBVYngrPNhVGL7nQHjsz5v8a0MgRvN1eO2zHcz6dJ9XzL d5tg== 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 oi22si13674725ejb.466.2020.11.02.19.18.12; Mon, 02 Nov 2020 19:18:35 -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 S1726042AbgKCDPN (ORCPT + 99 others); Mon, 2 Nov 2020 22:15:13 -0500 Received: from mail.loongson.cn ([114.242.206.163]:47018 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725958AbgKCDPM (ORCPT ); Mon, 2 Nov 2020 22:15:12 -0500 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dx7387y6BfU3sEAA--.3657S4; Tue, 03 Nov 2020 11:15:08 +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 v2 2/6] MIPS: Loongson64: Set the field ELPA of CP0_PAGEGRAIN only once Date: Tue, 3 Nov 2020 11:15:02 +0800 Message-Id: <1604373306-3599-3-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1604373306-3599-1-git-send-email-yangtiezhu@loongson.cn> References: <1604373306-3599-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9Dx7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wI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0pRijjkUUUUU= 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 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