diff options
-rw-r--r-- | scripts/mod/modpost.c | 24 |
1 files changed, 10 insertions, 14 deletions
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 |