mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhou Yanjie <zhouyanjie@wanyeetech.com>
To: Paul Cercueil <paul@crapouillou.net>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Zhou Yanjie <zhouyanjie@zoho.com>,
	od@zcrc.me, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] MIPS: Ingenic: Disable HPTLB for D0 XBurst CPUs too
Date: Mon, 14 Dec 2020 03:12:23 +0800	[thread overview]
Message-ID: <b5c0677a-fb8c-f5e8-b0f5-5bcaab00d921@wanyeetech.com> (raw)
In-Reply-To: <20201212000354.291665-1-paul@crapouillou.net>

Hi Paul,

On 2020/12/12 上午8:03, Paul Cercueil wrote:
> The JZ4760 has the HPTLB as well, but has a XBurst CPU with a D0 CPUID.
>
> Disable the HPTLB for all XBurst CPUs with a D0 CPUID. In the case where
> there is no HPTLB (e.g. for older SoCs), this won't have any side
> effect.
>
> Fixes: b02efeb05699 ("MIPS: Ingenic: Disable abandoned HPTLB function.")
> Cc: <stable@vger.kernel.org> # 5.4
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>   arch/mips/kernel/cpu-probe.c | 15 ++++++++-------
>   1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
> index e6853697a056..31cb9199197c 100644
> --- a/arch/mips/kernel/cpu-probe.c
> +++ b/arch/mips/kernel/cpu-probe.c
> @@ -1830,16 +1830,17 @@ static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu)
>   		 */
>   		case PRID_COMP_INGENIC_D0:
>   			c->isa_level &= ~MIPS_CPU_ISA_M32R2;
> -			break;
> +			fallthrough;
>   
>   		/*
>   		 * The config0 register in the XBurst CPUs with a processor ID of
> -		 * PRID_COMP_INGENIC_D1 has an abandoned huge page tlb mode, this
> -		 * mode is not compatible with the MIPS standard, it will cause
> -		 * tlbmiss and into an infinite loop (line 21 in the tlb-funcs.S)
> -		 * when starting the init process. After chip reset, the default
> -		 * is HPTLB mode, Write 0xa9000000 to cp0 register 5 sel 4 to


I just noticed that I mistakenly wrote a capital 'W' in the original 
version.

with that fixed:

Reviewed-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>


BTW: Are you planning to add support for JZ4760 recently? I am currently 
writing the CGU driver for JZ4775 and X2000. If you plan to add support 
for JZ4760, I can also write the CGU driver for JZ4760 by the way.


Thanks and best regards!


> -		 * switch back to VTLB mode to prevent getting stuck.
> +		 * PRID_COMP_INGENIC_D0 or PRID_COMP_INGENIC_D1 has an abandoned
> +		 * huge page tlb mode, this mode is not compatible with the MIPS
> +		 * standard, it will cause tlbmiss and into an infinite loop
> +		 * (line 21 in the tlb-funcs.S) when starting the init process.
> +		 * After chip reset, the default is HPTLB mode, Write 0xa9000000
> +		 * to cp0 register 5 sel 4 to switch back to VTLB mode to prevent
> +		 * getting stuck.
>   		 */
>   		case PRID_COMP_INGENIC_D1:
>   			write_c0_page_ctrl(XBURST_PAGECTRL_HPTLB_DIS);

  reply	other threads:[~2020-12-13 19:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-12  0:03 Paul Cercueil
2020-12-13 19:12 ` Zhou Yanjie [this message]
2020-12-13 19:57   ` Paul Cercueil
2020-12-14 15:54     ` Zhou Yanjie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b5c0677a-fb8c-f5e8-b0f5-5bcaab00d921@wanyeetech.com \
    --to=zhouyanjie@wanyeetech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=od@zcrc.me \
    --cc=paul@crapouillou.net \
    --cc=stable@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=zhouyanjie@zoho.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®