On Tue, Oct 15, 2019 at 12:30:15PM +0200, Ard Biesheuvel wrote: > On Tue, 15 Oct 2019 at 12:25, Dave Martin <dave.mar...@arm.com> wrote: > > > > On Mon, Oct 14, 2019 at 06:57:30PM +0200, Ard Biesheuvel wrote:
[...] > > > All in-kernel NEON code checks whether the NEON is usable, so I'd > > > expect that check to return 'false' if it is too early in the boot for > > > the NEON to be used at all. > > > > My concern is that the check may be done once, at probe time, for crypto > > drivers. If probing happens before system_supports_fpsimd() has > > stabilised, we may be stuck with the wrong probe decision. > > > > So: are crypto drivers and kernel_mode_neon() users definitely only > > probed _after_ all early CPUs are up? > > > > Isn't SMP already up when initcalls are processed? That was my original assumption when developing SVE. I think I convinced myself that it was valid, but it sounds worth reinvestigating. Assuming the assumption _is_ valid, then dropping a suitable WARN() into system_supports_fpsimd() or cpu_has_neon() or similar may be a good idea. Cheers ---Dave