Re: [PATCH v6 2/4] EDAC/loongson: Encode node and MC info into mc_idx

From: Borislav Petkov

Date: Tue Nov 10 2026 - 03:09:46 EST


On Tue, Nov 10, 2026 at 03:47:20PM +0800, Qunqin Zhao wrote:
> "all your nodes belong to memory controller 0"
> I don't quite follow this sentence. There are four memory controllers on LS3C6000/S.
>
> On firmware without mc-idx there can still be more than one  memory controller

So edac_device_alloc_index() is used to give out indices for other EDAC
devices with edac_device_alloc_ctl_info() but I guess you could use that in
your driver until you don't need to add other devices besides MCs and then
it'll become a mess...

Lemme ask the simplest question first: is there any case where ACPI won't
provide that _DSD property or you're in control of the firmware - not like on
x86 - and this case we're trying to fix is never going to happen anyway...?

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette