Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp960165pxb; Tue, 3 Nov 2020 18:04:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJypL24uUJtOeqcBSfyXcxskey9QrPmQwSV0zgnHaysjJ5/V+TKn/laRzjr0gz6nb5xp3DsR X-Received: by 2002:a17:906:3650:: with SMTP id r16mr22473065ejb.419.1604455446200; Tue, 03 Nov 2020 18:04:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604455446; cv=none; d=google.com; s=arc-20160816; b=qU1rAvcWNkWCfRtMB0ltxrYI+SUrnC3TZXl1nRelgBXnm0YtMZ/fk/CnabnbOur7G2 7UYpXH6kbSu4OP8RiDXI+GiRHIwpU1NnWXrodP/hjwwQ3xpsrYD9IOvcIP0gR7JeDAdX jR3mzuaQoLTiCz7WRxJSCsUhuuCEdtBgbXgiAG27+OuBFEDB+XyT+QnAYVsWQYrVwwHc 81O7jE0Gr9FlIAlSfdqxwSIB3saRj2OJrnTi5yp7DpkszsyvycE7IrtMx1hTiTabOaFk V/lRBG0WE/KcIO7IhVCpf/X6pUCJfSWwtFA6GK7JcHBvpxAqqoD2cW5wuAtrk3RYe7Fa 3mNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=q7LFjEeJrDM+Fx+leScIeW6KxbYUSuFa1TzeyDsXSiA=; b=vwF9ogwoRVTR7XfAVZHRPAVuVfjySkAkFnqvwZvaTsQyFeLAsBZ5VfrrOfZWhymo4u Bs4QpejvekqlFGUvFkPUyhw2nBH2SGQ0ka2JEcMejGNyeImOWR+wGhprMsCQvTje7Ej8 jCCRDHkepLdRNqzN10DGvQjl1a0Q761SNW/TbnXexyUSx09bHfbeQnBFK+9TmN6fC2bR Xjwp0QR/vC604bNFxEoVYQSKHjYSy6uLR1wajK0AhFiBeKKOBh4PUn8gR6HO6VLZ19De mF/h7JOy52j0qzG5RXycoQoRFHIFwwpP6po2mXQ3Lo+SJZt6qYpt99ObTZyGdbs78EIF K9lw== 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 a10si322564edq.316.2020.11.03.18.03.43; Tue, 03 Nov 2020 18:04:06 -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 S1729742AbgKDCAY (ORCPT + 99 others); Tue, 3 Nov 2020 21:00:24 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:39434 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725765AbgKDCAY (ORCPT ); Tue, 3 Nov 2020 21:00:24 -0500 Received: by mail-io1-f65.google.com with SMTP id p7so20634616ioo.6; Tue, 03 Nov 2020 18:00:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q7LFjEeJrDM+Fx+leScIeW6KxbYUSuFa1TzeyDsXSiA=; b=YtVU1aqch+v9kSIpUxRVjsCVTLFGGpZ8gBcQ+k02JITJStbpI+jeRdIdxejVKtFp0H qrvSNli06QigfAOhLQJ/2ObK+LhHPTXIuZwlQv30eHb7kKU9njVwLx+MpHUOw2oKf0rS K9etz/N28ULhl3Cq0/7SON67t3B/672qILI5Gaf3Ys1yHzPe3ZxCM0zbtVGa3BAjLpsv GlhdeNBrlFlFay01s/nO7BVxq0S6MLUsCJSJ41u+dIyslt1Z17QMPxgTjfAkN/V6gYko 0GxhCXdQ0nSM9IOkoBwcFbpgrb1G8XHJpx9ixL5KFP3HtXGHY+u5vAaoXfitHnWlYTuJ kI9A== X-Gm-Message-State: AOAM531vNZDfWlL+tOj612UdeaY4h2s6/bi1GdPWrMDNKan5qcoa/9h8 qBcSGIYegPnlUvn7qX54ulJUX6qt2hxW84eQqW9Kee4D8Z0qKw== X-Received: by 2002:a6b:dc0f:: with SMTP id s15mr15979794ioc.180.1604455222049; Tue, 03 Nov 2020 18:00:22 -0800 (PST) MIME-Version: 1.0 References: <1604387525-23400-1-git-send-email-yangtiezhu@loongson.cn> <1604387525-23400-2-git-send-email-yangtiezhu@loongson.cn> In-Reply-To: <1604387525-23400-2-git-send-email-yangtiezhu@loongson.cn> From: Huacai Chen Date: Wed, 4 Nov 2020 10:00:10 +0800 Message-ID: Subject: Re: [PATCH v3 1/6] MIPS: Loongson64: Do not write the read only field LPA of CP0_CONFIG3 To: Tiezhu Yang Cc: Thomas Bogendoerfer , Jiaxun Yang , "open list:MIPS" , LKML , Xuefeng Li Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Tiezhu, On Tue, Nov 3, 2020 at 3:13 PM Tiezhu Yang wrote: > > 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 Sorry for the late response, I have the same worry as Jiaxun. As you know, Loongson's user manuals are not always correct, but the original code comes from Loongson are usually better. So, my opinion is "Don't change it if it doesn't break anything". Huacai > /* 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 >