From: Mark Rutland <mark.rutland@arm.com>
To: Marc Zyngier <maz@kernel.org>
Cc: Mark Brown <broonie@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Peter Collingbourne <pcc@google.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] arm64/sme: Move storage of reg_smidr to __cpuinfo_store_cpu()
Date: Mon, 16 Dec 2024 15:11:46 +0000 [thread overview]
Message-ID: <Z2BDMpPYRFfio8lr@J2N7QTR9R3.cambridge.arm.com> (raw)
In-Reply-To: <864j33sn60.wl-maz@kernel.org>
On Mon, Dec 16, 2024 at 02:44:07PM +0000, Marc Zyngier wrote:
> On Mon, 16 Dec 2024 14:31:47 +0000,
> Mark Rutland <mark.rutland@arm.com> wrote:
> >
> > On Mon, Dec 16, 2024 at 01:23:55PM +0000, Mark Brown wrote:
> > > 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.
> >
> > FWIW, I had a quick go (with only the SME case), and I think the shape
> > that we want is roughly as below, which I think is easy to generalise to
> > those other cases.
> >
> > MarcZ, thoughts?
> >
> > Mark.
[... dodgy patch was here ...]
> I don't think blindly applying the override at this stage is a good
> thing. Specially not the whole register, and definitely not
> non-disabling values.
>
> It needs to be done on a per feature basis, and only to disable
> things.
>
> See the hack I posted for the things I think need checking.
Understood; sorry for the noise -- we raced when replying and I only
spotted your reply after sending this. I think I'm more in favour of the
revert option now; I've repled with more details at:
https://lore.kernel.org/linux-arm-kernel/Z2BCI61c9QWG7mMB@J2N7QTR9R3.cambridge.arm.com/T/#m8d6ace8d6201591ca72d51cf14c4a605e7d98a88
Mark.
next prev parent reply other threads:[~2024-12-16 15:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-14 0:52 [PATCH] arm64/sme: Move storage of reg_smidr to __cpuinfo_store_cpu() Mark Brown
2024-12-14 10:56 ` Marc Zyngier
2024-12-16 12:17 ` Mark Brown
2024-12-16 12:44 ` Mark Rutland
2024-12-16 13:23 ` Mark Brown
2024-12-16 14:31 ` Mark Rutland
2024-12-16 14:44 ` Marc Zyngier
2024-12-16 15:11 ` Mark Rutland [this message]
2024-12-16 12:38 ` Mark Rutland
2024-12-16 14:31 ` Marc Zyngier
2024-12-16 15:05 ` Mark Brown
2024-12-16 15:07 ` Mark Rutland
2024-12-16 15:21 ` Mark Brown
2024-12-16 15:28 ` Marc Zyngier
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=Z2BDMpPYRFfio8lr@J2N7QTR9R3.cambridge.arm.com \
--to=mark.rutland@arm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=pcc@google.com \
--cc=stable@vger.kernel.org \
--cc=will@kernel.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