diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-16 21:19:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-16 21:19:19 -0500 |
commit | 5674124f9f16f196533abb383193bd232c9afc2f (patch) | |
tree | 275af51d6f7749dc72e1530fcace7c770cdbdd46 /scripts | |
parent | 5d48421be3c8a9f753d61b826ecb3ad287d867c0 (diff) | |
parent | 72142fd4109105c6bd21658966ca5e93c1684081 (diff) |
Merge branch 'x86-syscall-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'x86-syscall-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86: Move <asm/asm-offsets.h> from trace_syscalls.c to asm/syscall.h
x86, um: Fix typo in 32-bit system call modifications
um: Use $(srctree) not $(KBUILD_SRC)
x86, um: Mark system call tables readonly
x86, um: Use the same style generated syscall tables as native
um: Generate headers before generating user-offsets.s
um: Run host archheaders, allow use of host generated headers
kbuild, headers.sh: Don't make archheaders explicitly
x86, syscall: Allow syscall offset to be symbolic
x86, syscall: Re-fix typo in comment
x86: Simplify syscallhdr.sh
x86: Generate system call tables and unistd_*.h from tables
checksyscalls: Use arch/x86/syscalls/syscall_32.tbl as source
x86: Machine-readable syscall tables and scripts to process them
trace: Include <asm/asm-offsets.h> in trace_syscalls.c
x86-64, ia32: Move compat_ni_syscall into C and its own file
x86-64, syscall: Adjust comment spacing and remove typo
kbuild: Add support for an "archheaders" target
kbuild: Add support for installing generated asm headers
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.headersinst | 10 | ||||
-rwxr-xr-x | scripts/checksyscalls.sh | 15 |
2 files changed, 18 insertions, 7 deletions
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index a57f5bd5a13d..d3bae5e7b601 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst | |||
@@ -4,12 +4,16 @@ | |||
4 | # header-y - list files to be installed. They are preprocessed | 4 | # header-y - list files to be installed. They are preprocessed |
5 | # to remove __KERNEL__ section of the file | 5 | # to remove __KERNEL__ section of the file |
6 | # objhdr-y - Same as header-y but for generated files | 6 | # objhdr-y - Same as header-y but for generated files |
7 | # genhdr-y - Same as objhdr-y but in a generated/ directory | ||
7 | # | 8 | # |
8 | # ========================================================================== | 9 | # ========================================================================== |
9 | 10 | ||
10 | # called may set destination dir (when installing to asm/) | 11 | # called may set destination dir (when installing to asm/) |
11 | _dst := $(if $(dst),$(dst),$(obj)) | 12 | _dst := $(if $(dst),$(dst),$(obj)) |
12 | 13 | ||
14 | # generated header directory | ||
15 | gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj))) | ||
16 | |||
13 | kbuild-file := $(srctree)/$(obj)/Kbuild | 17 | kbuild-file := $(srctree)/$(obj)/Kbuild |
14 | include $(kbuild-file) | 18 | include $(kbuild-file) |
15 | 19 | ||
@@ -33,9 +37,10 @@ wrapper-files := $(filter $(header-y), $(generic-y)) | |||
33 | 37 | ||
34 | # all headers files for this dir | 38 | # all headers files for this dir |
35 | header-y := $(filter-out $(generic-y), $(header-y)) | 39 | header-y := $(filter-out $(generic-y), $(header-y)) |
36 | all-files := $(header-y) $(objhdr-y) $(wrapper-files) | 40 | all-files := $(header-y) $(objhdr-y) $(genhdr-y) $(wrapper-files) |
37 | input-files := $(addprefix $(srctree)/$(obj)/,$(header-y)) \ | 41 | input-files := $(addprefix $(srctree)/$(obj)/,$(header-y)) \ |
38 | $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) | 42 | $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) \ |
43 | $(addprefix $(objtree)/$(gen)/,$(genhdr-y)) | ||
39 | output-files := $(addprefix $(install)/, $(all-files)) | 44 | output-files := $(addprefix $(install)/, $(all-files)) |
40 | 45 | ||
41 | # Work out what needs to be removed | 46 | # Work out what needs to be removed |
@@ -52,6 +57,7 @@ quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ | |||
52 | cmd_install = \ | 57 | cmd_install = \ |
53 | $(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \ | 58 | $(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \ |
54 | $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \ | 59 | $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \ |
60 | $(PERL) $< $(objtree)/$(gen) $(install) $(SRCARCH) $(genhdr-y); \ | ||
55 | for F in $(wrapper-files); do \ | 61 | for F in $(wrapper-files); do \ |
56 | echo "\#include <asm-generic/$$F>" > $(install)/$$F; \ | 62 | echo "\#include <asm-generic/$$F>" > $(install)/$$F; \ |
57 | done; \ | 63 | done; \ |
diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh index 3ab316e52313..d24810fc6af6 100755 --- a/scripts/checksyscalls.sh +++ b/scripts/checksyscalls.sh | |||
@@ -198,11 +198,16 @@ EOF | |||
198 | } | 198 | } |
199 | 199 | ||
200 | syscall_list() { | 200 | syscall_list() { |
201 | sed -n -e '/^\#define/ s/[^_]*__NR_\([^[:space:]]*\).*/\ | 201 | grep '^[0-9]' "$1" | sort -n | ( |
202 | \#if !defined \(__NR_\1\) \&\& !defined \(__IGNORE_\1\)\ | 202 | while read nr abi name entry ; do |
203 | \#warning syscall \1 not implemented\ | 203 | echo <<EOF |
204 | \#endif/p' $1 | 204 | #if !defined(__NR_${name}) && !defined(__IGNORE_${name}) |
205 | #warning syscall ${name} not implemented | ||
206 | #endif | ||
207 | EOF | ||
208 | done | ||
209 | ) | ||
205 | } | 210 | } |
206 | 211 | ||
207 | (ignore_list && syscall_list $(dirname $0)/../arch/x86/include/asm/unistd_32.h) | \ | 212 | (ignore_list && syscall_list $(dirname $0)/../arch/x86/syscalls/syscall_32.tbl) | \ |
208 | $* -E -x c - > /dev/null | 213 | $* -E -x c - > /dev/null |