|
@@ -193,6 +193,17 @@ lr .req x30 // link register
|
|
|
str \src, [\tmp, :lo12:\sym]
|
|
|
.endm
|
|
|
|
|
|
+ /*
|
|
|
+ * @sym: The name of the per-cpu variable
|
|
|
+ * @reg: Result of per_cpu(sym, smp_processor_id())
|
|
|
+ * @tmp: scratch register
|
|
|
+ */
|
|
|
+ .macro this_cpu_ptr, sym, reg, tmp
|
|
|
+ adr_l \reg, \sym
|
|
|
+ mrs \tmp, tpidr_el1
|
|
|
+ add \reg, \reg, \tmp
|
|
|
+ .endm
|
|
|
+
|
|
|
/*
|
|
|
* Annotate a function as position independent, i.e., safe to be called before
|
|
|
* the kernel virtual mapping is activated.
|