[PATCHv2] arm64: initialize per-cpu offsets earlier

Will Deacon will at kernel.org
Mon Oct 5 14:08:58 EDT 2020


On Mon, 5 Oct 2020 17:43:03 +0100, Mark Rutland wrote:
> The current initialization of the per-cpu offset register is difficult
> to follow and this initialization is not always early enough for
> upcoming instrumentation with KCSAN, where the instrumentation callbacks
> use the per-cpu offset.
> 
> To make it possible to support KCSAN, and to simplify reasoning about
> early bringup code, let's initialize the per-cpu offset earlier, before
> we run any C code that may consume it. To do so, this patch adds a new
> init_this_cpu_offset() helper that's called before the usual
> primary/secondary start functions. For consistency, this is also used to
> re-initialize the per-cpu offset after the runtime per-cpu areas have
> been allocated (which can change CPU0's offset).
> 
> [...]

Applied to arm64 (for-next/late-arrivals), thanks!

[1/1] arm64: initialize per-cpu offsets earlier
      https://git.kernel.org/arm64/c/353e228eb355

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev



More information about the linux-arm-kernel mailing list