diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-18 21:34:07 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-18 21:34:07 -0400 |
commit | 2879a927bb7a3cf91ae3906a5e59215f9c17dd75 (patch) | |
tree | 870bdd1bd530a3d5d2abd10539700446b2878188 /scripts | |
parent | 7e7b43892b87b6be259479ef4de14029dcb4012f (diff) | |
parent | 20211e4d344729f4d4c93da37a590fc1c3a1fd9b (diff) |
Merge branch 'x86/oprofile' into oprofile
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.fwinst | 4 | ||||
-rw-r--r-- | scripts/Makefile.headersinst | 230 | ||||
-rwxr-xr-x | scripts/diffconfig | 129 | ||||
-rw-r--r-- | scripts/genksyms/genksyms.c | 2 | ||||
-rw-r--r-- | scripts/genksyms/lex.c_shipped | 133 | ||||
-rw-r--r-- | scripts/genksyms/lex.l | 2 | ||||
-rw-r--r-- | scripts/genksyms/parse.c_shipped | 144 | ||||
-rw-r--r-- | scripts/genksyms/parse.y | 2 | ||||
-rwxr-xr-x | scripts/hdrcheck.sh | 10 | ||||
-rwxr-xr-x | scripts/headers.sh | 41 | ||||
-rw-r--r-- | scripts/headers_check.pl | 56 | ||||
-rw-r--r-- | scripts/headers_install.pl | 45 | ||||
-rw-r--r-- | scripts/kconfig/conf.c | 159 | ||||
-rw-r--r-- | scripts/kconfig/confdata.c | 78 | ||||
-rw-r--r-- | scripts/kconfig/lex.zconf.c_shipped | 86 | ||||
-rw-r--r-- | scripts/kconfig/lkc.h | 9 | ||||
-rw-r--r-- | scripts/kconfig/zconf.l | 1 | ||||
-rwxr-xr-x | scripts/kernel-doc | 3 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 2 | ||||
-rwxr-xr-x | scripts/patch-kernel | 3 | ||||
-rwxr-xr-x | scripts/setlocalversion | 4 | ||||
-rwxr-xr-x | scripts/ver_linux | 1 |
22 files changed, 735 insertions, 409 deletions
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst index f63a663de158..6bf8e87f1dcf 100644 --- a/scripts/Makefile.fwinst +++ b/scripts/Makefile.fwinst | |||
@@ -50,8 +50,12 @@ PHONY += __fw_install __fw_modinst FORCE | |||
50 | .PHONY: $(PHONY) | 50 | .PHONY: $(PHONY) |
51 | 51 | ||
52 | __fw_install: $(installed-fw) | 52 | __fw_install: $(installed-fw) |
53 | |||
53 | __fw_modinst: $(installed-mod-fw) | 54 | __fw_modinst: $(installed-mod-fw) |
55 | @: | ||
56 | |||
54 | __fw_modbuild: $(addprefix $(obj)/,$(mod-fw)) | 57 | __fw_modbuild: $(addprefix $(obj)/,$(mod-fw)) |
58 | @: | ||
55 | 59 | ||
56 | FORCE: | 60 | FORCE: |
57 | 61 | ||
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index 53dae3eb3d1f..612dc13ddd85 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst | |||
@@ -1,194 +1,98 @@ | |||
1 | # ========================================================================== | 1 | # ========================================================================== |
2 | # Installing headers | 2 | # Installing headers |
3 | # | 3 | # |
4 | # header-y files will be installed verbatim | 4 | # header-y - list files to be installed. They are preprocessed |
5 | # unifdef-y are the files where unifdef will be run before installing files | 5 | # to remove __KERNEL__ section of the file |
6 | # objhdr-y are generated files that will be installed verbatim | 6 | # unifdef-y - Same as header-y. Obsolete |
7 | # objhdr-y - Same as header-y but for generated files | ||
7 | # | 8 | # |
8 | # ========================================================================== | 9 | # ========================================================================== |
9 | 10 | ||
10 | UNIFDEF := scripts/unifdef -U__KERNEL__ | 11 | # called may set destination dir (when installing to asm/) |
11 | |||
12 | # Eliminate the contents of (and inclusions of) compiler.h | ||
13 | HDRSED := sed -e "s/ inline / __inline__ /g" \ | ||
14 | -e "s/[[:space:]]__user[[:space:]]\{1,\}/ /g" \ | ||
15 | -e "s/(__user[[:space:]]\{1,\}/ (/g" \ | ||
16 | -e "s/[[:space:]]__force[[:space:]]\{1,\}/ /g" \ | ||
17 | -e "s/(__force[[:space:]]\{1,\}/ (/g" \ | ||
18 | -e "s/[[:space:]]__iomem[[:space:]]\{1,\}/ /g" \ | ||
19 | -e "s/(__iomem[[:space:]]\{1,\}/ (/g" \ | ||
20 | -e "s/[[:space:]]__attribute_const__[[:space:]]\{1,\}/\ /g" \ | ||
21 | -e "s/[[:space:]]__attribute_const__$$//" \ | ||
22 | -e "/^\#include <linux\/compiler.h>/d" | ||
23 | |||
24 | _dst := $(if $(dst),$(dst),$(obj)) | 12 | _dst := $(if $(dst),$(dst),$(obj)) |
25 | 13 | ||
26 | ifeq (,$(patsubst include/asm/%,,$(obj)/)) | 14 | kbuild-file := $(srctree)/$(obj)/Kbuild |
27 | # For producing the generated stuff in include/asm for biarch builds, include | 15 | include $(kbuild-file) |
28 | # both sets of Kbuild files; we'll generate anything which is mentioned in | ||
29 | # _either_ arch, and recurse into subdirectories which are mentioned in either | ||
30 | # arch. Since some directories may exist in one but not the other, we must | ||
31 | # use $(wildcard...). | ||
32 | GENASM := 1 | ||
33 | archasm := $(subst include/asm,asm-$(ARCH),$(obj)) | ||
34 | altarchasm := $(subst include/asm,asm-$(ALTARCH),$(obj)) | ||
35 | KBUILDFILES := $(wildcard $(srctree)/include/$(archasm)/Kbuild $(srctree)/include/$(altarchasm)/Kbuild) | ||
36 | else | ||
37 | KBUILDFILES := $(srctree)/$(obj)/Kbuild | ||
38 | endif | ||
39 | 16 | ||
40 | include $(KBUILDFILES) | 17 | include scripts/Kbuild.include |
41 | 18 | ||
42 | include scripts/Kbuild.include | 19 | install := $(INSTALL_HDR_PATH)/$(_dst) |
43 | 20 | ||
44 | # If this is include/asm-$(ARCH) and there's no $(ALTARCH), then | 21 | header-y := $(sort $(header-y) $(unifdef-y)) |
45 | # override $(_dst) so that we install to include/asm directly. | 22 | subdirs := $(patsubst %/,%,$(filter %/, $(header-y))) |
46 | # Unless $(BIASMDIR) is set, in which case we're probably doing | 23 | header-y := $(filter-out %/, $(header-y)) |
47 | # a 'headers_install_all' build and we should keep the -$(ARCH) | ||
48 | # in the directory name. | ||
49 | ifeq ($(obj)$(ALTARCH),include/asm-$(ARCH)$(BIASMDIR)) | ||
50 | _dst := include/asm | ||
51 | endif | ||
52 | 24 | ||
53 | header-y := $(sort $(header-y)) | 25 | # files used to track state of install/check |
54 | unifdef-y := $(sort $(unifdef-y)) | 26 | install-file := $(install)/.install |
55 | subdir-y := $(patsubst %/,%,$(filter %/, $(header-y))) | 27 | check-file := $(install)/.check |
56 | header-y := $(filter-out %/, $(header-y)) | ||
57 | header-y := $(filter-out $(unifdef-y),$(header-y)) | ||
58 | 28 | ||
59 | # stamp files for header checks | 29 | # all headers files for this dir |
60 | check-y := $(patsubst %,.check.%,$(header-y) $(unifdef-y) $(objhdr-y)) | 30 | all-files := $(header-y) $(objhdr-y) |
31 | input-files := $(addprefix $(srctree)/$(obj)/,$(header-y)) \ | ||
32 | $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) | ||
33 | output-files := $(addprefix $(install)/, $(all-files)) | ||
61 | 34 | ||
62 | # Work out what needs to be removed | 35 | # Work out what needs to be removed |
63 | oldheaders := $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$(wildcard $(INSTALL_HDR_PATH)/$(_dst)/*.h)) | 36 | oldheaders := $(patsubst $(install)/%,%,$(wildcard $(install)/*.h)) |
64 | unwanted := $(filter-out $(header-y) $(unifdef-y) $(objhdr-y),$(oldheaders)) | 37 | unwanted := $(filter-out $(all-files),$(oldheaders)) |
65 | 38 | ||
66 | oldcheckstamps := $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$(wildcard $(INSTALL_HDR_PATH)/$(_dst)/.check.*.h)) | 39 | # Prefix unwanted with full paths to $(INSTALL_HDR_PATH) |
67 | unwanted += $(filter-out $(check-y),$(oldcheckstamps)) | 40 | unwanted-file := $(addprefix $(install)/, $(unwanted)) |
68 | 41 | ||
69 | # Prefix them all with full paths to $(INSTALL_HDR_PATH) | 42 | printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@)) |
70 | header-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(header-y)) | ||
71 | unifdef-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(unifdef-y)) | ||
72 | objhdr-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(objhdr-y)) | ||
73 | check-y := $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(check-y)) | ||
74 | 43 | ||
44 | quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ | ||
45 | file$(if $(word 2, $(all-files)),s)) | ||
46 | cmd_install = \ | ||
47 | $(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \ | ||
48 | $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \ | ||
49 | touch $@ | ||
75 | 50 | ||
76 | ifdef ALTARCH | 51 | quiet_cmd_remove = REMOVE $(unwanted) |
77 | ifeq ($(obj),include/asm-$(ARCH)) | 52 | cmd_remove = rm -f $(unwanted-file) |
78 | altarch-y := altarch-dir | ||
79 | endif | ||
80 | endif | ||
81 | 53 | ||
82 | # Make the definitions visible for recursive make invocations | 54 | quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files) |
83 | export ALTARCH | 55 | cmd_check = $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH) \ |
84 | export ARCHDEF | 56 | $(addprefix $(install)/, $(all-files)); \ |
85 | export ALTARCHDEF | 57 | touch $@ |
86 | |||
87 | quiet_cmd_o_hdr_install = INSTALL $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) | ||
88 | cmd_o_hdr_install = cp $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,$(objtree)/$(obj)/%,$@) \ | ||
89 | $(INSTALL_HDR_PATH)/$(_dst) | ||
90 | |||
91 | quiet_cmd_headers_install = INSTALL $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) | ||
92 | cmd_headers_install = $(HDRSED) $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,$(srctree)/$(obj)/%,$@) \ | ||
93 | > $@ | ||
94 | |||
95 | quiet_cmd_unifdef = UNIFDEF $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) | ||
96 | cmd_unifdef = $(UNIFDEF) $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,$(srctree)/$(obj)/%,$@) \ | ||
97 | | $(HDRSED) > $@ || : | ||
98 | |||
99 | quiet_cmd_check = CHECK $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/.check.%,$(_dst)/%,$@) | ||
100 | cmd_check = $(CONFIG_SHELL) $(srctree)/scripts/hdrcheck.sh \ | ||
101 | $(INSTALL_HDR_PATH)/include $(subst /.check.,/,$@) $@ | ||
102 | |||
103 | quiet_cmd_remove = REMOVE $(_dst)/$@ | ||
104 | cmd_remove = rm -f $(INSTALL_HDR_PATH)/$(_dst)/$@ | ||
105 | |||
106 | quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) | ||
107 | cmd_mkdir = mkdir -p $@ | ||
108 | |||
109 | quiet_cmd_gen = GEN $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) | ||
110 | cmd_gen = \ | ||
111 | FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@); \ | ||
112 | STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z.- A-Z__`; \ | ||
113 | (echo "/* File autogenerated by 'make headers_install' */" ; \ | ||
114 | echo "\#ifndef $$STUBDEF" ; \ | ||
115 | echo "\#define $$STUBDEF" ; \ | ||
116 | echo "\# if $(ARCHDEF)" ; \ | ||
117 | if [ -r $(subst /$(_dst)/,/include/$(archasm)/,$@) ]; then \ | ||
118 | echo "\# include <$(archasm)/$$FNAME>" ; \ | ||
119 | else \ | ||
120 | echo "\# error $(archasm)/$$FNAME does not exist in" \ | ||
121 | "the $(ARCH) architecture" ; \ | ||
122 | fi ; \ | ||
123 | echo "\# elif $(ALTARCHDEF)" ; \ | ||
124 | if [ -r $(subst /$(_dst)/,/include/$(altarchasm)/,$@) ]; then \ | ||
125 | echo "\# include <$(altarchasm)/$$FNAME>" ; \ | ||
126 | else \ | ||
127 | echo "\# error $(altarchasm)/$$FNAME does not exist in" \ | ||
128 | "the $(ALTARCH) architecture" ; \ | ||
129 | fi ; \ | ||
130 | echo "\# else" ; \ | ||
131 | echo "\# warning This machine appears to be" \ | ||
132 | "neither $(ARCH) nor $(ALTARCH)." ; \ | ||
133 | echo "\# endif" ; \ | ||
134 | echo "\#endif /* $$STUBDEF */" ; \ | ||
135 | ) > $@ | ||
136 | |||
137 | .PHONY: __headersinst __headerscheck | ||
138 | |||
139 | ifdef HDRCHECK | ||
140 | __headerscheck: $(subdir-y) $(check-y) | ||
141 | @true | ||
142 | |||
143 | $(check-y) : $(INSTALL_HDR_PATH)/$(_dst)/.check.%.h : $(INSTALL_HDR_PATH)/$(_dst)/%.h | ||
144 | $(call cmd,check) | ||
145 | |||
146 | # Other dependencies for $(check-y) | ||
147 | include /dev/null $(wildcard $(check-y)) | ||
148 | |||
149 | # ... but leave $(check-y) as .PHONY for now until those deps are actually correct. | ||
150 | .PHONY: $(check-y) | ||
151 | 58 | ||
152 | else | 59 | PHONY += __headersinst __headerscheck |
153 | # Rules for installing headers | ||
154 | __headersinst: $(subdir-y) $(header-y) $(unifdef-y) $(altarch-y) $(objhdr-y) | ||
155 | @true | ||
156 | 60 | ||
157 | $(objhdr-y) $(subdir-y) $(header-y) $(unifdef-y): | $(INSTALL_HDR_PATH)/$(_dst) $(unwanted) | 61 | ifndef HDRCHECK |
158 | 62 | # Rules for installing headers | |
159 | $(INSTALL_HDR_PATH)/$(_dst): | 63 | __headersinst: $(subdirs) $(install-file) |
160 | $(call cmd,mkdir) | 64 | @: |
161 | |||
162 | .PHONY: $(unwanted) | ||
163 | $(unwanted): | ||
164 | $(call cmd,remove) | ||
165 | 65 | ||
166 | ifdef GENASM | 66 | targets += $(install-file) |
167 | $(objhdr-y) $(header-y) $(unifdef-y): $(KBUILDFILES) | 67 | $(install-file): scripts/headers_install.pl $(input-files) FORCE |
168 | $(call cmd,gen) | 68 | $(if $(unwanted),$(call cmd,remove),) |
69 | $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@))) | ||
70 | $(call if_changed,install) | ||
169 | 71 | ||
170 | else | 72 | else |
171 | $(objhdr-y) : $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(objtree)/$(obj)/%.h $(KBUILDFILES) | 73 | __headerscheck: $(subdirs) $(check-file) |
172 | $(call cmd,o_hdr_install) | 74 | @: |
173 | 75 | ||
174 | $(header-y) : $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES) | 76 | targets += $(check-file) |
175 | $(call cmd,headers_install) | 77 | $(check-file): scripts/headers_check.pl $(output-files) FORCE |
78 | $(call if_changed,check) | ||
176 | 79 | ||
177 | $(unifdef-y) : $(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES) | ||
178 | $(call cmd,unifdef) | ||
179 | endif | ||
180 | endif | 80 | endif |
181 | 81 | ||
182 | hdrinst := -rR -f $(srctree)/scripts/Makefile.headersinst obj | 82 | # Recursion |
83 | hdr-inst := -rR -f $(srctree)/scripts/Makefile.headersinst obj | ||
84 | .PHONY: $(subdirs) | ||
85 | $(subdirs): | ||
86 | $(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(_dst)/$@ | ||
183 | 87 | ||
184 | .PHONY: altarch-dir | 88 | targets := $(wildcard $(sort $(targets))) |
185 | # All the files in the normal arch dir must be created first, since we test | 89 | cmd_files := $(wildcard \ |
186 | # for their existence. | 90 | $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) |
187 | altarch-dir: $(subdir-y) $(header-y) $(unifdef-y) $(objhdr-y) | ||
188 | $(Q)$(MAKE) $(hdrinst)=include/asm-$(ALTARCH) dst=include/asm-$(ALTARCH) | ||
189 | $(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm$(BIASMDIR) | ||
190 | 91 | ||
191 | # Recursion | 92 | ifneq ($(cmd_files),) |
192 | .PHONY: $(subdir-y) | 93 | include $(cmd_files) |
193 | $(subdir-y): | 94 | endif |
194 | $(Q)$(MAKE) $(hdrinst)=$(obj)/$@ dst=$(_dst)/$@ rel=../$(rel) | 95 | |
96 | .PHONY: $(PHONY) | ||
97 | PHONY += FORCE | ||
98 | FORCE: ; | ||
diff --git a/scripts/diffconfig b/scripts/diffconfig new file mode 100755 index 000000000000..b91f3e34d44d --- /dev/null +++ b/scripts/diffconfig | |||
@@ -0,0 +1,129 @@ | |||
1 | #!/usr/bin/python | ||
2 | # | ||
3 | # diffconfig - a tool to compare .config files. | ||
4 | # | ||
5 | # originally written in 2006 by Matt Mackall | ||
6 | # (at least, this was in his bloatwatch source code) | ||
7 | # last worked on 2008 by Tim Bird | ||
8 | # | ||
9 | |||
10 | import sys, os | ||
11 | |||
12 | def usage(): | ||
13 | print """Usage: diffconfig [-h] [-m] [<config1> <config2>] | ||
14 | |||
15 | Diffconfig is a simple utility for comparing two .config files. | ||
16 | Using standard diff to compare .config files often includes extraneous and | ||
17 | distracting information. This utility produces sorted output with only the | ||
18 | changes in configuration values between the two files. | ||
19 | |||
20 | Added and removed items are shown with a leading plus or minus, respectively. | ||
21 | Changed items show the old and new values on a single line. | ||
22 | |||
23 | If -m is specified, then output will be in "merge" style, which has the | ||
24 | changed and new values in kernel config option format. | ||
25 | |||
26 | If no config files are specified, .config and .config.old are used. | ||
27 | |||
28 | Example usage: | ||
29 | $ diffconfig .config config-with-some-changes | ||
30 | -EXT2_FS_XATTR n | ||
31 | -EXT2_FS_XIP n | ||
32 | CRAMFS n -> y | ||
33 | EXT2_FS y -> n | ||
34 | LOG_BUF_SHIFT 14 -> 16 | ||
35 | PRINTK_TIME n -> y | ||
36 | """ | ||
37 | sys.exit(0) | ||
38 | |||
39 | # returns a dictionary of name/value pairs for config items in the file | ||
40 | def readconfig(config_file): | ||
41 | d = {} | ||
42 | for line in config_file: | ||
43 | line = line[:-1] | ||
44 | if line[:7] == "CONFIG_": | ||
45 | name, val = line[7:].split("=", 1) | ||
46 | d[name] = val | ||
47 | if line[-11:] == " is not set": | ||
48 | d[line[9:-11]] = "n" | ||
49 | return d | ||
50 | |||
51 | def print_config(op, config, value, new_value): | ||
52 | global merge_style | ||
53 | |||
54 | if merge_style: | ||
55 | if new_value: | ||
56 | if new_value=="n": | ||
57 | print "# CONFIG_%s is not set" % config | ||
58 | else: | ||
59 | print "CONFIG_%s=%s" % (config, new_value) | ||
60 | else: | ||
61 | if op=="-": | ||
62 | print "-%s %s" % (config, value) | ||
63 | elif op=="+": | ||
64 | print "+%s %s" % (config, new_value) | ||
65 | else: | ||
66 | print " %s %s -> %s" % (config, value, new_value) | ||
67 | |||
68 | def main(): | ||
69 | global merge_style | ||
70 | |||
71 | # parse command line args | ||
72 | if ("-h" in sys.argv or "--help" in sys.argv): | ||
73 | usage() | ||
74 | |||
75 | merge_style = 0 | ||
76 | if "-m" in sys.argv: | ||
77 | merge_style = 1 | ||
78 | sys.argv.remove("-m") | ||
79 | |||
80 | argc = len(sys.argv) | ||
81 | if not (argc==1 or argc == 3): | ||
82 | print "Error: incorrect number of arguments or unrecognized option" | ||
83 | usage() | ||
84 | |||
85 | if argc == 1: | ||
86 | # if no filenames given, assume .config and .config.old | ||
87 | build_dir="" | ||
88 | if os.environ.has_key("KBUILD_OUTPUT"): | ||
89 | build_dir = os.environ["KBUILD_OUTPUT"]+"/" | ||
90 | |||
91 | configa_filename = build_dir + ".config.old" | ||
92 | configb_filename = build_dir + ".config" | ||
93 | else: | ||
94 | configa_filename = sys.argv[1] | ||
95 | configb_filename = sys.argv[2] | ||
96 | |||
97 | a = readconfig(file(configa_filename)) | ||
98 | b = readconfig(file(configb_filename)) | ||
99 | |||
100 | # print items in a but not b (accumulate, sort and print) | ||
101 | old = [] | ||
102 | for config in a: | ||
103 | if config not in b: | ||
104 | old.append(config) | ||
105 | old.sort() | ||
106 | for config in old: | ||
107 | print_config("-", config, a[config], None) | ||
108 | del a[config] | ||
109 | |||
110 | # print items that changed (accumulate, sort, and print) | ||
111 | changed = [] | ||
112 | for config in a: | ||
113 | if a[config] != b[config]: | ||
114 | changed.append(config) | ||
115 | else: | ||
116 | del b[config] | ||
117 | changed.sort() | ||
118 | for config in changed: | ||
119 | print_config("->", config, a[config], b[config]) | ||
120 | del b[config] | ||
121 | |||
122 | # now print items in b but not in a | ||
123 | # (items from b that were in a were removed above) | ||
124 | new = b.keys() | ||
125 | new.sort() | ||
126 | for config in new: | ||
127 | print_config("+", config, None, b[config]) | ||
128 | |||
129 | main() | ||
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c index 4f8a3007e457..c249274e005a 100644 --- a/scripts/genksyms/genksyms.c +++ b/scripts/genksyms/genksyms.c | |||
@@ -545,6 +545,8 @@ int main(int argc, char **argv) | |||
545 | } | 545 | } |
546 | fputs(sym->name, dumpfile); | 546 | fputs(sym->name, dumpfile); |
547 | putc(' ', dumpfile); | 547 | putc(' ', dumpfile); |
548 | if (sym->is_extern) | ||
549 | fputs("extern ", dumpfile); | ||
548 | print_list(dumpfile, sym->defn); | 550 | print_list(dumpfile, sym->defn); |
549 | putc('\n', dumpfile); | 551 | putc('\n', dumpfile); |
550 | 552 | ||
diff --git a/scripts/genksyms/lex.c_shipped b/scripts/genksyms/lex.c_shipped index 2a176988d468..2ac23bcca5b5 100644 --- a/scripts/genksyms/lex.c_shipped +++ b/scripts/genksyms/lex.c_shipped | |||
@@ -6,10 +6,19 @@ | |||
6 | 6 | ||
7 | /* A lexical scanner generated by flex */ | 7 | /* A lexical scanner generated by flex */ |
8 | 8 | ||
9 | /* %not-for-header */ | ||
10 | |||
11 | /* %if-c-only */ | ||
12 | /* %if-not-reentrant */ | ||
13 | |||
14 | /* %endif */ | ||
15 | /* %endif */ | ||
16 | /* %ok-for-header */ | ||
17 | |||
9 | #define FLEX_SCANNER | 18 | #define FLEX_SCANNER |
10 | #define YY_FLEX_MAJOR_VERSION 2 | 19 | #define YY_FLEX_MAJOR_VERSION 2 |
11 | #define YY_FLEX_MINOR_VERSION 5 | 20 | #define YY_FLEX_MINOR_VERSION 5 |
12 | #define YY_FLEX_SUBMINOR_VERSION 33 | 21 | #define YY_FLEX_SUBMINOR_VERSION 35 |
13 | #if YY_FLEX_SUBMINOR_VERSION > 0 | 22 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
14 | #define FLEX_BETA | 23 | #define FLEX_BETA |
15 | #endif | 24 | #endif |
@@ -47,7 +56,7 @@ | |||
47 | 56 | ||
48 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ | 57 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
49 | 58 | ||
50 | #if __STDC_VERSION__ >= 199901L | 59 | #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
51 | 60 | ||
52 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, | 61 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
53 | * if you want the limit (max/min) macros for int types. | 62 | * if you want the limit (max/min) macros for int types. |
@@ -70,7 +79,6 @@ typedef int flex_int32_t; | |||
70 | typedef unsigned char flex_uint8_t; | 79 | typedef unsigned char flex_uint8_t; |
71 | typedef unsigned short int flex_uint16_t; | 80 | typedef unsigned short int flex_uint16_t; |
72 | typedef unsigned int flex_uint32_t; | 81 | typedef unsigned int flex_uint32_t; |
73 | #endif /* ! C99 */ | ||
74 | 82 | ||
75 | /* Limits of integral types. */ | 83 | /* Limits of integral types. */ |
76 | #ifndef INT8_MIN | 84 | #ifndef INT8_MIN |
@@ -101,6 +109,8 @@ typedef unsigned int flex_uint32_t; | |||
101 | #define UINT32_MAX (4294967295U) | 109 | #define UINT32_MAX (4294967295U) |
102 | #endif | 110 | #endif |
103 | 111 | ||
112 | #endif /* ! C99 */ | ||
113 | |||
104 | #endif /* ! FLEXINT_H */ | 114 | #endif /* ! FLEXINT_H */ |
105 | 115 | ||
106 | /* %endif */ | 116 | /* %endif */ |
@@ -115,11 +125,12 @@ typedef unsigned int flex_uint32_t; | |||
115 | 125 | ||
116 | #else /* ! __cplusplus */ | 126 | #else /* ! __cplusplus */ |
117 | 127 | ||
118 | #if __STDC__ | 128 | /* C99 requires __STDC__ to be defined as 1. */ |
129 | #if defined (__STDC__) | ||
119 | 130 | ||
120 | #define YY_USE_CONST | 131 | #define YY_USE_CONST |
121 | 132 | ||
122 | #endif /* __STDC__ */ | 133 | #endif /* defined (__STDC__) */ |
123 | #endif /* ! __cplusplus */ | 134 | #endif /* ! __cplusplus */ |
124 | 135 | ||
125 | #ifdef YY_USE_CONST | 136 | #ifdef YY_USE_CONST |
@@ -218,14 +229,9 @@ extern FILE *yyin, *yyout; | |||
218 | 229 | ||
219 | #define unput(c) yyunput( c, (yytext_ptr) ) | 230 | #define unput(c) yyunput( c, (yytext_ptr) ) |
220 | 231 | ||
221 | /* The following is because we cannot portably get our hands on size_t | ||
222 | * (without autoconf's help, which isn't available because we want | ||
223 | * flex-generated scanners to compile on their own). | ||
224 | */ | ||
225 | |||
226 | #ifndef YY_TYPEDEF_YY_SIZE_T | 232 | #ifndef YY_TYPEDEF_YY_SIZE_T |
227 | #define YY_TYPEDEF_YY_SIZE_T | 233 | #define YY_TYPEDEF_YY_SIZE_T |
228 | typedef unsigned int yy_size_t; | 234 | typedef size_t yy_size_t; |
229 | #endif | 235 | #endif |
230 | 236 | ||
231 | #ifndef YY_STRUCT_YY_BUFFER_STATE | 237 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
@@ -401,7 +407,7 @@ void yyfree (void * ); | |||
401 | /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ | 407 | /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ |
402 | /* Begin user sect3 */ | 408 | /* Begin user sect3 */ |
403 | 409 | ||
404 | #define yywrap() 1 | 410 | #define yywrap(n) 1 |
405 | #define YY_SKIP_YYWRAP | 411 | #define YY_SKIP_YYWRAP |
406 | 412 | ||
407 | #define FLEX_DEBUG | 413 | #define FLEX_DEBUG |
@@ -613,8 +619,8 @@ int yy_flex_debug = 1; | |||
613 | 619 | ||
614 | static yyconst flex_int16_t yy_rule_linenum[13] = | 620 | static yyconst flex_int16_t yy_rule_linenum[13] = |
615 | { 0, | 621 | { 0, |
616 | 69, 70, 71, 74, 77, 78, 79, 85, 86, 87, | 622 | 71, 72, 73, 76, 79, 80, 81, 87, 88, 89, |
617 | 89, 92 | 623 | 91, 94 |
618 | } ; | 624 | } ; |
619 | 625 | ||
620 | /* The intent behind this definition is that it'll catch | 626 | /* The intent behind this definition is that it'll catch |
@@ -665,7 +671,8 @@ char *yytext; | |||
665 | quite so pedantic. */ | 671 | quite so pedantic. */ |
666 | 672 | ||
667 | /* We don't do multiple input files. */ | 673 | /* We don't do multiple input files. */ |
668 | #line 669 "scripts/genksyms/lex.c" | 674 | #define YY_NO_INPUT 1 |
675 | #line 676 "scripts/genksyms/lex.c" | ||
669 | 676 | ||
670 | #define INITIAL 0 | 677 | #define INITIAL 0 |
671 | #define V2_TOKENS 1 | 678 | #define V2_TOKENS 1 |
@@ -695,9 +702,39 @@ static int yy_init_globals (void ); | |||
695 | /* %endif */ | 702 | /* %endif */ |
696 | /* %if-reentrant */ | 703 | /* %if-reentrant */ |
697 | /* %endif */ | 704 | /* %endif */ |
705 | /* %endif End reentrant structures and macros. */ | ||
706 | |||
707 | /* Accessor methods to globals. | ||
708 | These are made visible to non-reentrant scanners for convenience. */ | ||
709 | |||
710 | int yylex_destroy (void ); | ||
711 | |||
712 | int yyget_debug (void ); | ||
713 | |||
714 | void yyset_debug (int debug_flag ); | ||
715 | |||
716 | YY_EXTRA_TYPE yyget_extra (void ); | ||
717 | |||
718 | void yyset_extra (YY_EXTRA_TYPE user_defined ); | ||
719 | |||
720 | FILE *yyget_in (void ); | ||
721 | |||
722 | void yyset_in (FILE * in_str ); | ||
723 | |||
724 | FILE *yyget_out (void ); | ||
725 | |||
726 | void yyset_out (FILE * out_str ); | ||
727 | |||
728 | int yyget_leng (void ); | ||
729 | |||
730 | char *yyget_text (void ); | ||
731 | |||
732 | int yyget_lineno (void ); | ||
733 | |||
734 | void yyset_lineno (int line_number ); | ||
735 | |||
698 | /* %if-bison-bridge */ | 736 | /* %if-bison-bridge */ |
699 | /* %endif */ | 737 | /* %endif */ |
700 | /* %endif End reentrant structures and macros. */ | ||
701 | 738 | ||
702 | /* Macros after this point can all be overridden by user definitions in | 739 | /* Macros after this point can all be overridden by user definitions in |
703 | * section 1. | 740 | * section 1. |
@@ -756,7 +793,7 @@ static int input (void ); | |||
756 | /* This used to be an fputs(), but since the string might contain NUL's, | 793 | /* This used to be an fputs(), but since the string might contain NUL's, |
757 | * we now use fwrite(). | 794 | * we now use fwrite(). |
758 | */ | 795 | */ |
759 | #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) | 796 | #define ECHO fwrite( yytext, yyleng, 1, yyout ) |
760 | /* %endif */ | 797 | /* %endif */ |
761 | /* %if-c++-only C++ definition */ | 798 | /* %if-c++-only C++ definition */ |
762 | /* %endif */ | 799 | /* %endif */ |
@@ -881,12 +918,12 @@ YY_DECL | |||
881 | register int yy_act; | 918 | register int yy_act; |
882 | 919 | ||
883 | /* %% [7.0] user's declarations go here */ | 920 | /* %% [7.0] user's declarations go here */ |
884 | #line 65 "scripts/genksyms/lex.l" | 921 | #line 67 "scripts/genksyms/lex.l" |
885 | 922 | ||
886 | 923 | ||
887 | 924 | ||
888 | /* Keep track of our location in the original source files. */ | 925 | /* Keep track of our location in the original source files. */ |
889 | #line 890 "scripts/genksyms/lex.c" | 926 | #line 927 "scripts/genksyms/lex.c" |
890 | 927 | ||
891 | if ( !(yy_init) ) | 928 | if ( !(yy_init) ) |
892 | { | 929 | { |
@@ -1004,42 +1041,42 @@ do_action: /* This label is used only to access EOF actions. */ | |||
1004 | case 1: | 1041 | case 1: |
1005 | /* rule 1 can match eol */ | 1042 | /* rule 1 can match eol */ |
1006 | YY_RULE_SETUP | 1043 | YY_RULE_SETUP |
1007 | #line 69 "scripts/genksyms/lex.l" | 1044 | #line 71 "scripts/genksyms/lex.l" |
1008 | return FILENAME; | 1045 | return FILENAME; |
1009 | YY_BREAK | 1046 | YY_BREAK |
1010 | case 2: | 1047 | case 2: |
1011 | /* rule 2 can match eol */ | 1048 | /* rule 2 can match eol */ |
1012 | YY_RULE_SETUP | 1049 | YY_RULE_SETUP |
1013 | #line 70 "scripts/genksyms/lex.l" | 1050 | #line 72 "scripts/genksyms/lex.l" |
1014 | cur_line++; | 1051 | cur_line++; |
1015 | YY_BREAK | 1052 | YY_BREAK |
1016 | case 3: | 1053 | case 3: |
1017 | /* rule 3 can match eol */ | 1054 | /* rule 3 can match eol */ |
1018 | YY_RULE_SETUP | 1055 | YY_RULE_SETUP |
1019 | #line 71 "scripts/genksyms/lex.l" | 1056 | #line 73 "scripts/genksyms/lex.l" |
1020 | cur_line++; | 1057 | cur_line++; |
1021 | YY_BREAK | 1058 | YY_BREAK |
1022 | /* Ignore all other whitespace. */ | 1059 | /* Ignore all other whitespace. */ |
1023 | case 4: | 1060 | case 4: |
1024 | YY_RULE_SETUP | 1061 | YY_RULE_SETUP |
1025 | #line 74 "scripts/genksyms/lex.l" | 1062 | #line 76 "scripts/genksyms/lex.l" |
1026 | ; | 1063 | ; |
1027 | YY_BREAK | 1064 | YY_BREAK |
1028 | case 5: | 1065 | case 5: |
1029 | /* rule 5 can match eol */ | 1066 | /* rule 5 can match eol */ |
1030 | YY_RULE_SETUP | 1067 | YY_RULE_SETUP |
1031 | #line 77 "scripts/genksyms/lex.l" | 1068 | #line 79 "scripts/genksyms/lex.l" |
1032 | return STRING; | 1069 | return STRING; |
1033 | YY_BREAK | 1070 | YY_BREAK |
1034 | case 6: | 1071 | case 6: |
1035 | /* rule 6 can match eol */ | 1072 | /* rule 6 can match eol */ |
1036 | YY_RULE_SETUP | 1073 | YY_RULE_SETUP |
1037 | #line 78 "scripts/genksyms/lex.l" | 1074 | #line 80 "scripts/genksyms/lex.l" |
1038 | return CHAR; | 1075 | return CHAR; |
1039 | YY_BREAK | 1076 | YY_BREAK |
1040 | case 7: | 1077 | case 7: |
1041 | YY_RULE_SETUP | 1078 | YY_RULE_SETUP |
1042 | #line 79 "scripts/genksyms/lex.l" | 1079 | #line 81 "scripts/genksyms/lex.l" |
1043 | return IDENT; | 1080 | return IDENT; |
1044 | YY_BREAK | 1081 | YY_BREAK |
1045 | /* The Pedant requires that the other C multi-character tokens be | 1082 | /* The Pedant requires that the other C multi-character tokens be |
@@ -1048,36 +1085,36 @@ return IDENT; | |||
1048 | around them properly. */ | 1085 | around them properly. */ |
1049 | case 8: | 1086 | case 8: |
1050 | YY_RULE_SETUP | 1087 | YY_RULE_SETUP |
1051 | #line 85 "scripts/genksyms/lex.l" | 1088 | #line 87 "scripts/genksyms/lex.l" |
1052 | return OTHER; | 1089 | return OTHER; |
1053 | YY_BREAK | 1090 | YY_BREAK |
1054 | case 9: | 1091 | case 9: |
1055 | YY_RULE_SETUP | 1092 | YY_RULE_SETUP |
1056 | #line 86 "scripts/genksyms/lex.l" | 1093 | #line 88 "scripts/genksyms/lex.l" |
1057 | return INT; | 1094 | return INT; |
1058 | YY_BREAK | 1095 | YY_BREAK |
1059 | case 10: | 1096 | case 10: |
1060 | YY_RULE_SETUP | 1097 | YY_RULE_SETUP |
1061 | #line 87 "scripts/genksyms/lex.l" | 1098 | #line 89 "scripts/genksyms/lex.l" |
1062 | return REAL; | 1099 | return REAL; |
1063 | YY_BREAK | 1100 | YY_BREAK |
1064 | case 11: | 1101 | case 11: |
1065 | YY_RULE_SETUP | 1102 | YY_RULE_SETUP |
1066 | #line 89 "scripts/genksyms/lex.l" | 1103 | #line 91 "scripts/genksyms/lex.l" |
1067 | return DOTS; | 1104 | return DOTS; |
1068 | YY_BREAK | 1105 | YY_BREAK |
1069 | /* All other tokens are single characters. */ | 1106 | /* All other tokens are single characters. */ |
1070 | case 12: | 1107 | case 12: |
1071 | YY_RULE_SETUP | 1108 | YY_RULE_SETUP |
1072 | #line 92 "scripts/genksyms/lex.l" | 1109 | #line 94 "scripts/genksyms/lex.l" |
1073 | return yytext[0]; | 1110 | return yytext[0]; |
1074 | YY_BREAK | 1111 | YY_BREAK |
1075 | case 13: | 1112 | case 13: |
1076 | YY_RULE_SETUP | 1113 | YY_RULE_SETUP |
1077 | #line 95 "scripts/genksyms/lex.l" | 1114 | #line 97 "scripts/genksyms/lex.l" |
1078 | ECHO; | 1115 | ECHO; |
1079 | YY_BREAK | 1116 | YY_BREAK |
1080 | #line 1081 "scripts/genksyms/lex.c" | 1117 | #line 1118 "scripts/genksyms/lex.c" |
1081 | case YY_STATE_EOF(INITIAL): | 1118 | case YY_STATE_EOF(INITIAL): |
1082 | case YY_STATE_EOF(V2_TOKENS): | 1119 | case YY_STATE_EOF(V2_TOKENS): |
1083 | yyterminate(); | 1120 | yyterminate(); |
@@ -1346,6 +1383,14 @@ static int yy_get_next_buffer (void) | |||
1346 | else | 1383 | else |
1347 | ret_val = EOB_ACT_CONTINUE_SCAN; | 1384 | ret_val = EOB_ACT_CONTINUE_SCAN; |
1348 | 1385 | ||
1386 | if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { | ||
1387 | /* Extend the array by 50%, plus the number we really need. */ | ||
1388 | yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); | ||
1389 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); | ||
1390 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) | ||
1391 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); | ||
1392 | } | ||
1393 | |||
1349 | (yy_n_chars) += number_to_move; | 1394 | (yy_n_chars) += number_to_move; |
1350 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; | 1395 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; |
1351 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; | 1396 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; |
@@ -1851,7 +1896,9 @@ static void yyensure_buffer_stack (void) | |||
1851 | (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc | 1896 | (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc |
1852 | (num_to_alloc * sizeof(struct yy_buffer_state*) | 1897 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
1853 | ); | 1898 | ); |
1854 | 1899 | if ( ! (yy_buffer_stack) ) | |
1900 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); | ||
1901 | |||
1855 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); | 1902 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
1856 | 1903 | ||
1857 | (yy_buffer_stack_max) = num_to_alloc; | 1904 | (yy_buffer_stack_max) = num_to_alloc; |
@@ -1869,6 +1916,8 @@ static void yyensure_buffer_stack (void) | |||
1869 | ((yy_buffer_stack), | 1916 | ((yy_buffer_stack), |
1870 | num_to_alloc * sizeof(struct yy_buffer_state*) | 1917 | num_to_alloc * sizeof(struct yy_buffer_state*) |
1871 | ); | 1918 | ); |
1919 | if ( ! (yy_buffer_stack) ) | ||
1920 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); | ||
1872 | 1921 | ||
1873 | /* zero only the new slots.*/ | 1922 | /* zero only the new slots.*/ |
1874 | memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); | 1923 | memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); |
@@ -2092,7 +2141,7 @@ void yyset_debug (int bdebug ) | |||
2092 | /* %if-reentrant */ | 2141 | /* %if-reentrant */ |
2093 | /* %if-bison-bridge */ | 2142 | /* %if-bison-bridge */ |
2094 | /* %endif */ | 2143 | /* %endif */ |
2095 | /* %endif */ | 2144 | /* %endif if-c-only */ |
2096 | 2145 | ||
2097 | /* %if-c-only */ | 2146 | /* %if-c-only */ |
2098 | static int yy_init_globals (void) | 2147 | static int yy_init_globals (void) |
@@ -2124,13 +2173,9 @@ static int yy_init_globals (void) | |||
2124 | } | 2173 | } |
2125 | /* %endif */ | 2174 | /* %endif */ |
2126 | 2175 | ||
2127 | /* %if-c-or-c++ */ | 2176 | /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */ |
2128 | /* %if-c-only */ | ||
2129 | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ | 2177 | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
2130 | int yylex_destroy (void) | 2178 | int yylex_destroy (void) |
2131 | /* %endif */ | ||
2132 | /* %if-c++-only */ | ||
2133 | /* %endif */ | ||
2134 | { | 2179 | { |
2135 | 2180 | ||
2136 | /* Pop the buffer stack, destroying each element. */ | 2181 | /* Pop the buffer stack, destroying each element. */ |
@@ -2144,11 +2189,6 @@ int yylex_destroy (void) | |||
2144 | yyfree((yy_buffer_stack) ); | 2189 | yyfree((yy_buffer_stack) ); |
2145 | (yy_buffer_stack) = NULL; | 2190 | (yy_buffer_stack) = NULL; |
2146 | 2191 | ||
2147 | /* %if-c++-only */ | ||
2148 | /* %endif */ | ||
2149 | |||
2150 | /* %if-c-only */ | ||
2151 | |||
2152 | /* Reset the globals. This is important in a non-reentrant scanner so the next time | 2192 | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
2153 | * yylex() is called, initialization will occur. */ | 2193 | * yylex() is called, initialization will occur. */ |
2154 | yy_init_globals( ); | 2194 | yy_init_globals( ); |
@@ -2156,7 +2196,6 @@ int yylex_destroy (void) | |||
2156 | /* %if-reentrant */ | 2196 | /* %if-reentrant */ |
2157 | /* %endif */ | 2197 | /* %endif */ |
2158 | return 0; | 2198 | return 0; |
2159 | /* %endif */ | ||
2160 | } | 2199 | } |
2161 | /* %endif */ | 2200 | /* %endif */ |
2162 | 2201 | ||
@@ -2213,7 +2252,7 @@ void yyfree (void * ptr ) | |||
2213 | 2252 | ||
2214 | /* %ok-for-header */ | 2253 | /* %ok-for-header */ |
2215 | 2254 | ||
2216 | #line 95 "scripts/genksyms/lex.l" | 2255 | #line 97 "scripts/genksyms/lex.l" |
2217 | 2256 | ||
2218 | 2257 | ||
2219 | 2258 | ||
diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l index 5e544a06678b..fe50ff9dacd0 100644 --- a/scripts/genksyms/lex.l +++ b/scripts/genksyms/lex.l | |||
@@ -62,6 +62,8 @@ MC_TOKEN ([~%^&*+=|<>/-]=)|(&&)|("||")|(->)|(<<)|(>>) | |||
62 | /* We don't do multiple input files. */ | 62 | /* We don't do multiple input files. */ |
63 | %option noyywrap | 63 | %option noyywrap |
64 | 64 | ||
65 | %option noinput | ||
66 | |||
65 | %% | 67 | %% |
66 | 68 | ||
67 | 69 | ||
diff --git a/scripts/genksyms/parse.c_shipped b/scripts/genksyms/parse.c_shipped index 3e6079f36b9f..eaee44e66a43 100644 --- a/scripts/genksyms/parse.c_shipped +++ b/scripts/genksyms/parse.c_shipped | |||
@@ -504,7 +504,7 @@ static const yytype_uint16 yyprhs[] = | |||
504 | 239, 242, 245, 247, 248, 250, 252, 257, 262, 265, | 504 | 239, 242, 245, 247, 248, 250, 252, 257, 262, 265, |
505 | 269, 273, 277, 278, 280, 283, 287, 291, 292, 294, | 505 | 269, 273, 277, 278, 280, 283, 287, 291, 292, 294, |
506 | 296, 299, 303, 306, 307, 309, 311, 315, 318, 321, | 506 | 296, 299, 303, 306, 307, 309, 311, 315, 318, 321, |
507 | 323, 326, 327, 329, 332, 333, 335 | 507 | 323, 326, 327, 330, 333, 334, 336 |
508 | }; | 508 | }; |
509 | 509 | ||
510 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ | 510 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
@@ -542,9 +542,9 @@ static const yytype_int8 yyrhs[] = | |||
542 | -1, -1, 89, -1, 90, -1, 89, 90, -1, 64, | 542 | -1, -1, 89, -1, 90, -1, 89, 90, -1, 64, |
543 | 91, 44, -1, 1, 44, -1, -1, 92, -1, 93, | 543 | 91, 44, -1, 1, 44, -1, -1, 92, -1, 93, |
544 | -1, 92, 46, 93, -1, 76, 95, -1, 37, 94, | 544 | -1, 92, 46, 93, -1, 76, 95, -1, 37, 94, |
545 | -1, 94, -1, 52, 34, -1, -1, 31, -1, 30, | 545 | -1, 94, -1, 52, 34, -1, -1, 95, 31, -1, |
546 | 44, -1, -1, 30, -1, 29, 47, 37, 49, 44, | 546 | 30, 44, -1, -1, 30, -1, 29, 47, 37, 49, |
547 | -1 | 547 | 44, -1 |
548 | }; | 548 | }; |
549 | 549 | ||
550 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | 550 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
@@ -647,7 +647,7 @@ static const yytype_uint8 yyr2[] = | |||
647 | 2, 2, 1, 0, 1, 1, 4, 4, 2, 3, | 647 | 2, 2, 1, 0, 1, 1, 4, 4, 2, 3, |
648 | 3, 3, 0, 1, 2, 3, 3, 0, 1, 1, | 648 | 3, 3, 0, 1, 2, 3, 3, 0, 1, 1, |
649 | 2, 3, 2, 0, 1, 1, 3, 2, 2, 1, | 649 | 2, 3, 2, 0, 1, 1, 3, 2, 2, 1, |
650 | 2, 0, 1, 2, 0, 1, 5 | 650 | 2, 0, 2, 2, 0, 1, 5 |
651 | }; | 651 | }; |
652 | 652 | ||
653 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state | 653 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
@@ -667,9 +667,9 @@ static const yytype_uint8 yydefact[] = | |||
667 | 0, 66, 125, 101, 121, 71, 0, 7, 112, 106, | 667 | 0, 66, 125, 101, 121, 71, 0, 7, 112, 106, |
668 | 76, 77, 0, 0, 0, 121, 75, 0, 114, 115, | 668 | 76, 77, 0, 0, 0, 121, 75, 0, 114, 115, |
669 | 119, 105, 0, 110, 124, 0, 36, 0, 73, 72, | 669 | 119, 105, 0, 110, 124, 0, 36, 0, 73, 72, |
670 | 61, 20, 122, 102, 0, 93, 0, 84, 87, 88, | 670 | 61, 20, 102, 0, 93, 0, 84, 87, 88, 118, |
671 | 118, 0, 76, 0, 120, 74, 117, 80, 0, 111, | 671 | 0, 76, 0, 120, 74, 117, 80, 0, 111, 0, |
672 | 0, 35, 126, 0, 21, 103, 70, 94, 56, 0, | 672 | 35, 126, 122, 0, 21, 103, 70, 94, 56, 0, |
673 | 93, 90, 92, 69, 83, 0, 82, 81, 0, 0, | 673 | 93, 90, 92, 69, 83, 0, 82, 81, 0, 0, |
674 | 116, 104, 0, 95, 0, 91, 98, 0, 85, 89, | 674 | 116, 104, 0, 95, 0, 91, 98, 0, 85, 89, |
675 | 79, 78, 100, 99, 0, 0, 97, 96 | 675 | 79, 78, 100, 99, 0, 0, 97, 96 |
@@ -680,44 +680,44 @@ static const yytype_int16 yydefgoto[] = | |||
680 | { | 680 | { |
681 | -1, 1, 2, 3, 35, 72, 55, 36, 64, 65, | 681 | -1, 1, 2, 3, 35, 72, 55, 36, 64, 65, |
682 | 66, 75, 38, 39, 40, 41, 42, 67, 86, 87, | 682 | 66, 75, 38, 39, 40, 41, 42, 67, 86, 87, |
683 | 43, 114, 69, 105, 106, 126, 127, 128, 129, 151, | 683 | 43, 114, 69, 105, 106, 125, 126, 127, 128, 151, |
684 | 152, 44, 144, 145, 54, 76, 77, 78, 107, 108, | 684 | 152, 44, 144, 145, 54, 76, 77, 78, 107, 108, |
685 | 109, 110, 123, 45, 94, 46 | 685 | 109, 110, 122, 45, 94, 46 |
686 | }; | 686 | }; |
687 | 687 | ||
688 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | 688 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
689 | STATE-NUM. */ | 689 | STATE-NUM. */ |
690 | #define YYPACT_NINF -135 | 690 | #define YYPACT_NINF -134 |
691 | static const yytype_int16 yypact[] = | 691 | static const yytype_int16 yypact[] = |
692 | { | 692 | { |
693 | -135, 11, -135, 312, -135, -135, 24, -135, -135, -135, | 693 | -134, 16, -134, 312, -134, -134, 20, -134, -134, -134, |
694 | -135, -135, -23, -135, -2, -135, -135, -135, -135, -135, | 694 | -134, -134, -18, -134, -3, -134, -134, -134, -134, -134, |
695 | -135, -135, -135, -135, -17, -135, -11, -135, -135, -135, | 695 | -134, -134, -134, -134, -26, -134, -25, -134, -134, -134, |
696 | -3, 16, 26, -135, -135, -135, -135, 34, 482, -135, | 696 | -7, 5, 27, -134, -134, -134, -134, 46, 482, -134, |
697 | -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, | 697 | -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, |
698 | -8, -135, 22, 97, -135, 482, 22, -135, 482, 56, | 698 | -8, -134, 30, 97, -134, 482, 30, -134, 482, 7, |
699 | -135, -135, 12, 10, 50, 49, -135, 34, -13, 15, | 699 | -134, -134, 12, 10, 42, 55, -134, 46, -15, 15, |
700 | -135, -135, 482, -135, 47, -25, 51, 145, -135, -135, | 700 | -134, -134, 482, -134, 25, 26, 47, 145, -134, -134, |
701 | 34, -135, 356, 52, 71, 77, -135, 10, -135, -135, | 701 | 46, -134, 356, 39, 71, 77, -134, 10, -134, -134, |
702 | 34, -135, -135, -135, 68, -135, 193, -135, -135, -135, | 702 | 46, -134, -134, -134, -134, -134, 193, -134, -134, -134, |
703 | 48, -135, 6, 93, 37, 68, 18, 85, 84, -135, | 703 | 75, -134, 6, 95, 43, -134, 28, 86, 85, -134, |
704 | -135, -135, 87, -135, 102, 86, -135, 89, -135, -135, | 704 | -134, -134, 88, -134, 103, 87, -134, 91, -134, -134, |
705 | -135, -135, -135, 90, 88, 401, 94, 100, 101, -135, | 705 | -134, -134, -23, 90, 401, 94, 101, 102, -134, -134, |
706 | -135, 99, -135, 108, -135, -135, -135, -135, 230, -135, | 706 | 98, -134, 108, -134, -134, 109, -134, 230, -134, 26, |
707 | -25, -135, -135, 105, -135, -135, -135, -135, -135, 9, | 707 | -134, -134, -134, 134, -134, -134, -134, -134, -134, 9, |
708 | 42, -135, 28, -135, -135, 445, -135, -135, 119, 125, | 708 | 48, -134, 35, -134, -134, 445, -134, -134, 125, 126, |
709 | -135, -135, 126, -135, 128, -135, -135, 267, -135, -135, | 709 | -134, -134, 128, -134, 129, -134, -134, 267, -134, -134, |
710 | -135, -135, -135, -135, 129, 130, -135, -135 | 710 | -134, -134, -134, -134, 130, 131, -134, -134 |
711 | }; | 711 | }; |
712 | 712 | ||
713 | /* YYPGOTO[NTERM-NUM]. */ | 713 | /* YYPGOTO[NTERM-NUM]. */ |
714 | static const yytype_int16 yypgoto[] = | 714 | static const yytype_int16 yypgoto[] = |
715 | { | 715 | { |
716 | -135, -135, 179, -135, -135, -135, -135, -47, -135, -135, | 716 | -134, -134, 180, -134, -134, -134, -134, -33, -134, -134, |
717 | 91, 0, -58, -37, -135, -135, -135, -73, -135, -135, | 717 | 93, 0, -58, -37, -134, -134, -134, -73, -134, -134, |
718 | -48, -32, -135, -38, -135, -134, -135, -135, 29, -63, | 718 | -54, -32, -134, -81, -134, -133, -134, -134, 29, -50, |
719 | -135, -135, -135, -135, -20, -135, -135, 106, -135, -135, | 719 | -134, -134, -134, -134, -20, -134, -134, 110, -134, -134, |
720 | 45, 95, 82, -135, -135, -135 | 720 | 49, 96, 80, -134, -134, -134 |
721 | }; | 721 | }; |
722 | 722 | ||
723 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | 723 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
@@ -727,26 +727,26 @@ static const yytype_int16 yypgoto[] = | |||
727 | #define YYTABLE_NINF -109 | 727 | #define YYTABLE_NINF -109 |
728 | static const yytype_int16 yytable[] = | 728 | static const yytype_int16 yytable[] = |
729 | { | 729 | { |
730 | 82, 70, 104, 37, 159, 68, 57, 131, 79, 49, | 730 | 82, 70, 104, 37, 159, 68, 57, 130, 142, 88, |
731 | 162, 4, 100, 84, 50, 88, 101, 92, 10, 93, | 731 | 162, 52, 56, 84, 49, 92, 4, 93, 10, 50, |
732 | 52, 51, 102, 63, 71, 97, 56, 103, 20, 104, | 732 | 51, 132, 79, 134, 71, 53, 53, 143, 20, 104, |
733 | 85, 104, 73, 175, 53, 91, 81, 29, 125, 120, | 733 | 85, 104, 73, 120, 175, 91, 81, 29, 124, 97, |
734 | 53, 33, -93, 132, 58, 70, 147, 101, 95, 61, | 734 | 58, 33, -93, 131, 83, 70, 147, 101, 95, 61, |
735 | 163, 137, 150, 102, 63, 80, 149, 63, -93, 62, | 735 | 163, 150, 59, 102, 63, 80, 149, 63, -93, 62, |
736 | 63, 166, 96, 59, 133, 138, 135, 104, 47, 48, | 736 | 63, 136, 96, 100, 47, 48, 104, 101, 166, 98, |
737 | 60, 61, 80, 53, 132, 167, 150, 150, 101, 147, | 737 | 99, 60, 80, 102, 63, 137, 150, 150, 103, 124, |
738 | 125, 62, 63, 163, 102, 63, 164, 165, 70, 149, | 738 | 131, 53, 167, 61, 101, 147, 89, 70, 117, 163, |
739 | 63, 98, 99, 83, 89, 90, 111, 125, 74, 122, | 739 | 102, 63, 111, 62, 63, 149, 63, 124, 74, 164, |
740 | 103, 117, 7, 8, 9, 10, 11, 12, 13, 125, | 740 | 165, 90, 7, 8, 9, 10, 11, 12, 13, 124, |
741 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, | 741 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
742 | 118, 26, 27, 28, 29, 30, 119, 134, 33, 139, | 742 | 118, 26, 27, 28, 29, 30, 119, 103, 33, 133, |
743 | 140, 98, 92, 142, -22, 141, 154, 146, 34, 161, | 743 | 138, 139, 98, 92, -22, 141, 140, 154, 34, 146, |
744 | 143, -22, -107, 153, -22, -22, 112, 155, 156, -22, | 744 | 142, -22, -107, 153, -22, -22, 112, 156, 155, -22, |
745 | 7, 8, 9, 10, 11, 12, 13, 157, 15, 16, | 745 | 7, 8, 9, 10, 11, 12, 13, 157, 15, 16, |
746 | 17, 18, 19, 20, 21, 22, 23, 24, 170, 26, | 746 | 17, 18, 19, 20, 21, 22, 23, 24, 161, 26, |
747 | 27, 28, 29, 30, 171, 172, 33, 173, 176, 177, | 747 | 27, 28, 29, 30, 170, 171, 33, 172, 173, 176, |
748 | 5, 121, -22, 113, 169, 160, 34, 136, 0, -22, | 748 | 177, 5, -22, 121, 169, 135, 34, 113, 160, -22, |
749 | -108, 0, -22, -22, 124, 130, 0, -22, 7, 8, | 749 | -108, 0, -22, -22, 123, 0, 129, -22, 7, 8, |
750 | 9, 10, 11, 12, 13, 0, 15, 16, 17, 18, | 750 | 9, 10, 11, 12, 13, 0, 15, 16, 17, 18, |
751 | 19, 20, 21, 22, 23, 24, 0, 26, 27, 28, | 751 | 19, 20, 21, 22, 23, 24, 0, 26, 27, 28, |
752 | 29, 30, 0, 0, 33, 0, 0, 0, 0, -86, | 752 | 29, 30, 0, 0, 33, 0, 0, 0, 0, -86, |
@@ -784,26 +784,26 @@ static const yytype_int16 yytable[] = | |||
784 | 784 | ||
785 | static const yytype_int16 yycheck[] = | 785 | static const yytype_int16 yycheck[] = |
786 | { | 786 | { |
787 | 58, 38, 75, 3, 138, 37, 26, 1, 55, 32, | 787 | 58, 38, 75, 3, 137, 37, 26, 1, 31, 63, |
788 | 1, 0, 37, 1, 37, 63, 41, 30, 8, 32, | 788 | 1, 37, 37, 1, 32, 30, 0, 32, 8, 37, |
789 | 37, 23, 47, 48, 32, 72, 37, 52, 18, 102, | 789 | 23, 102, 55, 104, 32, 51, 51, 50, 18, 102, |
790 | 62, 104, 52, 167, 51, 67, 56, 27, 96, 87, | 790 | 62, 104, 52, 87, 167, 67, 56, 27, 96, 72, |
791 | 51, 31, 33, 37, 47, 82, 37, 41, 33, 37, | 791 | 47, 31, 33, 37, 37, 82, 37, 41, 33, 37, |
792 | 41, 33, 125, 47, 48, 55, 47, 48, 49, 47, | 792 | 41, 124, 47, 47, 48, 55, 47, 48, 49, 47, |
793 | 48, 33, 47, 47, 102, 47, 104, 140, 44, 45, | 793 | 48, 33, 47, 37, 44, 45, 139, 41, 33, 44, |
794 | 44, 37, 72, 51, 37, 47, 149, 150, 41, 37, | 794 | 45, 44, 72, 47, 48, 47, 149, 150, 52, 137, |
795 | 138, 47, 48, 41, 47, 48, 149, 150, 125, 47, | 795 | 37, 51, 47, 37, 41, 37, 44, 124, 49, 41, |
796 | 48, 44, 45, 37, 44, 46, 45, 155, 1, 31, | 796 | 47, 48, 45, 47, 48, 47, 48, 155, 1, 149, |
797 | 52, 49, 5, 6, 7, 8, 9, 10, 11, 167, | 797 | 150, 46, 5, 6, 7, 8, 9, 10, 11, 167, |
798 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, | 798 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
799 | 49, 24, 25, 26, 27, 28, 49, 34, 31, 44, | 799 | 49, 24, 25, 26, 27, 28, 49, 52, 31, 34, |
800 | 46, 44, 30, 44, 37, 49, 36, 49, 41, 34, | 800 | 44, 46, 44, 30, 37, 44, 49, 36, 41, 49, |
801 | 50, 44, 45, 49, 47, 48, 1, 46, 49, 52, | 801 | 31, 44, 45, 49, 47, 48, 1, 49, 46, 52, |
802 | 5, 6, 7, 8, 9, 10, 11, 49, 13, 14, | 802 | 5, 6, 7, 8, 9, 10, 11, 49, 13, 14, |
803 | 15, 16, 17, 18, 19, 20, 21, 22, 49, 24, | 803 | 15, 16, 17, 18, 19, 20, 21, 22, 34, 24, |
804 | 25, 26, 27, 28, 49, 49, 31, 49, 49, 49, | 804 | 25, 26, 27, 28, 49, 49, 31, 49, 49, 49, |
805 | 1, 90, 37, 77, 155, 140, 41, 105, -1, 44, | 805 | 49, 1, 37, 90, 155, 105, 41, 77, 139, 44, |
806 | 45, -1, 47, 48, 1, 100, -1, 52, 5, 6, | 806 | 45, -1, 47, 48, 1, -1, 100, 52, 5, 6, |
807 | 7, 8, 9, 10, 11, -1, 13, 14, 15, 16, | 807 | 7, 8, 9, 10, 11, -1, 13, 14, 15, 16, |
808 | 17, 18, 19, 20, 21, 22, -1, 24, 25, 26, | 808 | 17, 18, 19, 20, 21, 22, -1, 24, 25, 26, |
809 | 27, 28, -1, -1, 31, -1, -1, -1, -1, 36, | 809 | 27, 28, -1, -1, 31, -1, -1, -1, -1, 36, |
@@ -855,9 +855,9 @@ static const yytype_uint8 yystos[] = | |||
855 | 46, 74, 30, 32, 97, 33, 47, 60, 44, 45, | 855 | 46, 74, 30, 32, 97, 33, 47, 60, 44, 45, |
856 | 37, 41, 47, 52, 70, 76, 77, 91, 92, 93, | 856 | 37, 41, 47, 52, 70, 76, 77, 91, 92, 93, |
857 | 94, 45, 1, 90, 74, 48, 49, 49, 49, 49, | 857 | 94, 45, 1, 90, 74, 48, 49, 49, 49, 49, |
858 | 73, 63, 31, 95, 1, 65, 78, 79, 80, 81, | 858 | 73, 63, 95, 1, 65, 78, 79, 80, 81, 94, |
859 | 94, 1, 37, 76, 34, 76, 95, 33, 47, 44, | 859 | 1, 37, 76, 34, 76, 95, 33, 47, 44, 46, |
860 | 46, 49, 44, 50, 85, 86, 49, 37, 41, 47, | 860 | 49, 44, 31, 50, 85, 86, 49, 37, 41, 47, |
861 | 70, 82, 83, 49, 36, 46, 49, 49, 1, 78, | 861 | 70, 82, 83, 49, 36, 46, 49, 49, 1, 78, |
862 | 93, 34, 1, 41, 82, 82, 33, 47, 36, 81, | 862 | 93, 34, 1, 41, 82, 82, 33, 47, 36, 81, |
863 | 49, 49, 49, 49, 1, 78, 49, 49 | 863 | 49, 49, 49, 49, 1, 78, 49, 49 |
diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y index 408cdf82b271..10d7dc724b6d 100644 --- a/scripts/genksyms/parse.y +++ b/scripts/genksyms/parse.y | |||
@@ -446,7 +446,7 @@ member_bitfield_declarator: | |||
446 | 446 | ||
447 | attribute_opt: | 447 | attribute_opt: |
448 | /* empty */ { $$ = NULL; } | 448 | /* empty */ { $$ = NULL; } |
449 | | ATTRIBUTE_PHRASE | 449 | | attribute_opt ATTRIBUTE_PHRASE |
450 | ; | 450 | ; |
451 | 451 | ||
452 | asm_definition: | 452 | asm_definition: |
diff --git a/scripts/hdrcheck.sh b/scripts/hdrcheck.sh deleted file mode 100755 index 31598584f871..000000000000 --- a/scripts/hdrcheck.sh +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | for FILE in `grep '^[ \t]*#[ \t]*include[ \t]*<' $2 | cut -f2 -d\< | cut -f1 -d\> | egrep ^linux\|^asm` ; do | ||
4 | if [ ! -r $1/$FILE ]; then | ||
5 | echo $2 requires $FILE, which does not exist in exported headers | ||
6 | exit 1 | ||
7 | fi | ||
8 | done | ||
9 | # FIXME: List dependencies into $3 | ||
10 | touch $3 | ||
diff --git a/scripts/headers.sh b/scripts/headers.sh new file mode 100755 index 000000000000..d33426f866db --- /dev/null +++ b/scripts/headers.sh | |||
@@ -0,0 +1,41 @@ | |||
1 | #!/bin/sh | ||
2 | # Run headers_$1 command for all suitable architectures | ||
3 | |||
4 | # Stop on error | ||
5 | set -e | ||
6 | |||
7 | do_command() | ||
8 | { | ||
9 | if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then | ||
10 | make ARCH=$2 KBUILD_HEADERS=$1 headers_$1 | ||
11 | elif [ -f ${srctree}/include/asm-$2/Kbuild ]; then | ||
12 | make ARCH=$2 KBUILD_HEADERS=$1 headers_$1 | ||
13 | else | ||
14 | printf "Ignoring arch: %s\n" ${arch} | ||
15 | fi | ||
16 | } | ||
17 | |||
18 | # Do not try this architecture | ||
19 | drop="generic um ppc sparc64 cris" | ||
20 | |||
21 | archs=$(ls ${srctree}/arch) | ||
22 | |||
23 | for arch in ${archs}; do | ||
24 | case ${arch} in | ||
25 | um) # no userspace export | ||
26 | ;; | ||
27 | ppc) # headers exported by powerpc | ||
28 | ;; | ||
29 | sparc64) # headers exported by sparc | ||
30 | ;; | ||
31 | cris) # headers export are known broken | ||
32 | ;; | ||
33 | *) | ||
34 | if [ -d ${srctree}/arch/${arch} ]; then | ||
35 | do_command $1 ${arch} | ||
36 | fi | ||
37 | ;; | ||
38 | esac | ||
39 | done | ||
40 | |||
41 | |||
diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl new file mode 100644 index 000000000000..15d53a6b1a1f --- /dev/null +++ b/scripts/headers_check.pl | |||
@@ -0,0 +1,56 @@ | |||
1 | #!/usr/bin/perl | ||
2 | # | ||
3 | # headers_check.pl execute a number of trivial consistency checks | ||
4 | # | ||
5 | # Usage: headers_check.pl dir [files...] | ||
6 | # dir: dir to look for included files | ||
7 | # arch: architecture | ||
8 | # files: list of files to check | ||
9 | # | ||
10 | # The script reads the supplied files line by line and: | ||
11 | # | ||
12 | # 1) for each include statement it checks if the | ||
13 | # included file actually exists. | ||
14 | # Only include files located in asm* and linux* are checked. | ||
15 | # The rest are assumed to be system include files. | ||
16 | # | ||
17 | # 2) TODO: check for leaked CONFIG_ symbols | ||
18 | |||
19 | use strict; | ||
20 | use warnings; | ||
21 | |||
22 | my ($dir, $arch, @files) = @ARGV; | ||
23 | |||
24 | my $ret = 0; | ||
25 | my $line; | ||
26 | my $lineno = 0; | ||
27 | my $filename; | ||
28 | |||
29 | foreach my $file (@files) { | ||
30 | $filename = $file; | ||
31 | open(my $fh, '<', "$filename") or die "$filename: $!\n"; | ||
32 | $lineno = 0; | ||
33 | while ($line = <$fh>) { | ||
34 | $lineno++; | ||
35 | check_include(); | ||
36 | } | ||
37 | close $fh; | ||
38 | } | ||
39 | exit $ret; | ||
40 | |||
41 | sub check_include | ||
42 | { | ||
43 | if ($line =~ m/^\s*#\s*include\s+<((asm|linux).*)>/) { | ||
44 | my $inc = $1; | ||
45 | my $found; | ||
46 | $found = stat($dir . "/" . $inc); | ||
47 | if (!$found) { | ||
48 | $inc =~ s#asm/#asm-$arch/#; | ||
49 | $found = stat($dir . "/" . $inc); | ||
50 | } | ||
51 | if (!$found) { | ||
52 | printf STDERR "$filename:$lineno: included file '$inc' is not exported\n"; | ||
53 | $ret = 1; | ||
54 | } | ||
55 | } | ||
56 | } | ||
diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl new file mode 100644 index 000000000000..68591cd08731 --- /dev/null +++ b/scripts/headers_install.pl | |||
@@ -0,0 +1,45 @@ | |||
1 | #!/usr/bin/perl | ||
2 | # | ||
3 | # headers_install prepare the listed header files for use in | ||
4 | # user space and copy the files to their destination. | ||
5 | # | ||
6 | # Usage: headers_install.pl readdir installdir arch [files...] | ||
7 | # readdir: dir to open files | ||
8 | # installdir: dir to install the files | ||
9 | # arch: current architecture | ||
10 | # arch is used to force a reinstallation when the arch | ||
11 | # changes because kbuild then detect a command line change. | ||
12 | # files: list of files to check | ||
13 | # | ||
14 | # Step in preparation for users space: | ||
15 | # 1) Drop all use of compiler.h definitions | ||
16 | # 2) Drop include of compiler.h | ||
17 | # 3) Drop all sections defined out by __KERNEL__ (using unifdef) | ||
18 | |||
19 | use strict; | ||
20 | use warnings; | ||
21 | |||
22 | my ($readdir, $installdir, $arch, @files) = @ARGV; | ||
23 | |||
24 | my $unifdef = "scripts/unifdef -U__KERNEL__"; | ||
25 | |||
26 | foreach my $file (@files) { | ||
27 | my $tmpfile = "$installdir/$file.tmp"; | ||
28 | open(my $infile, '<', "$readdir/$file") | ||
29 | or die "$readdir/$file: $!\n"; | ||
30 | open(my $outfile, '>', "$tmpfile") or die "$tmpfile: $!\n"; | ||
31 | while (my $line = <$infile>) { | ||
32 | $line =~ s/([\s(])__user\s/$1/g; | ||
33 | $line =~ s/([\s(])__force\s/$1/g; | ||
34 | $line =~ s/([\s(])__iomem\s/$1/g; | ||
35 | $line =~ s/\s__attribute_const__\s/ /g; | ||
36 | $line =~ s/\s__attribute_const__$//g; | ||
37 | $line =~ s/^#include <linux\/compiler.h>//; | ||
38 | printf $outfile "%s", $line; | ||
39 | } | ||
40 | close $outfile; | ||
41 | close $infile; | ||
42 | system $unifdef . " $tmpfile > $installdir/$file"; | ||
43 | unlink $tmpfile; | ||
44 | } | ||
45 | exit 0; | ||
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index fda63136ae68..36b5eedcdc75 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -76,7 +76,6 @@ static void check_stdin(void) | |||
76 | static int conf_askvalue(struct symbol *sym, const char *def) | 76 | static int conf_askvalue(struct symbol *sym, const char *def) |
77 | { | 77 | { |
78 | enum symbol_type type = sym_get_type(sym); | 78 | enum symbol_type type = sym_get_type(sym); |
79 | tristate val; | ||
80 | 79 | ||
81 | if (!sym_has_value(sym)) | 80 | if (!sym_has_value(sym)) |
82 | printf(_("(NEW) ")); | 81 | printf(_("(NEW) ")); |
@@ -92,15 +91,6 @@ static int conf_askvalue(struct symbol *sym, const char *def) | |||
92 | } | 91 | } |
93 | 92 | ||
94 | switch (input_mode) { | 93 | switch (input_mode) { |
95 | case set_no: | ||
96 | case set_mod: | ||
97 | case set_yes: | ||
98 | case set_random: | ||
99 | if (sym_has_value(sym)) { | ||
100 | printf("%s\n", def); | ||
101 | return 0; | ||
102 | } | ||
103 | break; | ||
104 | case ask_new: | 94 | case ask_new: |
105 | case ask_silent: | 95 | case ask_silent: |
106 | if (sym_has_value(sym)) { | 96 | if (sym_has_value(sym)) { |
@@ -112,9 +102,6 @@ static int conf_askvalue(struct symbol *sym, const char *def) | |||
112 | fflush(stdout); | 102 | fflush(stdout); |
113 | fgets(line, 128, stdin); | 103 | fgets(line, 128, stdin); |
114 | return 1; | 104 | return 1; |
115 | case set_default: | ||
116 | printf("%s\n", def); | ||
117 | return 1; | ||
118 | default: | 105 | default: |
119 | break; | 106 | break; |
120 | } | 107 | } |
@@ -128,52 +115,6 @@ static int conf_askvalue(struct symbol *sym, const char *def) | |||
128 | default: | 115 | default: |
129 | ; | 116 | ; |
130 | } | 117 | } |
131 | switch (input_mode) { | ||
132 | case set_yes: | ||
133 | if (sym_tristate_within_range(sym, yes)) { | ||
134 | line[0] = 'y'; | ||
135 | line[1] = '\n'; | ||
136 | line[2] = 0; | ||
137 | break; | ||
138 | } | ||
139 | case set_mod: | ||
140 | if (type == S_TRISTATE) { | ||
141 | if (sym_tristate_within_range(sym, mod)) { | ||
142 | line[0] = 'm'; | ||
143 | line[1] = '\n'; | ||
144 | line[2] = 0; | ||
145 | break; | ||
146 | } | ||
147 | } else { | ||
148 | if (sym_tristate_within_range(sym, yes)) { | ||
149 | line[0] = 'y'; | ||
150 | line[1] = '\n'; | ||
151 | line[2] = 0; | ||
152 | break; | ||
153 | } | ||
154 | } | ||
155 | case set_no: | ||
156 | if (sym_tristate_within_range(sym, no)) { | ||
157 | line[0] = 'n'; | ||
158 | line[1] = '\n'; | ||
159 | line[2] = 0; | ||
160 | break; | ||
161 | } | ||
162 | case set_random: | ||
163 | do { | ||
164 | val = (tristate)(rand() % 3); | ||
165 | } while (!sym_tristate_within_range(sym, val)); | ||
166 | switch (val) { | ||
167 | case no: line[0] = 'n'; break; | ||
168 | case mod: line[0] = 'm'; break; | ||
169 | case yes: line[0] = 'y'; break; | ||
170 | } | ||
171 | line[1] = '\n'; | ||
172 | line[2] = 0; | ||
173 | break; | ||
174 | default: | ||
175 | break; | ||
176 | } | ||
177 | printf("%s", line); | 118 | printf("%s", line); |
178 | return 1; | 119 | return 1; |
179 | } | 120 | } |
@@ -374,15 +315,7 @@ static int conf_choice(struct menu *menu) | |||
374 | else | 315 | else |
375 | continue; | 316 | continue; |
376 | break; | 317 | break; |
377 | case set_random: | 318 | default: |
378 | if (is_new) | ||
379 | def = (rand() % cnt) + 1; | ||
380 | case set_default: | ||
381 | case set_yes: | ||
382 | case set_mod: | ||
383 | case set_no: | ||
384 | cnt = def; | ||
385 | printf("%d\n", cnt); | ||
386 | break; | 319 | break; |
387 | } | 320 | } |
388 | 321 | ||
@@ -494,6 +427,43 @@ static void check_conf(struct menu *menu) | |||
494 | check_conf(child); | 427 | check_conf(child); |
495 | } | 428 | } |
496 | 429 | ||
430 | static void conf_do_update(void) | ||
431 | { | ||
432 | /* Update until a loop caused no more changes */ | ||
433 | do { | ||
434 | conf_cnt = 0; | ||
435 | check_conf(&rootmenu); | ||
436 | } while (conf_cnt); | ||
437 | } | ||
438 | |||
439 | static int conf_silent_update(void) | ||
440 | { | ||
441 | const char *name; | ||
442 | |||
443 | if (conf_get_changed()) { | ||
444 | name = getenv("KCONFIG_NOSILENTUPDATE"); | ||
445 | if (name && *name) { | ||
446 | fprintf(stderr, | ||
447 | _("\n*** Kernel configuration requires explicit update.\n\n")); | ||
448 | return 1; | ||
449 | } | ||
450 | conf_do_update(); | ||
451 | } | ||
452 | return 0; | ||
453 | } | ||
454 | |||
455 | static int conf_update(void) | ||
456 | { | ||
457 | rootEntry = &rootmenu; | ||
458 | conf(&rootmenu); | ||
459 | if (input_mode == ask_all) { | ||
460 | input_mode = ask_silent; | ||
461 | valid_stdin = 1; | ||
462 | } | ||
463 | conf_do_update(); | ||
464 | return 0; | ||
465 | } | ||
466 | |||
497 | int main(int ac, char **av) | 467 | int main(int ac, char **av) |
498 | { | 468 | { |
499 | int opt; | 469 | int opt; |
@@ -599,36 +569,43 @@ int main(int ac, char **av) | |||
599 | default: | 569 | default: |
600 | break; | 570 | break; |
601 | } | 571 | } |
572 | switch (input_mode) { | ||
573 | case set_no: | ||
574 | conf_set_all_new_symbols(def_no); | ||
575 | break; | ||
576 | case set_yes: | ||
577 | conf_set_all_new_symbols(def_yes); | ||
578 | break; | ||
579 | case set_mod: | ||
580 | conf_set_all_new_symbols(def_mod); | ||
581 | break; | ||
582 | case set_random: | ||
583 | conf_set_all_new_symbols(def_random); | ||
584 | break; | ||
585 | case set_default: | ||
586 | conf_set_all_new_symbols(def_default); | ||
587 | break; | ||
588 | case ask_silent: | ||
589 | case ask_new: | ||
590 | if (conf_silent_update()) | ||
591 | exit(1); | ||
592 | break; | ||
593 | case ask_all: | ||
594 | if (conf_update()) | ||
595 | exit(1); | ||
596 | break; | ||
597 | } | ||
602 | 598 | ||
603 | if (input_mode != ask_silent) { | ||
604 | rootEntry = &rootmenu; | ||
605 | conf(&rootmenu); | ||
606 | if (input_mode == ask_all) { | ||
607 | input_mode = ask_silent; | ||
608 | valid_stdin = 1; | ||
609 | } | ||
610 | } else if (conf_get_changed()) { | ||
611 | name = getenv("KCONFIG_NOSILENTUPDATE"); | ||
612 | if (name && *name) { | ||
613 | fprintf(stderr, _("\n*** Kernel configuration requires explicit update.\n\n")); | ||
614 | return 1; | ||
615 | } | ||
616 | } else | ||
617 | goto skip_check; | ||
618 | |||
619 | do { | ||
620 | conf_cnt = 0; | ||
621 | check_conf(&rootmenu); | ||
622 | } while (conf_cnt); | ||
623 | if (conf_write(NULL)) { | 599 | if (conf_write(NULL)) { |
624 | fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); | 600 | fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); |
625 | return 1; | 601 | exit(1); |
626 | } | 602 | } |
627 | skip_check: | 603 | /* ask_silent is used during the build so we shall update autoconf. |
604 | * All other commands are only used to generate a config. | ||
605 | */ | ||
628 | if (input_mode == ask_silent && conf_write_autoconf()) { | 606 | if (input_mode == ask_silent && conf_write_autoconf()) { |
629 | fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); | 607 | fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); |
630 | return 1; | 608 | return 1; |
631 | } | 609 | } |
632 | |||
633 | return 0; | 610 | return 0; |
634 | } | 611 | } |
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index ee5fe943d58d..df6a188b9930 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -222,10 +222,8 @@ load: | |||
222 | continue; | 222 | continue; |
223 | if (def == S_DEF_USER) { | 223 | if (def == S_DEF_USER) { |
224 | sym = sym_find(line + 9); | 224 | sym = sym_find(line + 9); |
225 | if (!sym) { | 225 | if (!sym) |
226 | conf_warning("trying to assign nonexistent symbol %s", line + 9); | ||
227 | break; | 226 | break; |
228 | } | ||
229 | } else { | 227 | } else { |
230 | sym = sym_lookup(line + 9, 0); | 228 | sym = sym_lookup(line + 9, 0); |
231 | if (sym->type == S_UNKNOWN) | 229 | if (sym->type == S_UNKNOWN) |
@@ -261,10 +259,8 @@ load: | |||
261 | } | 259 | } |
262 | if (def == S_DEF_USER) { | 260 | if (def == S_DEF_USER) { |
263 | sym = sym_find(line + 7); | 261 | sym = sym_find(line + 7); |
264 | if (!sym) { | 262 | if (!sym) |
265 | conf_warning("trying to assign nonexistent symbol %s", line + 7); | ||
266 | break; | 263 | break; |
267 | } | ||
268 | } else { | 264 | } else { |
269 | sym = sym_lookup(line + 7, 0); | 265 | sym = sym_lookup(line + 7, 0); |
270 | if (sym->type == S_UNKNOWN) | 266 | if (sym->type == S_UNKNOWN) |
@@ -812,3 +808,73 @@ void conf_set_changed_callback(void (*fn)(void)) | |||
812 | { | 808 | { |
813 | conf_changed_callback = fn; | 809 | conf_changed_callback = fn; |
814 | } | 810 | } |
811 | |||
812 | |||
813 | void conf_set_all_new_symbols(enum conf_def_mode mode) | ||
814 | { | ||
815 | struct symbol *sym, *csym; | ||
816 | struct property *prop; | ||
817 | struct expr *e; | ||
818 | int i, cnt, def; | ||
819 | |||
820 | for_all_symbols(i, sym) { | ||
821 | if (sym_has_value(sym)) | ||
822 | continue; | ||
823 | switch (sym_get_type(sym)) { | ||
824 | case S_BOOLEAN: | ||
825 | case S_TRISTATE: | ||
826 | switch (mode) { | ||
827 | case def_yes: | ||
828 | sym->def[S_DEF_USER].tri = yes; | ||
829 | break; | ||
830 | case def_mod: | ||
831 | sym->def[S_DEF_USER].tri = mod; | ||
832 | break; | ||
833 | case def_no: | ||
834 | sym->def[S_DEF_USER].tri = no; | ||
835 | break; | ||
836 | case def_random: | ||
837 | sym->def[S_DEF_USER].tri = (tristate)(rand() % 3); | ||
838 | break; | ||
839 | default: | ||
840 | continue; | ||
841 | } | ||
842 | if (!sym_is_choice(sym) || mode != def_random) | ||
843 | sym->flags |= SYMBOL_DEF_USER; | ||
844 | break; | ||
845 | default: | ||
846 | break; | ||
847 | } | ||
848 | |||
849 | } | ||
850 | |||
851 | if (modules_sym) | ||
852 | sym_calc_value(modules_sym); | ||
853 | |||
854 | if (mode != def_random) | ||
855 | return; | ||
856 | |||
857 | for_all_symbols(i, csym) { | ||
858 | if (sym_has_value(csym) || !sym_is_choice(csym)) | ||
859 | continue; | ||
860 | |||
861 | sym_calc_value(csym); | ||
862 | prop = sym_get_choice_prop(csym); | ||
863 | def = -1; | ||
864 | while (1) { | ||
865 | cnt = 0; | ||
866 | expr_list_for_each_sym(prop->expr, e, sym) { | ||
867 | if (sym->visible == no) | ||
868 | continue; | ||
869 | if (def == cnt++) { | ||
870 | csym->def[S_DEF_USER].val = sym; | ||
871 | break; | ||
872 | } | ||
873 | } | ||
874 | if (def >= 0 || cnt < 2) | ||
875 | break; | ||
876 | def = (rand() % cnt) + 1; | ||
877 | } | ||
878 | csym->flags |= SYMBOL_DEF_USER; | ||
879 | } | ||
880 | } | ||
diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped index 6a61cee4a32c..7342ce0a7780 100644 --- a/scripts/kconfig/lex.zconf.c_shipped +++ b/scripts/kconfig/lex.zconf.c_shipped | |||
@@ -5,10 +5,29 @@ | |||
5 | 5 | ||
6 | /* A lexical scanner generated by flex */ | 6 | /* A lexical scanner generated by flex */ |
7 | 7 | ||
8 | #define yy_create_buffer zconf_create_buffer | ||
9 | #define yy_delete_buffer zconf_delete_buffer | ||
10 | #define yy_flex_debug zconf_flex_debug | ||
11 | #define yy_init_buffer zconf_init_buffer | ||
12 | #define yy_flush_buffer zconf_flush_buffer | ||
13 | #define yy_load_buffer_state zconf_load_buffer_state | ||
14 | #define yy_switch_to_buffer zconf_switch_to_buffer | ||
15 | #define yyin zconfin | ||
16 | #define yyleng zconfleng | ||
17 | #define yylex zconflex | ||
18 | #define yylineno zconflineno | ||
19 | #define yyout zconfout | ||
20 | #define yyrestart zconfrestart | ||
21 | #define yytext zconftext | ||
22 | #define yywrap zconfwrap | ||
23 | #define yyalloc zconfalloc | ||
24 | #define yyrealloc zconfrealloc | ||
25 | #define yyfree zconffree | ||
26 | |||
8 | #define FLEX_SCANNER | 27 | #define FLEX_SCANNER |
9 | #define YY_FLEX_MAJOR_VERSION 2 | 28 | #define YY_FLEX_MAJOR_VERSION 2 |
10 | #define YY_FLEX_MINOR_VERSION 5 | 29 | #define YY_FLEX_MINOR_VERSION 5 |
11 | #define YY_FLEX_SUBMINOR_VERSION 33 | 30 | #define YY_FLEX_SUBMINOR_VERSION 35 |
12 | #if YY_FLEX_SUBMINOR_VERSION > 0 | 31 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
13 | #define FLEX_BETA | 32 | #define FLEX_BETA |
14 | #endif | 33 | #endif |
@@ -30,7 +49,7 @@ | |||
30 | 49 | ||
31 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ | 50 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
32 | 51 | ||
33 | #if __STDC_VERSION__ >= 199901L | 52 | #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
34 | 53 | ||
35 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, | 54 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
36 | * if you want the limit (max/min) macros for int types. | 55 | * if you want the limit (max/min) macros for int types. |
@@ -53,7 +72,6 @@ typedef int flex_int32_t; | |||
53 | typedef unsigned char flex_uint8_t; | 72 | typedef unsigned char flex_uint8_t; |
54 | typedef unsigned short int flex_uint16_t; | 73 | typedef unsigned short int flex_uint16_t; |
55 | typedef unsigned int flex_uint32_t; | 74 | typedef unsigned int flex_uint32_t; |
56 | #endif /* ! C99 */ | ||
57 | 75 | ||
58 | /* Limits of integral types. */ | 76 | /* Limits of integral types. */ |
59 | #ifndef INT8_MIN | 77 | #ifndef INT8_MIN |
@@ -84,6 +102,8 @@ typedef unsigned int flex_uint32_t; | |||
84 | #define UINT32_MAX (4294967295U) | 102 | #define UINT32_MAX (4294967295U) |
85 | #endif | 103 | #endif |
86 | 104 | ||
105 | #endif /* ! C99 */ | ||
106 | |||
87 | #endif /* ! FLEXINT_H */ | 107 | #endif /* ! FLEXINT_H */ |
88 | 108 | ||
89 | #ifdef __cplusplus | 109 | #ifdef __cplusplus |
@@ -93,11 +113,12 @@ typedef unsigned int flex_uint32_t; | |||
93 | 113 | ||
94 | #else /* ! __cplusplus */ | 114 | #else /* ! __cplusplus */ |
95 | 115 | ||
96 | #if __STDC__ | 116 | /* C99 requires __STDC__ to be defined as 1. */ |
117 | #if defined (__STDC__) | ||
97 | 118 | ||
98 | #define YY_USE_CONST | 119 | #define YY_USE_CONST |
99 | 120 | ||
100 | #endif /* __STDC__ */ | 121 | #endif /* defined (__STDC__) */ |
101 | #endif /* ! __cplusplus */ | 122 | #endif /* ! __cplusplus */ |
102 | 123 | ||
103 | #ifdef YY_USE_CONST | 124 | #ifdef YY_USE_CONST |
@@ -177,14 +198,9 @@ extern FILE *zconfin, *zconfout; | |||
177 | 198 | ||
178 | #define unput(c) yyunput( c, (yytext_ptr) ) | 199 | #define unput(c) yyunput( c, (yytext_ptr) ) |
179 | 200 | ||
180 | /* The following is because we cannot portably get our hands on size_t | ||
181 | * (without autoconf's help, which isn't available because we want | ||
182 | * flex-generated scanners to compile on their own). | ||
183 | */ | ||
184 | |||
185 | #ifndef YY_TYPEDEF_YY_SIZE_T | 201 | #ifndef YY_TYPEDEF_YY_SIZE_T |
186 | #define YY_TYPEDEF_YY_SIZE_T | 202 | #define YY_TYPEDEF_YY_SIZE_T |
187 | typedef unsigned int yy_size_t; | 203 | typedef size_t yy_size_t; |
188 | #endif | 204 | #endif |
189 | 205 | ||
190 | #ifndef YY_STRUCT_YY_BUFFER_STATE | 206 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
@@ -335,7 +351,7 @@ void zconffree (void * ); | |||
335 | 351 | ||
336 | /* Begin user sect3 */ | 352 | /* Begin user sect3 */ |
337 | 353 | ||
338 | #define zconfwrap() 1 | 354 | #define zconfwrap(n) 1 |
339 | #define YY_SKIP_YYWRAP | 355 | #define YY_SKIP_YYWRAP |
340 | 356 | ||
341 | typedef unsigned char YY_CHAR; | 357 | typedef unsigned char YY_CHAR; |
@@ -748,6 +764,7 @@ int zconf_flex_debug = 0; | |||
748 | #define YY_MORE_ADJ 0 | 764 | #define YY_MORE_ADJ 0 |
749 | #define YY_RESTORE_YY_MORE_OFFSET | 765 | #define YY_RESTORE_YY_MORE_OFFSET |
750 | char *zconftext; | 766 | char *zconftext; |
767 | #define YY_NO_INPUT 1 | ||
751 | 768 | ||
752 | /* | 769 | /* |
753 | * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> | 770 | * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> |
@@ -834,6 +851,35 @@ void alloc_string(const char *str, int size) | |||
834 | 851 | ||
835 | static int yy_init_globals (void ); | 852 | static int yy_init_globals (void ); |
836 | 853 | ||
854 | /* Accessor methods to globals. | ||
855 | These are made visible to non-reentrant scanners for convenience. */ | ||
856 | |||
857 | int zconflex_destroy (void ); | ||
858 | |||
859 | int zconfget_debug (void ); | ||
860 | |||
861 | void zconfset_debug (int debug_flag ); | ||
862 | |||
863 | YY_EXTRA_TYPE zconfget_extra (void ); | ||
864 | |||
865 | void zconfset_extra (YY_EXTRA_TYPE user_defined ); | ||
866 | |||
867 | FILE *zconfget_in (void ); | ||
868 | |||
869 | void zconfset_in (FILE * in_str ); | ||
870 | |||
871 | FILE *zconfget_out (void ); | ||
872 | |||
873 | void zconfset_out (FILE * out_str ); | ||
874 | |||
875 | int zconfget_leng (void ); | ||
876 | |||
877 | char *zconfget_text (void ); | ||
878 | |||
879 | int zconfget_lineno (void ); | ||
880 | |||
881 | void zconfset_lineno (int line_number ); | ||
882 | |||
837 | /* Macros after this point can all be overridden by user definitions in | 883 | /* Macros after this point can all be overridden by user definitions in |
838 | * section 1. | 884 | * section 1. |
839 | */ | 885 | */ |
@@ -876,7 +922,7 @@ static int input (void ); | |||
876 | /* This used to be an fputs(), but since the string might contain NUL's, | 922 | /* This used to be an fputs(), but since the string might contain NUL's, |
877 | * we now use fwrite(). | 923 | * we now use fwrite(). |
878 | */ | 924 | */ |
879 | #define ECHO (void) fwrite( zconftext, zconfleng, 1, zconfout ) | 925 | #define ECHO fwrite( zconftext, zconfleng, 1, zconfout ) |
880 | #endif | 926 | #endif |
881 | 927 | ||
882 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | 928 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
@@ -1540,6 +1586,14 @@ static int yy_get_next_buffer (void) | |||
1540 | else | 1586 | else |
1541 | ret_val = EOB_ACT_CONTINUE_SCAN; | 1587 | ret_val = EOB_ACT_CONTINUE_SCAN; |
1542 | 1588 | ||
1589 | if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { | ||
1590 | /* Extend the array by 50%, plus the number we really need. */ | ||
1591 | yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); | ||
1592 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) zconfrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); | ||
1593 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) | ||
1594 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); | ||
1595 | } | ||
1596 | |||
1543 | (yy_n_chars) += number_to_move; | 1597 | (yy_n_chars) += number_to_move; |
1544 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; | 1598 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; |
1545 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; | 1599 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; |
@@ -1926,7 +1980,9 @@ static void zconfensure_buffer_stack (void) | |||
1926 | (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc | 1980 | (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc |
1927 | (num_to_alloc * sizeof(struct yy_buffer_state*) | 1981 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
1928 | ); | 1982 | ); |
1929 | 1983 | if ( ! (yy_buffer_stack) ) | |
1984 | YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" ); | ||
1985 | |||
1930 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); | 1986 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
1931 | 1987 | ||
1932 | (yy_buffer_stack_max) = num_to_alloc; | 1988 | (yy_buffer_stack_max) = num_to_alloc; |
@@ -1944,6 +2000,8 @@ static void zconfensure_buffer_stack (void) | |||
1944 | ((yy_buffer_stack), | 2000 | ((yy_buffer_stack), |
1945 | num_to_alloc * sizeof(struct yy_buffer_state*) | 2001 | num_to_alloc * sizeof(struct yy_buffer_state*) |
1946 | ); | 2002 | ); |
2003 | if ( ! (yy_buffer_stack) ) | ||
2004 | YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" ); | ||
1947 | 2005 | ||
1948 | /* zero only the new slots.*/ | 2006 | /* zero only the new slots.*/ |
1949 | memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); | 2007 | memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); |
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h index 96521cb087ec..4a9af6f7886b 100644 --- a/scripts/kconfig/lkc.h +++ b/scripts/kconfig/lkc.h | |||
@@ -42,6 +42,14 @@ extern "C" { | |||
42 | #define TF_PARAM 0x0002 | 42 | #define TF_PARAM 0x0002 |
43 | #define TF_OPTION 0x0004 | 43 | #define TF_OPTION 0x0004 |
44 | 44 | ||
45 | enum conf_def_mode { | ||
46 | def_default, | ||
47 | def_yes, | ||
48 | def_mod, | ||
49 | def_no, | ||
50 | def_random | ||
51 | }; | ||
52 | |||
45 | #define T_OPT_MODULES 1 | 53 | #define T_OPT_MODULES 1 |
46 | #define T_OPT_DEFCONFIG_LIST 2 | 54 | #define T_OPT_DEFCONFIG_LIST 2 |
47 | #define T_OPT_ENV 3 | 55 | #define T_OPT_ENV 3 |
@@ -69,6 +77,7 @@ const char *conf_get_configname(void); | |||
69 | char *conf_get_default_confname(void); | 77 | char *conf_get_default_confname(void); |
70 | void sym_set_change_count(int count); | 78 | void sym_set_change_count(int count); |
71 | void sym_add_change_count(int count); | 79 | void sym_add_change_count(int count); |
80 | void conf_set_all_new_symbols(enum conf_def_mode mode); | ||
72 | 81 | ||
73 | /* kconfig_load.c */ | 82 | /* kconfig_load.c */ |
74 | void kconfig_load(void); | 83 | void kconfig_load(void); |
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 4cea5c85cd0a..5164ef7ce499 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l | |||
@@ -1,5 +1,6 @@ | |||
1 | %option backup nostdinit noyywrap never-interactive full ecs | 1 | %option backup nostdinit noyywrap never-interactive full ecs |
2 | %option 8bit backup nodefault perf-report perf-report | 2 | %option 8bit backup nodefault perf-report perf-report |
3 | %option noinput | ||
3 | %x COMMAND HELP STRING PARAM | 4 | %x COMMAND HELP STRING PARAM |
4 | %{ | 5 | %{ |
5 | /* | 6 | /* |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 88e3934a8b8c..ff787e6ff8ed 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1403,7 +1403,7 @@ sub dump_struct($$) { | |||
1403 | my $members = $3; | 1403 | my $members = $3; |
1404 | 1404 | ||
1405 | # ignore embedded structs or unions | 1405 | # ignore embedded structs or unions |
1406 | $members =~ s/{.*?}//g; | 1406 | $members =~ s/{.*}//g; |
1407 | 1407 | ||
1408 | # ignore members marked private: | 1408 | # ignore members marked private: |
1409 | $members =~ s/\/\*.*?private:.*?public:.*?\*\///gos; | 1409 | $members =~ s/\/\*.*?private:.*?public:.*?\*\///gos; |
@@ -1643,6 +1643,7 @@ sub dump_function($$) { | |||
1643 | $prototype =~ s/^__always_inline +//; | 1643 | $prototype =~ s/^__always_inline +//; |
1644 | $prototype =~ s/^noinline +//; | 1644 | $prototype =~ s/^noinline +//; |
1645 | $prototype =~ s/__devinit +//; | 1645 | $prototype =~ s/__devinit +//; |
1646 | $prototype =~ s/__init +//; | ||
1646 | $prototype =~ s/^#define\s+//; #ak added | 1647 | $prototype =~ s/^#define\s+//; #ak added |
1647 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; | 1648 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; |
1648 | 1649 | ||
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 8f038e6d5f98..418cd7dbbc93 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -1468,7 +1468,7 @@ static void section_rel(const char *modname, struct elf_info *elf, | |||
1468 | * marked __initdata will be discarded when the module has been intialized. | 1468 | * marked __initdata will be discarded when the module has been intialized. |
1469 | * Likewise for modules used built-in the sections marked __exit | 1469 | * Likewise for modules used built-in the sections marked __exit |
1470 | * are discarded because __exit marked function are supposed to be called | 1470 | * are discarded because __exit marked function are supposed to be called |
1471 | * only when a moduel is unloaded which never happes for built-in modules. | 1471 | * only when a module is unloaded which never happens for built-in modules. |
1472 | * The check_sec_ref() function traverses all relocation records | 1472 | * The check_sec_ref() function traverses all relocation records |
1473 | * to find all references to a section that reference a section that will | 1473 | * to find all references to a section that reference a section that will |
1474 | * be discarded and warns about it. | 1474 | * be discarded and warns about it. |
diff --git a/scripts/patch-kernel b/scripts/patch-kernel index ece46ef0ba54..46a59cae3a0a 100755 --- a/scripts/patch-kernel +++ b/scripts/patch-kernel | |||
@@ -213,6 +213,7 @@ fi | |||
213 | if [ $stopvers != "default" ]; then | 213 | if [ $stopvers != "default" ]; then |
214 | STOPSUBLEVEL=`echo $stopvers | cut -d. -f3` | 214 | STOPSUBLEVEL=`echo $stopvers | cut -d. -f3` |
215 | STOPEXTRA=`echo $stopvers | cut -d. -f4` | 215 | STOPEXTRA=`echo $stopvers | cut -d. -f4` |
216 | STOPFULLVERSION=${stopvers%%.$STOPEXTRA} | ||
216 | #echo "#___STOPSUBLEVEL=/$STOPSUBLEVEL/, STOPEXTRA=/$STOPEXTRA/" | 217 | #echo "#___STOPSUBLEVEL=/$STOPSUBLEVEL/, STOPEXTRA=/$STOPEXTRA/" |
217 | else | 218 | else |
218 | STOPSUBLEVEL=9999 | 219 | STOPSUBLEVEL=9999 |
@@ -249,7 +250,7 @@ while : # incrementing SUBLEVEL (s in v.p.s) | |||
249 | do | 250 | do |
250 | CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" | 251 | CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" |
251 | EXTRAVER= | 252 | EXTRAVER= |
252 | if [ $stopvers = $CURRENTFULLVERSION ]; then | 253 | if [ $STOPFULLVERSION = $CURRENTFULLVERSION ]; then |
253 | echo "Stopping at $CURRENTFULLVERSION base as requested." | 254 | echo "Stopping at $CURRENTFULLVERSION base as requested." |
254 | break | 255 | break |
255 | fi | 256 | fi |
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 1c1bdaf7348a..83b75126c9f7 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion | |||
@@ -12,7 +12,9 @@ cd "${1:-.}" || usage | |||
12 | if head=`git rev-parse --verify HEAD 2>/dev/null`; then | 12 | if head=`git rev-parse --verify HEAD 2>/dev/null`; then |
13 | # Do we have an untagged version? | 13 | # Do we have an untagged version? |
14 | if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then | 14 | if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then |
15 | git describe | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' | 15 | if tag=`git describe 2>/dev/null`; then |
16 | echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' | ||
17 | fi | ||
16 | fi | 18 | fi |
17 | 19 | ||
18 | # Are there uncommitted changes? | 20 | # Are there uncommitted changes? |
diff --git a/scripts/ver_linux b/scripts/ver_linux index 7ac0e309be09..dbb3037f1346 100755 --- a/scripts/ver_linux +++ b/scripts/ver_linux | |||
@@ -4,7 +4,6 @@ | |||
4 | # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may | 4 | # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may |
5 | # differ on your system. | 5 | # differ on your system. |
6 | # | 6 | # |
7 | PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:$PATH | ||
8 | echo 'If some fields are empty or look unusual you may have an old version.' | 7 | echo 'If some fields are empty or look unusual you may have an old version.' |
9 | echo 'Compare to the current minimal requirements in Documentation/Changes.' | 8 | echo 'Compare to the current minimal requirements in Documentation/Changes.' |
10 | echo ' ' | 9 | echo ' ' |