Uros Bizjak 59bec00ace x86/percpu: Introduce %rip-relative addressing to PER_CPU_VAR()
Introduce x86_64 %rip-relative addressing to the PER_CPU_VAR() macro.
Instructions using %rip-relative address operand are one byte shorter
than their absolute address counterparts and are also compatible with
position independent executable (-fpie) builds. The patch reduces
code size of a test kernel build by 150 bytes.

The PER_CPU_VAR() macro is intended to be applied to a symbol and should
not be used with register operands. Introduce the new __percpu macro and
use it in cmpxchg{8,16}b_emu.S instead.

Also add a missing function comment to this_cpu_cmpxchg8b_emu().

No functional changes intended.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: Brian Gerst <brgerst@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Sean Christopherson <seanjc@google.com>
2023-10-20 12:19:51 +02:00
..
2023-08-28 17:05:58 -07:00
2023-08-28 16:35:01 -07:00
2023-09-04 11:26:29 -07:00
2023-08-31 12:20:12 -07:00
2023-08-30 20:23:07 -07:00
2023-04-08 13:45:37 -07:00
2023-08-26 22:40:37 +02:00
2023-05-15 20:03:08 +02:00
2023-07-24 15:44:47 +02:00