linux/arch/s390/boot
Heiko Carstens 0dafe9968a s390: Use inline qualifier for all EX_TABLE and ALTERNATIVE inline assemblies
Use asm_inline for all inline assemblies which make use of the EX_TABLE or
ALTERNATIVE macros.

These macros expand to many lines and the compiler assumes the number of
lines within an inline assembly is the same as the number of instructions
within an inline assembly. This has an effect on inlining and loop
unrolling decisions.

In order to avoid incorrect assumptions use asm_inline, which tells the
compiler that an inline assembly has the smallest possible size.

In order to avoid confusion when asm_inline should be used or not, since a
couple of inline assemblies are quite large: the rule is to always use
asm_inline whenever the EX_TABLE or ALTERNATIVE macro is used. In specific
cases there may be reasons to not follow this guideline, but that should
be documented with the corresponding code.

Using the inline qualifier everywhere has only a small effect on the kernel
image size:

add/remove: 0/10 grow/shrink: 19/8 up/down: 1492/-1858 (-366)

The only location where this seems to matter is load_unaligned_zeropad()
from word-at-a-time.h where the compiler inlines more functions within the
dcache code, which is indeed code where performance matters.

Suggested-by: Juergen Christ <jchrist@linux.ibm.com>
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2025-03-18 17:13:51 +01:00
..
.gitignore s390/boot: Ignore vmlinux.map 2025-03-18 17:13:05 +01:00
Makefile s390/boot: Add exception table support 2025-03-04 17:25:22 +01:00
als.c s390/boot: Replace boot_printk() with loglevel-specific helpers 2025-01-26 17:24:00 +01:00
alternative.c s390/alternatives: Add debug functionality 2025-03-04 17:18:08 +01:00
boot.h s390/boot: Add exception table support 2025-03-04 17:25:22 +01:00
clz_ctz.c s390/boot: get rid of startup archive 2022-05-06 20:45:14 +02:00
cmdline.c
ctype.c
decompressor.c s390/boot: Improve decompression error reporting 2025-01-26 17:24:03 +01:00
decompressor.h s390/boot: Rework deployment of the kernel image 2024-04-17 13:38:02 +02:00
ebcdic.c
head.S s390/boot: Add exception table support 2025-03-04 17:25:22 +01:00
head_kdump.S s390: consistently use .balign instead of .align 2023-06-28 13:57:09 +02:00
install.sh kbuild: Abort make on install failures 2024-07-20 13:34:54 +09:00
ipl_data.c s390/boot: convert parmarea to C 2022-05-06 20:45:15 +02:00
ipl_parm.c s390: Use inline qualifier for all EX_TABLE and ALTERNATIVE inline assemblies 2025-03-18 17:13:51 +01:00
ipl_report.c s390/ipl_report: Remove unused 'size' variable 2025-01-26 17:24:04 +01:00
ipl_vmparm.c
kaslr.c s390/boot: Replace boot_printk() with loglevel-specific helpers 2025-01-26 17:24:00 +01:00
kmsan.c s390/boot: add the KMSAN runtime stub 2024-07-03 19:30:24 -07:00
machine_kexec_reloc.c
mem.S
pgm_check.c s390/boot: Add exception table support 2025-03-04 17:25:22 +01:00
physmem_info.c s390: Use inline qualifier for all EX_TABLE and ALTERNATIVE inline assemblies 2025-03-18 17:13:51 +01:00
printk.c s390/time: Convert MACHINE_HAS_SCC to machine_has_scc() 2025-03-04 17:18:06 +01:00
sclp_early_core.c s390/boot: move sclp early buffer from fixed address in asm to C 2021-07-27 09:39:15 +02:00
startup.c s390: Use inline qualifier for all EX_TABLE and ALTERNATIVE inline assemblies 2025-03-18 17:13:51 +01:00
string.c s390/string: add KMSAN support 2024-07-03 19:30:25 -07:00
uv.c s390/uv: Retrieve UV secrets sysfs support 2024-10-29 11:17:17 +01:00
uv.h s390: Remove protvirt and kvm config guards for uv code 2024-07-23 16:02:33 +02:00
version.c kbuild: build init/built-in.a just once 2022-09-29 04:40:15 +09:00
vmem.c s390/lowcore: Convert relocated lowcore alternative to machine feature 2025-03-04 17:18:05 +01:00
vmlinux.lds.S s390/boot: Add exception table support 2025-03-04 17:25:22 +01:00