mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jiaxun Yang" <jiaxun.yang@flygoat.com>
To: "Huacai Chen" <chenhuacai@kernel.org>
Cc: "Xuerui Wang" <kernel@xen0n.name>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Viresh Kumar" <viresh.kumar@linaro.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	kvm@vger.kernel.org
Subject: Re: [PATCH 3/5] LoongArch: cpu-probe: Move IOCSR probing out of cpu_probe_common
Date: Sun, 08 Sep 2024 11:00:48 +0100	[thread overview]
Message-ID: <5d32c242-2854-4687-876a-312bf24e6aeb@app.fastmail.com> (raw)
In-Reply-To: <CAAhV-H5xejfimHedCpLfh2CRheHJmAXpvcmWpLacyrg5m4EPJA@mail.gmail.com>



在2024年9月8日九月 上午3:47,Huacai Chen写道:
> Hi, Jiaxun,
>
> On Sat, Sep 7, 2024 at 6:17 PM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
>>
>> IOCSR register definition appears to be a platform specific
>> spec instead of architecture spec, even for Loongson CPUs
>> there is no guarantee that IOCSR will always present.
>>
>> Thus it's dangerous to perform IOCSR probing without checking
>> CPU type and instruction availability.
> I don't think this is necessary. Loongson's Chip engineers confirm
> that IOCSR is always present in Loongson processors. If other
> LoongArch (not Loongson) processors have no IOCSR, they should
> implement their own cpu_probe_abc() instead of cpu_probe_loongson().

Hi Huacai,

IOCSR_FEATURE probing process is now in cpu_probe_common, which is shared
among all PRIDs, that's why it needs to be moved out.

It also prepares for different IOCSR definitions, as you said before IOCSR
definitions are not guaranteed to be compatible, so if an incompatible
implementation arise, you can just introduce a new CPU_TYPE for it and
create a new iocsr_probe function.

Thanks
- Jiaxun

>
> Huacai
>
>>
>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>


-- 
- Jiaxun

  reply	other threads:[~2024-09-08 10:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-07 10:17 [PATCH 0/5] LoongArch, MIPS: Unify Loongson IOCSR handling Jiaxun Yang
2024-09-07 10:17 ` [PATCH 1/5] LoongArch: Rename cpu_has_csr as cpu_has_iocsr Jiaxun Yang
2024-09-08  2:38   ` Huacai Chen
2024-09-07 10:17 ` [PATCH 2/5] LoongArch: Probe more CPU features from CPUCFG Jiaxun Yang
2024-09-08  2:40   ` Huacai Chen
2024-09-07 10:17 ` [PATCH 3/5] LoongArch: cpu-probe: Move IOCSR probing out of cpu_probe_common Jiaxun Yang
2024-09-08  2:47   ` Huacai Chen
2024-09-08 10:00     ` Jiaxun Yang [this message]
2024-09-07 10:17 ` [PATCH 4/5] LoongArch: Extract IOCSR definitions to standalone header Jiaxun Yang
2024-09-08 16:56   ` kernel test robot
2024-09-07 10:17 ` [PATCH 5/5] MIPS: Loongson64: Use shared IOCSR header Jiaxun Yang
2024-09-07 10:25 ` [PATCH 0/5] LoongArch, MIPS: Unify Loongson IOCSR handling Huacai Chen
2024-09-07 10:30   ` Jiaxun Yang

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=5d32c242-2854-4687-876a-312bf24e6aeb@app.fastmail.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=chenhuacai@kernel.org \
    --cc=kernel@xen0n.name \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    --cc=viresh.kumar@linaro.org \
    /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®