From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: Huang Pei <huangpei@loongson.cn>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
ambrosehua@gmail.com
Cc: Bibo Mao <maobibo@loongson.cn>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mips@vger.kernel.org, linux-arch@vger.kernel.org,
linux-mm@kvack.org, Paul Burton <paulburton@kernel.org>,
Li Xuefeng <lixuefeng@loongson.cn>,
Yang Tiezhu <yangtiezhu@loongson.cn>,
Gao Juxin <gaojuxin@loongson.cn>,
Fuxin Zhang <zhangfx@lemote.com>, Huacai Chen <chenhc@lemote.com>
Subject: Re: [PATCH] MIPS: loongson64: use 0b011 instead of 0b101 as xphys cached
Date: Sat, 20 Feb 2021 13:32:21 +0800 [thread overview]
Message-ID: <a3b02ec6-ed82-22b6-df95-d8a74dd8bc7d@flygoat.com> (raw)
In-Reply-To: <20210220033155.3856-1-huangpei@loongson.cn>
在 2021/2/20 上午11:31, Huang Pei 写道:
> Loongson 3 use *0b011* as Cachable(not 0b101), this only affect
> loongson64 without enough CP0 Kscratch for holding current pgd.
> 3A2000+ use CP0 PWbase holding current (user) pgd
>
> Signed-off-by: Huang Pei <huangpei@loongson.cn>
> ---
> arch/mips/mm/tlbex.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
> index a7521b8f7658..51effa5dbf9d 100644
> --- a/arch/mips/mm/tlbex.c
> +++ b/arch/mips/mm/tlbex.c
> @@ -848,8 +848,15 @@ void build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
> /* Clear lower 23 bits of context. */
> uasm_i_dins(p, ptr, 0, 0, 23);
>
> +#ifdef CONFIG_CPU_LOONGSON64
> + /* 1 0 0 1 1 << 6 xkphys cached */
> + /* 0x98xx xxxx xxxx xxxx */
> + uasm_i_ori(p, ptr, ptr, 0x4c0);
Hi Pei,
What about (CAC_BASE >> 53) instead of magic number?
Also there is another similar usage at build_fast_tlb_refill_handler, please
fix it as well.
Thanks.
- Jiaxun
> +#else
> /* 1 0 1 0 1 << 6 xkphys cached */
> + /* 0xa8xx xxxx xxxx xxxx */
> uasm_i_ori(p, ptr, ptr, 0x540);
> +#endif
> uasm_i_drotr(p, ptr, ptr, 11);
> #elif defined(CONFIG_SMP)
> UASM_i_CPUID_MFC0(p, ptr, SMP_CPUID_REG);
parent reply other threads:[~2021-02-20 5:32 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20210220033155.3856-1-huangpei@loongson.cn>]
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=a3b02ec6-ed82-22b6-df95-d8a74dd8bc7d@flygoat.com \
--to=jiaxun.yang@flygoat.com \
--cc=akpm@linux-foundation.org \
--cc=ambrosehua@gmail.com \
--cc=chenhc@lemote.com \
--cc=gaojuxin@loongson.cn \
--cc=huangpei@loongson.cn \
--cc=linux-arch@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lixuefeng@loongson.cn \
--cc=maobibo@loongson.cn \
--cc=paulburton@kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=yangtiezhu@loongson.cn \
--cc=zhangfx@lemote.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