Re: [PATCH 3/5] LoongArch: cpu-probe: Move IOCSR probing out of cpu_probe_common

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




在2024年9月8日九月 上午3:47,Huacai Chen写道:
> Hi, Jiaxun,
>
> On Sat, Sep 7, 2024 at 6:17 PM Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx> 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@xxxxxxxxxxx>


-- 
- Jiaxun





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux