diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-11-14 20:38:05 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-11-14 20:38:05 -0500 |
| commit | 42249094f79422fbf5ed4b54eeb48ff096809b8f (patch) | |
| tree | 91e6850c8c7e8cc284cf8bb6363f8662f84011f4 /scripts/mod | |
| parent | 936816161978ca716a56c5e553c68f25972b1e3a (diff) | |
| parent | 2c027b7c48a888ab173ba45babb4525e278375d9 (diff) | |
Merge branch 'next' into for-linus
Merge first round of changes for 3.13 merge window.
Diffstat (limited to 'scripts/mod')
| -rw-r--r-- | scripts/mod/Makefile | 15 | ||||
| -rw-r--r-- | scripts/mod/devicetable-offsets.c | 6 | ||||
| -rw-r--r-- | scripts/mod/file2alias.c | 30 | ||||
| -rw-r--r-- | scripts/mod/modpost.c | 55 |
4 files changed, 48 insertions, 58 deletions
diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index 75d59fcd48b8..c11212ff3510 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile | |||
| @@ -15,8 +15,8 @@ endef | |||
| 15 | quiet_cmd_offsets = GEN $@ | 15 | quiet_cmd_offsets = GEN $@ |
| 16 | define cmd_offsets | 16 | define cmd_offsets |
| 17 | (set -e; \ | 17 | (set -e; \ |
| 18 | echo "#ifndef __DEVICEVTABLE_OFFSETS_H__"; \ | 18 | echo "#ifndef __DEVICETABLE_OFFSETS_H__"; \ |
| 19 | echo "#define __DEVICEVTABLE_OFFSETS_H__"; \ | 19 | echo "#define __DEVICETABLE_OFFSETS_H__"; \ |
| 20 | echo "/*"; \ | 20 | echo "/*"; \ |
| 21 | echo " * DO NOT MODIFY."; \ | 21 | echo " * DO NOT MODIFY."; \ |
| 22 | echo " *"; \ | 22 | echo " *"; \ |
| @@ -29,15 +29,10 @@ define cmd_offsets | |||
| 29 | echo "#endif" ) > $@ | 29 | echo "#endif" ) > $@ |
| 30 | endef | 30 | endef |
| 31 | 31 | ||
| 32 | # We use internal kbuild rules to avoid the "is up to date" message from make | 32 | $(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s |
| 33 | scripts/mod/devicetable-offsets.s: scripts/mod/devicetable-offsets.c FORCE | 33 | $(call if_changed,offsets) |
| 34 | $(Q)mkdir -p $(dir $@) | ||
| 35 | $(call if_changed_dep,cc_s_c) | ||
| 36 | 34 | ||
| 37 | $(obj)/$(devicetable-offsets-file): scripts/mod/devicetable-offsets.s | 35 | targets += $(devicetable-offsets-file) devicetable-offsets.s |
| 38 | $(call cmd,offsets) | ||
| 39 | |||
| 40 | targets += $(devicetable-offsets-file) | ||
| 41 | 36 | ||
| 42 | # dependencies on generated files need to be listed explicitly | 37 | # dependencies on generated files need to be listed explicitly |
| 43 | 38 | ||
diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c index e66d4d258e1a..bb5d115ca671 100644 --- a/scripts/mod/devicetable-offsets.c +++ b/scripts/mod/devicetable-offsets.c | |||
| @@ -177,5 +177,11 @@ int main(void) | |||
| 177 | DEVID(mei_cl_device_id); | 177 | DEVID(mei_cl_device_id); |
| 178 | DEVID_FIELD(mei_cl_device_id, name); | 178 | DEVID_FIELD(mei_cl_device_id, name); |
| 179 | 179 | ||
| 180 | DEVID(rio_device_id); | ||
| 181 | DEVID_FIELD(rio_device_id, did); | ||
| 182 | DEVID_FIELD(rio_device_id, vid); | ||
| 183 | DEVID_FIELD(rio_device_id, asm_did); | ||
| 184 | DEVID_FIELD(rio_device_id, asm_vid); | ||
| 185 | |||
| 180 | return 0; | 186 | return 0; |
| 181 | } | 187 | } |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 45f9a3377dcd..23708636b05c 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
| @@ -79,10 +79,12 @@ struct devtable **__start___devtable, **__stop___devtable; | |||
| 79 | extern struct devtable *__start___devtable[], *__stop___devtable[]; | 79 | extern struct devtable *__start___devtable[], *__stop___devtable[]; |
| 80 | #endif /* __MACH__ */ | 80 | #endif /* __MACH__ */ |
| 81 | 81 | ||
| 82 | #if __GNUC__ == 3 && __GNUC_MINOR__ < 3 | 82 | #if !defined(__used) |
| 83 | # define __used __attribute__((__unused__)) | 83 | # if __GNUC__ == 3 && __GNUC_MINOR__ < 3 |
| 84 | #else | 84 | # define __used __attribute__((__unused__)) |
| 85 | # define __used __attribute__((__used__)) | 85 | # else |
| 86 | # define __used __attribute__((__used__)) | ||
| 87 | # endif | ||
| 86 | #endif | 88 | #endif |
| 87 | 89 | ||
| 88 | /* Define a variable f that holds the value of field f of struct devid | 90 | /* Define a variable f that holds the value of field f of struct devid |
| @@ -1145,6 +1147,26 @@ static int do_mei_entry(const char *filename, void *symval, | |||
| 1145 | } | 1147 | } |
| 1146 | ADD_TO_DEVTABLE("mei", mei_cl_device_id, do_mei_entry); | 1148 | ADD_TO_DEVTABLE("mei", mei_cl_device_id, do_mei_entry); |
| 1147 | 1149 | ||
| 1150 | /* Looks like: rapidio:vNdNavNadN */ | ||
| 1151 | static int do_rio_entry(const char *filename, | ||
| 1152 | void *symval, char *alias) | ||
| 1153 | { | ||
| 1154 | DEF_FIELD(symval, rio_device_id, did); | ||
| 1155 | DEF_FIELD(symval, rio_device_id, vid); | ||
| 1156 | DEF_FIELD(symval, rio_device_id, asm_did); | ||
| 1157 | DEF_FIELD(symval, rio_device_id, asm_vid); | ||
| 1158 | |||
| 1159 | strcpy(alias, "rapidio:"); | ||
| 1160 | ADD(alias, "v", vid != RIO_ANY_ID, vid); | ||
| 1161 | ADD(alias, "d", did != RIO_ANY_ID, did); | ||
| 1162 | ADD(alias, "av", asm_vid != RIO_ANY_ID, asm_vid); | ||
| 1163 | ADD(alias, "ad", asm_did != RIO_ANY_ID, asm_did); | ||
| 1164 | |||
| 1165 | add_wildcard(alias); | ||
| 1166 | return 1; | ||
| 1167 | } | ||
| 1168 | ADD_TO_DEVTABLE("rapidio", rio_device_id, do_rio_entry); | ||
| 1169 | |||
| 1148 | /* Does namelen bytes of name exactly match the symbol? */ | 1170 | /* Does namelen bytes of name exactly match the symbol? */ |
| 1149 | static bool sym_is(const char *name, unsigned namelen, const char *symbol) | 1171 | static bool sym_is(const char *name, unsigned namelen, const char *symbol) |
| 1150 | { | 1172 | { |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index a4be8e112bb6..8247979e8f64 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
| @@ -821,6 +821,7 @@ static const char *section_white_list[] = | |||
| 821 | { | 821 | { |
| 822 | ".comment*", | 822 | ".comment*", |
| 823 | ".debug*", | 823 | ".debug*", |
| 824 | ".cranges", /* sh64 */ | ||
| 824 | ".zdebug*", /* Compressed debug sections. */ | 825 | ".zdebug*", /* Compressed debug sections. */ |
| 825 | ".GCC-command-line", /* mn10300 */ | 826 | ".GCC-command-line", /* mn10300 */ |
| 826 | ".GCC.command.line", /* record-gcc-switches, non mn10300 */ | 827 | ".GCC.command.line", /* record-gcc-switches, non mn10300 */ |
| @@ -861,37 +862,34 @@ static void check_section(const char *modname, struct elf_info *elf, | |||
| 861 | 862 | ||
| 862 | 863 | ||
| 863 | #define ALL_INIT_DATA_SECTIONS \ | 864 | #define ALL_INIT_DATA_SECTIONS \ |
| 864 | ".init.setup$", ".init.rodata$", \ | 865 | ".init.setup$", ".init.rodata$", ".meminit.rodata$", \ |
| 865 | ".cpuinit.rodata$", ".meminit.rodata$", \ | 866 | ".init.data$", ".meminit.data$" |
| 866 | ".init.data$", ".cpuinit.data$", ".meminit.data$" | ||
| 867 | #define ALL_EXIT_DATA_SECTIONS \ | 867 | #define ALL_EXIT_DATA_SECTIONS \ |
| 868 | ".exit.data$", ".cpuexit.data$", ".memexit.data$" | 868 | ".exit.data$", ".memexit.data$" |
| 869 | 869 | ||
| 870 | #define ALL_INIT_TEXT_SECTIONS \ | 870 | #define ALL_INIT_TEXT_SECTIONS \ |
| 871 | ".init.text$", ".cpuinit.text$", ".meminit.text$" | 871 | ".init.text$", ".meminit.text$" |
| 872 | #define ALL_EXIT_TEXT_SECTIONS \ | 872 | #define ALL_EXIT_TEXT_SECTIONS \ |
| 873 | ".exit.text$", ".cpuexit.text$", ".memexit.text$" | 873 | ".exit.text$", ".memexit.text$" |
| 874 | 874 | ||
| 875 | #define ALL_PCI_INIT_SECTIONS \ | 875 | #define ALL_PCI_INIT_SECTIONS \ |
| 876 | ".pci_fixup_early$", ".pci_fixup_header$", ".pci_fixup_final$", \ | 876 | ".pci_fixup_early$", ".pci_fixup_header$", ".pci_fixup_final$", \ |
| 877 | ".pci_fixup_enable$", ".pci_fixup_resume$", \ | 877 | ".pci_fixup_enable$", ".pci_fixup_resume$", \ |
| 878 | ".pci_fixup_resume_early$", ".pci_fixup_suspend$" | 878 | ".pci_fixup_resume_early$", ".pci_fixup_suspend$" |
| 879 | 879 | ||
| 880 | #define ALL_XXXINIT_SECTIONS CPU_INIT_SECTIONS, MEM_INIT_SECTIONS | 880 | #define ALL_XXXINIT_SECTIONS MEM_INIT_SECTIONS |
| 881 | #define ALL_XXXEXIT_SECTIONS CPU_EXIT_SECTIONS, MEM_EXIT_SECTIONS | 881 | #define ALL_XXXEXIT_SECTIONS MEM_EXIT_SECTIONS |
| 882 | 882 | ||
| 883 | #define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS | 883 | #define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS |
| 884 | #define ALL_EXIT_SECTIONS EXIT_SECTIONS, ALL_XXXEXIT_SECTIONS | 884 | #define ALL_EXIT_SECTIONS EXIT_SECTIONS, ALL_XXXEXIT_SECTIONS |
| 885 | 885 | ||
| 886 | #define DATA_SECTIONS ".data$", ".data.rel$" | 886 | #define DATA_SECTIONS ".data$", ".data.rel$" |
| 887 | #define TEXT_SECTIONS ".text$" | 887 | #define TEXT_SECTIONS ".text$", ".text.unlikely$" |
| 888 | 888 | ||
| 889 | #define INIT_SECTIONS ".init.*" | 889 | #define INIT_SECTIONS ".init.*" |
| 890 | #define CPU_INIT_SECTIONS ".cpuinit.*" | ||
| 891 | #define MEM_INIT_SECTIONS ".meminit.*" | 890 | #define MEM_INIT_SECTIONS ".meminit.*" |
| 892 | 891 | ||
| 893 | #define EXIT_SECTIONS ".exit.*" | 892 | #define EXIT_SECTIONS ".exit.*" |
| 894 | #define CPU_EXIT_SECTIONS ".cpuexit.*" | ||
| 895 | #define MEM_EXIT_SECTIONS ".memexit.*" | 893 | #define MEM_EXIT_SECTIONS ".memexit.*" |
| 896 | 894 | ||
| 897 | /* init data sections */ | 895 | /* init data sections */ |
| @@ -979,48 +977,20 @@ const struct sectioncheck sectioncheck[] = { | |||
| 979 | .mismatch = DATA_TO_ANY_EXIT, | 977 | .mismatch = DATA_TO_ANY_EXIT, |
| 980 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, | 978 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, |
| 981 | }, | 979 | }, |
| 982 | /* Do not reference init code/data from cpuinit/meminit code/data */ | 980 | /* Do not reference init code/data from meminit code/data */ |
| 983 | { | 981 | { |
| 984 | .fromsec = { ALL_XXXINIT_SECTIONS, NULL }, | 982 | .fromsec = { ALL_XXXINIT_SECTIONS, NULL }, |
| 985 | .tosec = { INIT_SECTIONS, NULL }, | 983 | .tosec = { INIT_SECTIONS, NULL }, |
| 986 | .mismatch = XXXINIT_TO_SOME_INIT, | 984 | .mismatch = XXXINIT_TO_SOME_INIT, |
| 987 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, | 985 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, |
| 988 | }, | 986 | }, |
| 989 | /* Do not reference cpuinit code/data from meminit code/data */ | 987 | /* Do not reference exit code/data from memexit code/data */ |
| 990 | { | ||
| 991 | .fromsec = { MEM_INIT_SECTIONS, NULL }, | ||
| 992 | .tosec = { CPU_INIT_SECTIONS, NULL }, | ||
| 993 | .mismatch = XXXINIT_TO_SOME_INIT, | ||
| 994 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, | ||
| 995 | }, | ||
| 996 | /* Do not reference meminit code/data from cpuinit code/data */ | ||
| 997 | { | ||
| 998 | .fromsec = { CPU_INIT_SECTIONS, NULL }, | ||
| 999 | .tosec = { MEM_INIT_SECTIONS, NULL }, | ||
| 1000 | .mismatch = XXXINIT_TO_SOME_INIT, | ||
| 1001 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, | ||
| 1002 | }, | ||
| 1003 | /* Do not reference exit code/data from cpuexit/memexit code/data */ | ||
| 1004 | { | 988 | { |
| 1005 | .fromsec = { ALL_XXXEXIT_SECTIONS, NULL }, | 989 | .fromsec = { ALL_XXXEXIT_SECTIONS, NULL }, |
| 1006 | .tosec = { EXIT_SECTIONS, NULL }, | 990 | .tosec = { EXIT_SECTIONS, NULL }, |
| 1007 | .mismatch = XXXEXIT_TO_SOME_EXIT, | 991 | .mismatch = XXXEXIT_TO_SOME_EXIT, |
| 1008 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, | 992 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, |
| 1009 | }, | 993 | }, |
| 1010 | /* Do not reference cpuexit code/data from memexit code/data */ | ||
| 1011 | { | ||
| 1012 | .fromsec = { MEM_EXIT_SECTIONS, NULL }, | ||
| 1013 | .tosec = { CPU_EXIT_SECTIONS, NULL }, | ||
| 1014 | .mismatch = XXXEXIT_TO_SOME_EXIT, | ||
| 1015 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, | ||
| 1016 | }, | ||
| 1017 | /* Do not reference memexit code/data from cpuexit code/data */ | ||
| 1018 | { | ||
| 1019 | .fromsec = { CPU_EXIT_SECTIONS, NULL }, | ||
| 1020 | .tosec = { MEM_EXIT_SECTIONS, NULL }, | ||
| 1021 | .mismatch = XXXEXIT_TO_SOME_EXIT, | ||
| 1022 | .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL }, | ||
| 1023 | }, | ||
| 1024 | /* Do not use exit code/data from init code */ | 994 | /* Do not use exit code/data from init code */ |
| 1025 | { | 995 | { |
| 1026 | .fromsec = { ALL_INIT_SECTIONS, NULL }, | 996 | .fromsec = { ALL_INIT_SECTIONS, NULL }, |
| @@ -1089,8 +1059,6 @@ static const struct sectioncheck *section_mismatch( | |||
| 1089 | * Pattern 2: | 1059 | * Pattern 2: |
| 1090 | * Many drivers utilise a *driver container with references to | 1060 | * Many drivers utilise a *driver container with references to |
| 1091 | * add, remove, probe functions etc. | 1061 | * add, remove, probe functions etc. |
| 1092 | * These functions may often be marked __cpuinit and we do not want to | ||
| 1093 | * warn here. | ||
| 1094 | * the pattern is identified by: | 1062 | * the pattern is identified by: |
| 1095 | * tosec = init or exit section | 1063 | * tosec = init or exit section |
| 1096 | * fromsec = data section | 1064 | * fromsec = data section |
| @@ -1249,7 +1217,6 @@ static Elf_Sym *find_elf_symbol2(struct elf_info *elf, Elf_Addr addr, | |||
| 1249 | /* | 1217 | /* |
| 1250 | * Convert a section name to the function/data attribute | 1218 | * Convert a section name to the function/data attribute |
| 1251 | * .init.text => __init | 1219 | * .init.text => __init |
| 1252 | * .cpuinit.data => __cpudata | ||
| 1253 | * .memexitconst => __memconst | 1220 | * .memexitconst => __memconst |
| 1254 | * etc. | 1221 | * etc. |
| 1255 | * | 1222 | * |
