aboutsummaryrefslogtreecommitdiff
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2021-09-10 12:59:10 -0700
committerBorislav Petkov <bp@suse.de>2021-09-13 19:48:21 +0200
commit0507503671f9b1c867e889cbec0f43abf904f23c (patch)
treedc450d3175376738a808e4e62505b34e3d6f3cc1 /lib/dynamic_debug.c
parentf87bc8dc7a7c438c70f97b4e51c76a183313272e (diff)
x86/asm: Avoid adding register pressure for the init case in static_cpu_has()
gcc will sometimes manifest the address of boot_cpu_data in a register as part of constant propagation. When multiple static_cpu_has() are used this may foul the mainline code with a register load which will only be used on the fallback path, which is unused after initialization. Explicitly force gcc to use immediate (rip-relative) addressing for the fallback path, thus removing any possible register use from static_cpu_has(). While making changes, modernize the code to use .pushsection...popsection instead of .section...previous. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20210910195910.2542662-4-hpa@zytor.com
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions