--- zzzz-none-000/linux-4.4.271/arch/arm64/include/asm/assembler.h 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/arch/arm64/include/asm/assembler.h 2023-04-19 10:22:27.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.