概述
主要介绍4.14内核的assembler.h的汇编函数。
ldr_this_cpu dst,sym,tmp
249 /*
250 * @dst: Result of READ_ONCE(per_cpu(sym, smp_processor_id()))
251 * @sym: The name of the per-cpu variable
252 * @tmp: scratch register
253 */
254 .macro ldr_this_cpu dst, sym, tmp
255 adr_l \dst, \sym
256 mrs \tmp, tpidr_el1
257 ldr \dst, [\dst, \tmp]
258 .endm
功能:
主要根据percpu变量sym,找打对应cpu上的sym变量的地址,并且把tpidr_erl1的值保存到tmp中。