Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp306839pxb; Mon, 2 Nov 2020 23:16:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8PEeJV1DJ/p07wfurhXcSwwp6N3vqTsmkd6AUyQr+YnVsK2Lv2y142SuT/Q/k3MssCttb X-Received: by 2002:a50:bb25:: with SMTP id y34mr19781285ede.249.1604387819707; Mon, 02 Nov 2020 23:16:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604387819; cv=none; d=google.com; s=arc-20160816; b=SlEgd5FZgYfOOZ0TBpm8jBpKJuPJLkgqOSiJ22klq10WZXly6snD3B9YJ8/Y7UAL2z eR23MxFBVJqe6zRq9UHRwZP6HagLVMVBjtAFt4yZjwN0PGuriiadXIi/101XEsI16Y6C Nck/G3wTLh4GqkssOH9QWgsanqHxO3O7P0sUCmoFO5gq3RYWEvNRXJpNGpVr+sYoaPRE W3MXt76f8THqDKcBH2xSqKcAX9+kvYfp6KQm98SEdcS4fY2AnxG9Rvvo3J4FtEddTdmj z1W3gMv57magk6jdTYyCEZhfmL53Gjbj2eQkrp4JwE13LaXNuqyWNhe9/KsXcVbNHQhO U9Fw== 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=Dk+mUGYdBUBpRza/tiFrh7StW2nV2d5iYwsDB95mvxY=; b=lgJtFex8m0C57B44IozzFFzR8yCWJAdtzphWMvVQoekZjodY9Fb/ViXBV/lpRKM6Nv e9nFj2dLu0tft/eo9CELRdl3FbveMHkpMuaZGEzYk+u6oMnKGFy1UeFHs9QEQeD+nnyK AzLAoe7/HigSN1OtXU0d83inwNv19rA8/pQKs6hpW8A7X98pzEjuBeNRDE9DMMNzIHmi qSiKNxZC7jKC6d3l/86EuN1d9EQBq7YGUFnkigSUxuS77yemydBQNhSN2gapCs8OVXDP N4yiQUihMfb/l4HgbH14d3v61UCSNQh7kPCGzauAzyt0eLWeJ8c9Rhgov2fQPMEI+i3y ontw== 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 gs24si6040389ejb.74.2020.11.02.23.16.37; Mon, 02 Nov 2020 23:16:59 -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 S1728007AbgKCHMe (ORCPT + 99 others); Tue, 3 Nov 2020 02:12:34 -0500 Received: from mail.loongson.cn ([114.242.206.163]:37242 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725988AbgKCHMN (ORCPT ); Tue, 3 Nov 2020 02:12:13 -0500 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dx79PGAqFfIKEEAA--.12977S3; Tue, 03 Nov 2020 15:12:06 +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 1/6] MIPS: Loongson64: Do not write the read only field LPA of CP0_CONFIG3 Date: Tue, 3 Nov 2020 15:12:00 +0800 Message-Id: <1604387525-23400-2-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-TRANSID: AQAAf9Dx79PG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r0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI 43ZEXa7VUjo5l5UUUUU== X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The field LPA of CP0_CONFIG3 register is read only for Loongson64, so the write operations are meaningless, remove them. Signed-off-by: Tiezhu Yang --- v2: No changes v3: No changes arch/mips/include/asm/mach-loongson64/kernel-entry-init.h | 8 -------- arch/mips/loongson64/numa.c | 3 --- 2 files changed, 11 deletions(-) diff --git a/arch/mips/include/asm/mach-loongson64/kernel-entry-init.h b/arch/mips/include/asm/mach-loongson64/kernel-entry-init.h index 87a5bfb..e4d77f4 100644 --- a/arch/mips/include/asm/mach-loongson64/kernel-entry-init.h +++ b/arch/mips/include/asm/mach-loongson64/kernel-entry-init.h @@ -19,10 +19,6 @@ .macro kernel_entry_setup .set push .set mips64 - /* Set LPA on LOONGSON3 config3 */ - mfc0 t0, CP0_CONFIG3 - or t0, (0x1 << 7) - mtc0 t0, CP0_CONFIG3 /* Set ELPA on LOONGSON3 pagegrain */ mfc0 t0, CP0_PAGEGRAIN or t0, (0x1 << 29) @@ -54,10 +50,6 @@ .macro smp_slave_setup .set push .set mips64 - /* Set LPA on LOONGSON3 config3 */ - mfc0 t0, CP0_CONFIG3 - or t0, (0x1 << 7) - mtc0 t0, CP0_CONFIG3 /* Set ELPA on LOONGSON3 pagegrain */ mfc0 t0, CP0_PAGEGRAIN or t0, (0x1 << 29) diff --git a/arch/mips/loongson64/numa.c b/arch/mips/loongson64/numa.c index cf9459f..c7e3cced 100644 --- a/arch/mips/loongson64/numa.c +++ b/arch/mips/loongson64/numa.c @@ -40,9 +40,6 @@ static void enable_lpa(void) unsigned long value; value = __read_32bit_c0_register($16, 3); - value |= 0x00000080; - __write_32bit_c0_register($16, 3, 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); -- 2.1.0