Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp270494pxx; Thu, 29 Oct 2020 02:06:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpVFalD4+aWbUh3IppEkjEZAA4WP9AZrd7p6XyiFM5dTtPdZlOqitatE/P5qn59hX+DQKW X-Received: by 2002:a17:906:8142:: with SMTP id z2mr2987325ejw.30.1603962370174; Thu, 29 Oct 2020 02:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603962370; cv=none; d=google.com; s=arc-20160816; b=1CUeswXLtDwgXTQb3KPTvJahRnWbGm+4IneOAryRiu83E9Cx/MLzZvtw6AZovhp0oK rkg4NSYZl8UBJAEx+zxUl9ryvmkglHB8ztqMvVitNdpkudqIx1fOqM2KUEPScxz9V+CO 1KzQheLciLvA5bchAerKwk8MxeJ0wsLayaOiS43msUoNZLcHQuasqNlGyle52jyZxFLi paGUp5baq4Jz7AYm+QY+Per37rgRazBBd4fHhXv2MnrSxe4NxiAWmEiIWSRnU4nwcupL V2pL8Fq5en8nEDWDSmu4lw81POLsakSpTxhaFzR6agX789Qt7o3LncGloGD+NLSpLwQt yVFQ== 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=0h2ulQlNfPGiQtlA5fCjxC8bQbn3XHk645QQcY4AHA4=; b=ErOW4WT3F5W4nV4e8VazxllqrFQf/obcgdh8zsURANfAXvjxNSCmZ2V2FnEsKqVDSD n9bLYX17a+oTgltLlZoSbpQ1j7ABi6wXn1IblZVkBrOhWQM18ByrV63mOR5xUSoZ7Vb+ A+AATZJ9LiVcy7oTdVQCcZfavPKnE2OeW1MECTeLAvfJJwy4AhR+69bpOWsEtZsS4YSk TRGsKkij6cCqp3P203AuBkuXzRf6L4uT+x+6eJ9veMOUKVY7WgTKsFVK7q4RQR9d8UjZ xUgKAkbqwSy08jdC29j8HHJkd7YArn4MUGs11nN83U8EUydlE/KUYi03UxmWoCJR5QNb 0f2A== 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 x8si1492342edq.532.2020.10.29.02.05.47; Thu, 29 Oct 2020 02:06:10 -0700 (PDT) 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 S1727986AbgJ2IFE (ORCPT + 99 others); Thu, 29 Oct 2020 04:05:04 -0400 Received: from mail.loongson.cn ([114.242.206.163]:58386 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726449AbgJ2ID2 (ORCPT ); Thu, 29 Oct 2020 04:03:28 -0400 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dx_9JJd5pfmHcCAA--.10240S3; Thu, 29 Oct 2020 16:03:22 +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 1/6] MIPS: Loongson64: Do not write the read only field LPA of CP0_CONFIG3 Date: Thu, 29 Oct 2020 16:02:56 +0800 Message-Id: <1603958581-4723-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1603958581-4723-1-git-send-email-yangtiezhu@loongson.cn> References: <1603958581-4723-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9Dx_9JJd5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I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfU00PSUUUUU 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 --- 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