Skip to content

Commit 3cba325

Browse files
masahir0yKAGA-KOKO
authored andcommitted
x86/syscalls: Switch to generic syscallhdr.sh
Many architectures duplicate similar shell scripts. Converts x86 to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20210517073815.97426-7-masahiroy@kernel.org
1 parent 49f731f commit 3cba325

2 files changed

Lines changed: 13 additions & 48 deletions

File tree

arch/x86/entry/syscalls/Makefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,40 @@ _dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)') \
99
syscall32 := $(src)/syscall_32.tbl
1010
syscall64 := $(src)/syscall_64.tbl
1111

12-
syshdr := $(srctree)/$(src)/syscallhdr.sh
12+
syshdr := $(srctree)/scripts/syscallhdr.sh
1313
systbl := $(srctree)/scripts/syscalltbl.sh
1414

1515
quiet_cmd_syshdr = SYSHDR $@
16-
cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \
17-
'$(syshdr_abi_$(basetarget))' \
18-
'$(syshdr_pfx_$(basetarget))' \
19-
'$(syshdr_offset_$(basetarget))'
16+
cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --abis $(abis) --emit-nr \
17+
$(if $(offset),--offset $(offset)) \
18+
$(if $(prefix),--prefix $(prefix)) \
19+
$< $@
2020
quiet_cmd_systbl = SYSTBL $@
2121
cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis $(abis) $< $@
2222

2323
quiet_cmd_hypercalls = HYPERCALLS $@
2424
cmd_hypercalls = $(CONFIG_SHELL) '$<' $@ $(filter-out $<, $(real-prereqs))
2525

26-
syshdr_abi_unistd_32 := i386
26+
$(uapi)/unistd_32.h: abis := i386
2727
$(uapi)/unistd_32.h: $(syscall32) $(syshdr) FORCE
2828
$(call if_changed,syshdr)
2929

30-
syshdr_abi_unistd_32_ia32 := i386
31-
syshdr_pfx_unistd_32_ia32 := ia32_
30+
$(out)/unistd_32_ia32.h: abis := i386
31+
$(out)/unistd_32_ia32.h: prefix := ia32_
3232
$(out)/unistd_32_ia32.h: $(syscall32) $(syshdr) FORCE
3333
$(call if_changed,syshdr)
3434

35-
syshdr_abi_unistd_x32 := common,x32
36-
syshdr_offset_unistd_x32 := __X32_SYSCALL_BIT
35+
$(uapi)/unistd_x32.h: abis := common,x32
36+
$(uapi)/unistd_x32.h: offset := __X32_SYSCALL_BIT
3737
$(uapi)/unistd_x32.h: $(syscall64) $(syshdr) FORCE
3838
$(call if_changed,syshdr)
3939

40-
syshdr_abi_unistd_64 := common,64
40+
$(uapi)/unistd_64.h: abis := common,64
4141
$(uapi)/unistd_64.h: $(syscall64) $(syshdr) FORCE
4242
$(call if_changed,syshdr)
4343

44-
syshdr_abi_unistd_64_x32 := x32
45-
syshdr_pfx_unistd_64_x32 := x32_
44+
$(out)/unistd_64_x32.h: abis := x32
45+
$(out)/unistd_64_x32.h: prefix := x32_
4646
$(out)/unistd_64_x32.h: $(syscall64) $(syshdr) FORCE
4747
$(call if_changed,syshdr)
4848

arch/x86/entry/syscalls/syscallhdr.sh

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)