loongson-community / discussions

Cross-community issue tracker & discussions / 跨社区工单追踪 & 讨论场所
9 stars 0 forks source link

[Linux] Minimally support probing CPUs with non-Loongson PRID #31

Open xen0n opened 9 months ago

xen0n commented 9 months ago

https://github.com/torvalds/linux/blob/5bd7ef53ffe5ca580e93e74eb8c81ed191ddc4bd/arch/loongarch/kernel/cpu-probe.c#L312-L316

This means any non-Loongson LoongArch design will not correctly probe, because they don't get a PRID with a company ID of Loongson.

According to the LoongArch spec, at least the CPUCFG data is standardized across all compliant LoongArch implementations, so we should be able to derive essential feature bits (such as the ELF platform -- bitness info) without first checking PRID.

xen0n commented 9 months ago

cc @chenhuacai -- I might do this early next year, targetting v6.8 or v6.9 depending on my free time.