[PATCH] arm64/sme: Move storage of reg_smidr to __cpuinfo_store_cpu()

Mark Brown broonie at kernel.org
Mon Dec 16 05:23:55 PST 2024


On Mon, Dec 16, 2024 at 12:44:14PM +0000, Mark Rutland wrote:

> ... didn't matter either way, and using '&boot_cpu_data' was intended to
> make it clear that the features were based on the boot CPU's info, even
> if you just grepped for that and didn't see the surrounding context.

Right, that was my best guess as to what was supposed to be going on
but it wasn't super clear.  The code could use some more comments.

> I think the real fix here is to move the reading back into
> __cpuinfo_store_cpu(), but to have an explicit check that SME has been
> disabled on the commandline, with a comment explaining that this is a
> bodge for broken FW which traps the SME ID regs.

That should be doable.

There's a few other similar ID registers (eg, we already read GMID_EL1
and MPAMIDR_EL1) make me a bit nervous that we might need to generalise
it a bit, but we can deal with that if it comes up.  Even for SME the
disable was added speculatively, the factors that made this come up for
SVE are less likely to be an issue with SME.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20241216/8184d0cc/attachment.sig>


More information about the linux-arm-kernel mailing list