diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.lib | 3 | ||||
| -rw-r--r-- | scripts/Makefile.modinst | 3 | ||||
| -rwxr-xr-x | scripts/checkpatch.pl | 6 | ||||
| -rw-r--r-- | scripts/dtc/Makefile | 2 | ||||
| -rw-r--r-- | scripts/headers_install.pl | 3 | ||||
| -rw-r--r-- | scripts/kconfig/expr.h | 5 | ||||
| -rw-r--r-- | scripts/kconfig/list.h | 91 | ||||
| -rw-r--r-- | scripts/kconfig/lkc_proto.h | 4 | ||||
| -rw-r--r-- | scripts/kconfig/mconf.c | 6 | ||||
| -rw-r--r-- | scripts/kconfig/menu.c | 14 | ||||
| -rwxr-xr-x | scripts/kernel-doc | 34 | ||||
| -rw-r--r-- | scripts/mod/modpost.c | 24 | ||||
| -rwxr-xr-x | scripts/sign-file | 6 | ||||
| -rw-r--r-- | scripts/sortextable.c | 1 |
14 files changed, 168 insertions, 34 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 0be6f110cce7..bdf42fdf64c9 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
| @@ -266,6 +266,9 @@ $(obj)/%.dtb.S: $(obj)/%.dtb | |||
| 266 | quiet_cmd_dtc = DTC $@ | 266 | quiet_cmd_dtc = DTC $@ |
| 267 | cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $< | 267 | cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $< |
| 268 | 268 | ||
| 269 | $(obj)/%.dtb: $(src)/%.dts FORCE | ||
| 270 | $(call if_changed_dep,dtc) | ||
| 271 | |||
| 269 | # Bzip2 | 272 | # Bzip2 |
| 270 | # --------------------------------------------------------------------------- | 273 | # --------------------------------------------------------------------------- |
| 271 | 274 | ||
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index dda4b2b61927..ecbb44797e28 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst | |||
| @@ -16,8 +16,9 @@ PHONY += $(modules) | |||
| 16 | __modinst: $(modules) | 16 | __modinst: $(modules) |
| 17 | @: | 17 | @: |
| 18 | 18 | ||
| 19 | # Don't stop modules_install if we can't sign external modules. | ||
| 19 | quiet_cmd_modules_install = INSTALL $@ | 20 | quiet_cmd_modules_install = INSTALL $@ |
| 20 | cmd_modules_install = mkdir -p $(2); cp $@ $(2) ; $(mod_strip_cmd) $(2)/$(notdir $@) ; $(mod_sign_cmd) $(2)/$(notdir $@) | 21 | cmd_modules_install = mkdir -p $(2); cp $@ $(2) ; $(mod_strip_cmd) $(2)/$(notdir $@) ; $(mod_sign_cmd) $(2)/$(notdir $@) $(patsubst %,|| true,$(KBUILD_EXTMOD)) |
| 21 | 22 | ||
| 22 | # Modules built outside the kernel source tree go into extra by default | 23 | # Modules built outside the kernel source tree go into extra by default |
| 23 | INSTALL_MOD_DIR ?= extra | 24 | INSTALL_MOD_DIR ?= extra |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 21a9f5de0a21..f18750e3bd6c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -1890,8 +1890,10 @@ sub process { | |||
| 1890 | } | 1890 | } |
| 1891 | 1891 | ||
| 1892 | if ($realfile =~ m@^(drivers/net/|net/)@ && | 1892 | if ($realfile =~ m@^(drivers/net/|net/)@ && |
| 1893 | $rawline !~ m@^\+[ \t]*(\/\*|\*\/)@ && | 1893 | $rawline !~ m@^\+[ \t]*\*/[ \t]*$@ && #trailing */ |
| 1894 | $rawline =~ m@^\+[ \t]*.+\*\/[ \t]*$@) { | 1894 | $rawline !~ m@^\+.*/\*.*\*/[ \t]*$@ && #inline /*...*/ |
| 1895 | $rawline !~ m@^\+.*\*{2,}/[ \t]*$@ && #trailing **/ | ||
| 1896 | $rawline =~ m@^\+[ \t]*.+\*\/[ \t]*$@) { #non blank */ | ||
| 1895 | WARN("NETWORKING_BLOCK_COMMENT_STYLE", | 1897 | WARN("NETWORKING_BLOCK_COMMENT_STYLE", |
| 1896 | "networking block comments put the trailing */ on a separate line\n" . $herecurr); | 1898 | "networking block comments put the trailing */ on a separate line\n" . $herecurr); |
| 1897 | } | 1899 | } |
diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile index 6d1c6bb9f224..2a48022c41e7 100644 --- a/scripts/dtc/Makefile +++ b/scripts/dtc/Makefile | |||
| @@ -27,3 +27,5 @@ HOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC) | |||
| 27 | # dependencies on generated files need to be listed explicitly | 27 | # dependencies on generated files need to be listed explicitly |
| 28 | $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h | 28 | $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h |
| 29 | 29 | ||
| 30 | # generated files need to be cleaned explicitly | ||
| 31 | clean-files := dtc-lexer.lex.c dtc-parser.tab.c dtc-parser.tab.h | ||
diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index 239d22d4207b..6c353ae8a451 100644 --- a/scripts/headers_install.pl +++ b/scripts/headers_install.pl | |||
| @@ -42,6 +42,9 @@ foreach my $filename (@files) { | |||
| 42 | $line =~ s/(^|\s)(inline)\b/$1__$2__/g; | 42 | $line =~ s/(^|\s)(inline)\b/$1__$2__/g; |
| 43 | $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; | 43 | $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; |
| 44 | $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g; | 44 | $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g; |
| 45 | $line =~ s/#ifndef _UAPI/#ifndef /; | ||
| 46 | $line =~ s/#define _UAPI/#define /; | ||
| 47 | $line =~ s!#endif /[*] _UAPI!#endif /* !; | ||
| 45 | printf {$out} "%s", $line; | 48 | printf {$out} "%s", $line; |
| 46 | } | 49 | } |
| 47 | close $out; | 50 | close $out; |
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index bd2e09895553..cdd48600e02a 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h | |||
| @@ -12,7 +12,7 @@ extern "C" { | |||
| 12 | 12 | ||
| 13 | #include <assert.h> | 13 | #include <assert.h> |
| 14 | #include <stdio.h> | 14 | #include <stdio.h> |
| 15 | #include <sys/queue.h> | 15 | #include "list.h" |
| 16 | #ifndef __cplusplus | 16 | #ifndef __cplusplus |
| 17 | #include <stdbool.h> | 17 | #include <stdbool.h> |
| 18 | #endif | 18 | #endif |
| @@ -175,12 +175,11 @@ struct menu { | |||
| 175 | #define MENU_ROOT 0x0002 | 175 | #define MENU_ROOT 0x0002 |
| 176 | 176 | ||
| 177 | struct jump_key { | 177 | struct jump_key { |
| 178 | CIRCLEQ_ENTRY(jump_key) entries; | 178 | struct list_head entries; |
| 179 | size_t offset; | 179 | size_t offset; |
| 180 | struct menu *target; | 180 | struct menu *target; |
| 181 | int index; | 181 | int index; |
| 182 | }; | 182 | }; |
| 183 | CIRCLEQ_HEAD(jk_head, jump_key); | ||
| 184 | 183 | ||
| 185 | #define JUMP_NB 9 | 184 | #define JUMP_NB 9 |
| 186 | 185 | ||
diff --git a/scripts/kconfig/list.h b/scripts/kconfig/list.h new file mode 100644 index 000000000000..0ae730be5f49 --- /dev/null +++ b/scripts/kconfig/list.h | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | #ifndef LIST_H | ||
| 2 | #define LIST_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Copied from include/linux/... | ||
| 6 | */ | ||
| 7 | |||
| 8 | #undef offsetof | ||
| 9 | #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) | ||
| 10 | |||
| 11 | /** | ||
| 12 | * container_of - cast a member of a structure out to the containing structure | ||
| 13 | * @ptr: the pointer to the member. | ||
| 14 | * @type: the type of the container struct this is embedded in. | ||
| 15 | * @member: the name of the member within the struct. | ||
| 16 | * | ||
| 17 | */ | ||
| 18 | #define container_of(ptr, type, member) ({ \ | ||
| 19 | const typeof( ((type *)0)->member ) *__mptr = (ptr); \ | ||
| 20 | (type *)( (char *)__mptr - offsetof(type,member) );}) | ||
| 21 | |||
| 22 | |||
| 23 | struct list_head { | ||
| 24 | struct list_head *next, *prev; | ||
| 25 | }; | ||
| 26 | |||
| 27 | |||
| 28 | #define LIST_HEAD_INIT(name) { &(name), &(name) } | ||
| 29 | |||
| 30 | #define LIST_HEAD(name) \ | ||
| 31 | struct list_head name = LIST_HEAD_INIT(name) | ||
| 32 | |||
| 33 | /** | ||
| 34 | * list_entry - get the struct for this entry | ||
| 35 | * @ptr: the &struct list_head pointer. | ||
| 36 | * @type: the type of the struct this is embedded in. | ||
| 37 | * @member: the name of the list_struct within the struct. | ||
| 38 | */ | ||
| 39 | #define list_entry(ptr, type, member) \ | ||
| 40 | container_of(ptr, type, member) | ||
| 41 | |||
| 42 | /** | ||
| 43 | * list_for_each_entry - iterate over list of given type | ||
| 44 | * @pos: the type * to use as a loop cursor. | ||
| 45 | * @head: the head for your list. | ||
| 46 | * @member: the name of the list_struct within the struct. | ||
| 47 | */ | ||
| 48 | #define list_for_each_entry(pos, head, member) \ | ||
| 49 | for (pos = list_entry((head)->next, typeof(*pos), member); \ | ||
| 50 | &pos->member != (head); \ | ||
| 51 | pos = list_entry(pos->member.next, typeof(*pos), member)) | ||
| 52 | |||
| 53 | /** | ||
| 54 | * list_empty - tests whether a list is empty | ||
| 55 | * @head: the list to test. | ||
| 56 | */ | ||
| 57 | static inline int list_empty(const struct list_head *head) | ||
| 58 | { | ||
| 59 | return head->next == head; | ||
| 60 | } | ||
| 61 | |||
| 62 | /* | ||
| 63 | * Insert a new entry between two known consecutive entries. | ||
| 64 | * | ||
| 65 | * This is only for internal list manipulation where we know | ||
| 66 | * the prev/next entries already! | ||
| 67 | */ | ||
| 68 | static inline void __list_add(struct list_head *_new, | ||
| 69 | struct list_head *prev, | ||
| 70 | struct list_head *next) | ||
| 71 | { | ||
| 72 | next->prev = _new; | ||
| 73 | _new->next = next; | ||
| 74 | _new->prev = prev; | ||
| 75 | prev->next = _new; | ||
| 76 | } | ||
| 77 | |||
| 78 | /** | ||
| 79 | * list_add_tail - add a new entry | ||
| 80 | * @new: new entry to be added | ||
| 81 | * @head: list head to add it before | ||
| 82 | * | ||
| 83 | * Insert a new entry before the specified head. | ||
| 84 | * This is useful for implementing queues. | ||
| 85 | */ | ||
| 86 | static inline void list_add_tail(struct list_head *_new, struct list_head *head) | ||
| 87 | { | ||
| 88 | __list_add(_new, head->prev, head); | ||
| 89 | } | ||
| 90 | |||
| 91 | #endif | ||
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h index 1d1c08537f1e..ef1a7381f956 100644 --- a/scripts/kconfig/lkc_proto.h +++ b/scripts/kconfig/lkc_proto.h | |||
| @@ -21,9 +21,9 @@ P(menu_get_root_menu,struct menu *,(struct menu *menu)); | |||
| 21 | P(menu_get_parent_menu,struct menu *,(struct menu *menu)); | 21 | P(menu_get_parent_menu,struct menu *,(struct menu *menu)); |
| 22 | P(menu_has_help,bool,(struct menu *menu)); | 22 | P(menu_has_help,bool,(struct menu *menu)); |
| 23 | P(menu_get_help,const char *,(struct menu *menu)); | 23 | P(menu_get_help,const char *,(struct menu *menu)); |
| 24 | P(get_symbol_str, void, (struct gstr *r, struct symbol *sym, struct jk_head | 24 | P(get_symbol_str, void, (struct gstr *r, struct symbol *sym, struct list_head |
| 25 | *head)); | 25 | *head)); |
| 26 | P(get_relations_str, struct gstr, (struct symbol **sym_arr, struct jk_head | 26 | P(get_relations_str, struct gstr, (struct symbol **sym_arr, struct list_head |
| 27 | *head)); | 27 | *head)); |
| 28 | P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help)); | 28 | P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help)); |
| 29 | 29 | ||
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 48f67448af7b..53975cf87608 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c | |||
| @@ -312,7 +312,7 @@ static void set_config_filename(const char *config_filename) | |||
| 312 | 312 | ||
| 313 | 313 | ||
| 314 | struct search_data { | 314 | struct search_data { |
| 315 | struct jk_head *head; | 315 | struct list_head *head; |
| 316 | struct menu **targets; | 316 | struct menu **targets; |
| 317 | int *keys; | 317 | int *keys; |
| 318 | }; | 318 | }; |
| @@ -323,7 +323,7 @@ static void update_text(char *buf, size_t start, size_t end, void *_data) | |||
| 323 | struct jump_key *pos; | 323 | struct jump_key *pos; |
| 324 | int k = 0; | 324 | int k = 0; |
| 325 | 325 | ||
| 326 | CIRCLEQ_FOREACH(pos, data->head, entries) { | 326 | list_for_each_entry(pos, data->head, entries) { |
| 327 | if (pos->offset >= start && pos->offset < end) { | 327 | if (pos->offset >= start && pos->offset < end) { |
| 328 | char header[4]; | 328 | char header[4]; |
| 329 | 329 | ||
| @@ -375,7 +375,7 @@ again: | |||
| 375 | 375 | ||
| 376 | sym_arr = sym_re_search(dialog_input); | 376 | sym_arr = sym_re_search(dialog_input); |
| 377 | do { | 377 | do { |
| 378 | struct jk_head head = CIRCLEQ_HEAD_INITIALIZER(head); | 378 | LIST_HEAD(head); |
| 379 | struct menu *targets[JUMP_NB]; | 379 | struct menu *targets[JUMP_NB]; |
| 380 | int keys[JUMP_NB + 1], i; | 380 | int keys[JUMP_NB + 1], i; |
| 381 | struct search_data data = { | 381 | struct search_data data = { |
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index a3cade659f89..e98a05c8e508 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c | |||
| @@ -508,7 +508,7 @@ const char *menu_get_help(struct menu *menu) | |||
| 508 | } | 508 | } |
| 509 | 509 | ||
| 510 | static void get_prompt_str(struct gstr *r, struct property *prop, | 510 | static void get_prompt_str(struct gstr *r, struct property *prop, |
| 511 | struct jk_head *head) | 511 | struct list_head *head) |
| 512 | { | 512 | { |
| 513 | int i, j; | 513 | int i, j; |
| 514 | struct menu *submenu[8], *menu, *location = NULL; | 514 | struct menu *submenu[8], *menu, *location = NULL; |
| @@ -544,12 +544,13 @@ static void get_prompt_str(struct gstr *r, struct property *prop, | |||
| 544 | } else | 544 | } else |
| 545 | jump->target = location; | 545 | jump->target = location; |
| 546 | 546 | ||
| 547 | if (CIRCLEQ_EMPTY(head)) | 547 | if (list_empty(head)) |
| 548 | jump->index = 0; | 548 | jump->index = 0; |
| 549 | else | 549 | else |
| 550 | jump->index = CIRCLEQ_LAST(head)->index + 1; | 550 | jump->index = list_entry(head->prev, struct jump_key, |
| 551 | entries)->index + 1; | ||
| 551 | 552 | ||
| 552 | CIRCLEQ_INSERT_TAIL(head, jump, entries); | 553 | list_add_tail(&jump->entries, head); |
| 553 | } | 554 | } |
| 554 | 555 | ||
| 555 | if (i > 0) { | 556 | if (i > 0) { |
| @@ -573,7 +574,8 @@ static void get_prompt_str(struct gstr *r, struct property *prop, | |||
| 573 | /* | 574 | /* |
| 574 | * head is optional and may be NULL | 575 | * head is optional and may be NULL |
| 575 | */ | 576 | */ |
| 576 | void get_symbol_str(struct gstr *r, struct symbol *sym, struct jk_head *head) | 577 | void get_symbol_str(struct gstr *r, struct symbol *sym, |
| 578 | struct list_head *head) | ||
| 577 | { | 579 | { |
| 578 | bool hit; | 580 | bool hit; |
| 579 | struct property *prop; | 581 | struct property *prop; |
| @@ -612,7 +614,7 @@ void get_symbol_str(struct gstr *r, struct symbol *sym, struct jk_head *head) | |||
| 612 | str_append(r, "\n\n"); | 614 | str_append(r, "\n\n"); |
| 613 | } | 615 | } |
| 614 | 616 | ||
| 615 | struct gstr get_relations_str(struct symbol **sym_arr, struct jk_head *head) | 617 | struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head) |
| 616 | { | 618 | { |
| 617 | struct symbol *sym; | 619 | struct symbol *sym; |
| 618 | struct gstr res = str_new(); | 620 | struct gstr res = str_new(); |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 46e7aff80d1a..28b761567815 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
| @@ -137,6 +137,8 @@ use strict; | |||
| 137 | # should document the "Context:" of the function, e.g. whether the functions | 137 | # should document the "Context:" of the function, e.g. whether the functions |
| 138 | # can be called form interrupts. Unlike other sections you can end it with an | 138 | # can be called form interrupts. Unlike other sections you can end it with an |
| 139 | # empty line. | 139 | # empty line. |
| 140 | # A non-void function should have a "Return:" section describing the return | ||
| 141 | # value(s). | ||
| 140 | # Example-sections should contain the string EXAMPLE so that they are marked | 142 | # Example-sections should contain the string EXAMPLE so that they are marked |
| 141 | # appropriately in DocBook. | 143 | # appropriately in DocBook. |
| 142 | # | 144 | # |
| @@ -315,6 +317,7 @@ my $section_default = "Description"; # default section | |||
| 315 | my $section_intro = "Introduction"; | 317 | my $section_intro = "Introduction"; |
| 316 | my $section = $section_default; | 318 | my $section = $section_default; |
| 317 | my $section_context = "Context"; | 319 | my $section_context = "Context"; |
| 320 | my $section_return = "Return"; | ||
| 318 | 321 | ||
| 319 | my $undescribed = "-- undescribed --"; | 322 | my $undescribed = "-- undescribed --"; |
| 320 | 323 | ||
| @@ -2039,6 +2042,28 @@ sub check_sections($$$$$$) { | |||
| 2039 | } | 2042 | } |
| 2040 | 2043 | ||
| 2041 | ## | 2044 | ## |
| 2045 | # Checks the section describing the return value of a function. | ||
| 2046 | sub check_return_section { | ||
| 2047 | my $file = shift; | ||
| 2048 | my $declaration_name = shift; | ||
| 2049 | my $return_type = shift; | ||
| 2050 | |||
| 2051 | # Ignore an empty return type (It's a macro) | ||
| 2052 | # Ignore functions with a "void" return type. (But don't ignore "void *") | ||
| 2053 | if (($return_type eq "") || ($return_type =~ /void\s*\w*\s*$/)) { | ||
| 2054 | return; | ||
| 2055 | } | ||
| 2056 | |||
| 2057 | if (!defined($sections{$section_return}) || | ||
| 2058 | $sections{$section_return} eq "") { | ||
| 2059 | print STDERR "Warning(${file}:$.): " . | ||
| 2060 | "No description found for return value of " . | ||
| 2061 | "'$declaration_name'\n"; | ||
| 2062 | ++$warnings; | ||
| 2063 | } | ||
| 2064 | } | ||
| 2065 | |||
| 2066 | ## | ||
| 2042 | # takes a function prototype and the name of the current file being | 2067 | # takes a function prototype and the name of the current file being |
| 2043 | # processed and spits out all the details stored in the global | 2068 | # processed and spits out all the details stored in the global |
| 2044 | # arrays/hashes. | 2069 | # arrays/hashes. |
| @@ -2109,6 +2134,15 @@ sub dump_function($$) { | |||
| 2109 | my $prms = join " ", @parameterlist; | 2134 | my $prms = join " ", @parameterlist; |
| 2110 | check_sections($file, $declaration_name, "function", $sectcheck, $prms, ""); | 2135 | check_sections($file, $declaration_name, "function", $sectcheck, $prms, ""); |
| 2111 | 2136 | ||
| 2137 | # This check emits a lot of warnings at the moment, because many | ||
| 2138 | # functions don't have a 'Return' doc section. So until the number | ||
| 2139 | # of warnings goes sufficiently down, the check is only performed in | ||
| 2140 | # verbose mode. | ||
| 2141 | # TODO: always perform the check. | ||
| 2142 | if ($verbose) { | ||
| 2143 | check_return_section($file, $declaration_name, $return_type); | ||
| 2144 | } | ||
| 2145 | |||
| 2112 | output_declaration($declaration_name, | 2146 | output_declaration($declaration_name, |
| 2113 | 'function', | 2147 | 'function', |
| 2114 | {'function' => $declaration_name, | 2148 | {'function' => $declaration_name, |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 0d93856a03f4..ff36c508a10e 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
| @@ -858,25 +858,23 @@ static void check_section(const char *modname, struct elf_info *elf, | |||
| 858 | 858 | ||
| 859 | #define ALL_INIT_DATA_SECTIONS \ | 859 | #define ALL_INIT_DATA_SECTIONS \ |
| 860 | ".init.setup$", ".init.rodata$", \ | 860 | ".init.setup$", ".init.rodata$", \ |
| 861 | ".devinit.rodata$", ".cpuinit.rodata$", ".meminit.rodata$", \ | 861 | ".cpuinit.rodata$", ".meminit.rodata$", \ |
| 862 | ".init.data$", ".devinit.data$", ".cpuinit.data$", ".meminit.data$" | 862 | ".init.data$", ".cpuinit.data$", ".meminit.data$" |
| 863 | #define ALL_EXIT_DATA_SECTIONS \ | 863 | #define ALL_EXIT_DATA_SECTIONS \ |
| 864 | ".exit.data$", ".devexit.data$", ".cpuexit.data$", ".memexit.data$" | 864 | ".exit.data$", ".cpuexit.data$", ".memexit.data$" |
| 865 | 865 | ||
| 866 | #define ALL_INIT_TEXT_SECTIONS \ | 866 | #define ALL_INIT_TEXT_SECTIONS \ |
| 867 | ".init.text$", ".devinit.text$", ".cpuinit.text$", ".meminit.text$" | 867 | ".init.text$", ".cpuinit.text$", ".meminit.text$" |
| 868 | #define ALL_EXIT_TEXT_SECTIONS \ | 868 | #define ALL_EXIT_TEXT_SECTIONS \ |
| 869 | ".exit.text$", ".devexit.text$", ".cpuexit.text$", ".memexit.text$" | 869 | ".exit.text$", ".cpuexit.text$", ".memexit.text$" |
| 870 | 870 | ||
| 871 | #define ALL_PCI_INIT_SECTIONS \ | 871 | #define ALL_PCI_INIT_SECTIONS \ |
| 872 | ".pci_fixup_early$", ".pci_fixup_header$", ".pci_fixup_final$", \ | 872 | ".pci_fixup_early$", ".pci_fixup_header$", ".pci_fixup_final$", \ |
| 873 | ".pci_fixup_enable$", ".pci_fixup_resume$", \ | 873 | ".pci_fixup_enable$", ".pci_fixup_resume$", \ |
| 874 | ".pci_fixup_resume_early$", ".pci_fixup_suspend$" | 874 | ".pci_fixup_resume_early$", ".pci_fixup_suspend$" |
| 875 | 875 | ||
| 876 | #define ALL_XXXINIT_SECTIONS DEV_INIT_SECTIONS, CPU_INIT_SECTIONS, \ | 876 | #define ALL_XXXINIT_SECTIONS CPU_INIT_SECTIONS, MEM_INIT_SECTIONS |
| 877 | MEM_INIT_SECTIONS | 877 | #define ALL_XXXEXIT_SECTIONS CPU_EXIT_SECTIONS, MEM_EXIT_SECTIONS |
| 878 | #define ALL_XXXEXIT_SECTIONS DEV_EXIT_SECTIONS, CPU_EXIT_SECTIONS, \ | ||
| 879 | MEM_EXIT_SECTIONS | ||
| 880 | 878 | ||
| 881 | #define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS | 879 | #define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS |
| 882 | #define ALL_EXIT_SECTIONS EXIT_SECTIONS, ALL_XXXEXIT_SECTIONS | 880 | #define ALL_EXIT_SECTIONS EXIT_SECTIONS, ALL_XXXEXIT_SECTIONS |
| @@ -885,12 +883,10 @@ static void check_section(const char *modname, struct elf_info *elf, | |||
| 885 | #define TEXT_SECTIONS ".text$" | 883 | #define TEXT_SECTIONS ".text$" |
| 886 | 884 | ||
| 887 | #define INIT_SECTIONS ".init.*" | 885 | #define INIT_SECTIONS ".init.*" |
| 888 | #define DEV_INIT_SECTIONS ".devinit.*" | ||
| 889 | #define CPU_INIT_SECTIONS ".cpuinit.*" | 886 | #define CPU_INIT_SECTIONS ".cpuinit.*" |
| 890 | #define MEM_INIT_SECTIONS ".meminit.*" | 887 | #define MEM_INIT_SECTIONS ".meminit.*" |
| 891 | 888 | ||
| 892 | #define EXIT_SECTIONS ".exit.*" | 889 | #define EXIT_SECTIONS ".exit.*" |
| 893 | #define DEV_EXIT_SECTIONS ".devexit.*" | ||
| 894 | #define CPU_EXIT_SECTIONS ".cpuexit.*" | 890 | #define CPU_EXIT_SECTIONS ".cpuexit.*" |
| 895 | #define MEM_EXIT_SECTIONS ".memexit.*" | 891 | #define MEM_EXIT_SECTIONS ".memexit.*" |
| 896 | 892 | ||
| @@ -979,7 +975,7 @@ const struct sectioncheck sectioncheck[] = { | |||
| 979 | .mismatch = DATA_TO_ANY_EXIT, | 975 | .mismatch = DATA_TO_ANY_EXIT, |
| 980 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, | 976 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, |
| 981 | }, | 977 | }, |
| 982 | /* Do not reference init code/data from devinit/cpuinit/meminit code/data */ | 978 | /* Do not reference init code/data from cpuinit/meminit code/data */ |
| 983 | { | 979 | { |
| 984 | .fromsec = { ALL_XXXINIT_SECTIONS, NULL }, | 980 | .fromsec = { ALL_XXXINIT_SECTIONS, NULL }, |
| 985 | .tosec = { INIT_SECTIONS, NULL }, | 981 | .tosec = { INIT_SECTIONS, NULL }, |
| @@ -1000,7 +996,7 @@ const struct sectioncheck sectioncheck[] = { | |||
| 1000 | .mismatch = XXXINIT_TO_SOME_INIT, | 996 | .mismatch = XXXINIT_TO_SOME_INIT, |
| 1001 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, | 997 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, |
| 1002 | }, | 998 | }, |
| 1003 | /* Do not reference exit code/data from devexit/cpuexit/memexit code/data */ | 999 | /* Do not reference exit code/data from cpuexit/memexit code/data */ |
| 1004 | { | 1000 | { |
| 1005 | .fromsec = { ALL_XXXEXIT_SECTIONS, NULL }, | 1001 | .fromsec = { ALL_XXXEXIT_SECTIONS, NULL }, |
| 1006 | .tosec = { EXIT_SECTIONS, NULL }, | 1002 | .tosec = { EXIT_SECTIONS, NULL }, |
| @@ -1089,7 +1085,7 @@ static const struct sectioncheck *section_mismatch( | |||
| 1089 | * Pattern 2: | 1085 | * Pattern 2: |
| 1090 | * Many drivers utilise a *driver container with references to | 1086 | * Many drivers utilise a *driver container with references to |
| 1091 | * add, remove, probe functions etc. | 1087 | * add, remove, probe functions etc. |
| 1092 | * These functions may often be marked __devinit and we do not want to | 1088 | * These functions may often be marked __cpuinit and we do not want to |
| 1093 | * warn here. | 1089 | * warn here. |
| 1094 | * the pattern is identified by: | 1090 | * the pattern is identified by: |
| 1095 | * tosec = init or exit section | 1091 | * tosec = init or exit section |
diff --git a/scripts/sign-file b/scripts/sign-file index 87ca59d36e7e..974a20b661b7 100755 --- a/scripts/sign-file +++ b/scripts/sign-file | |||
| @@ -156,12 +156,12 @@ sub asn1_extract($$@) | |||
| 156 | 156 | ||
| 157 | if ($l == 0x1) { | 157 | if ($l == 0x1) { |
| 158 | $len = unpack("C", substr(${$cursor->[2]}, $cursor->[0], 1)); | 158 | $len = unpack("C", substr(${$cursor->[2]}, $cursor->[0], 1)); |
| 159 | } elsif ($l = 0x2) { | 159 | } elsif ($l == 0x2) { |
| 160 | $len = unpack("n", substr(${$cursor->[2]}, $cursor->[0], 2)); | 160 | $len = unpack("n", substr(${$cursor->[2]}, $cursor->[0], 2)); |
| 161 | } elsif ($l = 0x3) { | 161 | } elsif ($l == 0x3) { |
| 162 | $len = unpack("C", substr(${$cursor->[2]}, $cursor->[0], 1)) << 16; | 162 | $len = unpack("C", substr(${$cursor->[2]}, $cursor->[0], 1)) << 16; |
| 163 | $len = unpack("n", substr(${$cursor->[2]}, $cursor->[0] + 1, 2)); | 163 | $len = unpack("n", substr(${$cursor->[2]}, $cursor->[0] + 1, 2)); |
| 164 | } elsif ($l = 0x4) { | 164 | } elsif ($l == 0x4) { |
| 165 | $len = unpack("N", substr(${$cursor->[2]}, $cursor->[0], 4)); | 165 | $len = unpack("N", substr(${$cursor->[2]}, $cursor->[0], 4)); |
| 166 | } else { | 166 | } else { |
| 167 | die $x509, ": ", $cursor->[0], ": ASN.1 element too long (", $l, ")\n"; | 167 | die $x509, ": ", $cursor->[0], ": ASN.1 element too long (", $l, ")\n"; |
diff --git a/scripts/sortextable.c b/scripts/sortextable.c index f19ddc47304c..1f10e89d15b4 100644 --- a/scripts/sortextable.c +++ b/scripts/sortextable.c | |||
| @@ -248,6 +248,7 @@ do_file(char const *const fname) | |||
| 248 | case EM_S390: | 248 | case EM_S390: |
| 249 | custom_sort = sort_relative_table; | 249 | custom_sort = sort_relative_table; |
| 250 | break; | 250 | break; |
| 251 | case EM_ARM: | ||
| 251 | case EM_MIPS: | 252 | case EM_MIPS: |
| 252 | break; | 253 | break; |
| 253 | } /* end switch */ | 254 | } /* end switch */ |
