--- zzzz-none-000/linux-4.4.271/arch/arm64/include/asm/assembler.h 2021-06-03 06:22:09.000000000 +0000 +++ dakota-7530ac-750/linux-4.4.271/arch/arm64/include/asm/assembler.h 2023-01-11 09:25:41.000000000 +0000 @@ -212,6 +212,18 @@ #endif .endm + /* + * @dst: Result of READ_ONCE(per_cpu(sym, smp_processor_id())) + * @sym: The name of the per-cpu variable + * @tmp: scratch register + */ + .macro ldr_this_cpu dst, sym, tmp + adr_l \dst, \sym + mrs \tmp, tpidr_el1 + ldr \dst, [\dst, \tmp] + .endm + + /* * Annotate a function as position independent, i.e., safe to be called before * the kernel virtual mapping is activated.