Message ID | 20170814174259.GA25890@leverpostej (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h index 4775af5..50c5592 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h @@ -230,13 +230,18 @@ .endm /* - * @dst: Result of per_cpu(sym, smp_processor_id()) + * @dst: Result of per_cpu(sym, smp_processor_id()), can be SP for + * non-module code * @sym: The name of the per-cpu variable * @tmp: scratch register */ .macro adr_this_cpu, dst, sym, tmp +#ifndef MODULE adrp \tmp, \sym add \dst, \tmp, #:lo12:\sym +#else + adr_l \tmp, \sym +#endif mrs \tmp, tpidr_el1 add \dst, \dst, \tmp .endm