[PATCH 4/7] arm64: add 'runtime constant' support
Mark Rutland
mark.rutland at arm.com
Tue Jun 11 13:22:27 PDT 2024
On Tue, Jun 11, 2024 at 11:59:21AM -0700, Linus Torvalds wrote:
> On Tue, 11 Jun 2024 at 10:59, Linus Torvalds
> <torvalds at linux-foundation.org> wrote:
> >
> > So I'll look at doing this for x86 and see how it works.
>
> Oh - and when I started looking at it, I immediately remembered why I
> didn't want to use alternatives originally.
>
> The alternatives are finalized much too early for this. By the time
> the dcache code works, the alternatives have already been applied.
>
> I guess all the arm64 alternative callbacks are basically finalized
> very early, basically when the CPU models etc have been setup.
On arm64 we have early ("boot") and late ("system-wide") alternatives.
We apply the system-wide alternatives in apply_alternatives_all(), a few
callees deep under smp_cpus_done(), after secondary CPUs are brought up,
since that has to handle mismatched features in big.LITTLE systems.
I had assumed that we could use late/system-wide alternatives here, since
those get applied after vfs_caches_init_early(), but maybe that's too
late?
> We could do a "late alternatives", I guess, but now it's even more
> infrastructure just for the constants.
Fair enough; thanks for taking a look.
Mark.
More information about the linux-arm-kernel
mailing list