@@ -861,24 +861,23 @@ static void check_section(const char *modname, struct elf_info *elf,
861861
862862
863863#define ALL_INIT_DATA_SECTIONS \
864- ".init.setup$", ".init.rodata$", \
865- ".cpuinit.rodata$", ".meminit.rodata$", \
866- ".init.data$", ".cpuinit.data$", ".meminit.data$"
864+ ".init.setup$", ".init.rodata$", ".meminit.rodata$", \
865+ ".init.data$", ".meminit.data$"
867866#define ALL_EXIT_DATA_SECTIONS \
868- ".exit.data$", ".cpuexit.data$", ". memexit.data$"
867+ ".exit.data$", ".memexit.data$"
869868
870869#define ALL_INIT_TEXT_SECTIONS \
871- ".init.text$", ".cpuinit.text$", ". meminit.text$"
870+ ".init.text$", ".meminit.text$"
872871#define ALL_EXIT_TEXT_SECTIONS \
873- ".exit.text$", ".cpuexit.text$", ". memexit.text$"
872+ ".exit.text$", ".memexit.text$"
874873
875874#define ALL_PCI_INIT_SECTIONS \
876875 ".pci_fixup_early$", ".pci_fixup_header$", ".pci_fixup_final$", \
877876 ".pci_fixup_enable$", ".pci_fixup_resume$", \
878877 ".pci_fixup_resume_early$", ".pci_fixup_suspend$"
879878
880- #define ALL_XXXINIT_SECTIONS CPU_INIT_SECTIONS, MEM_INIT_SECTIONS
881- #define ALL_XXXEXIT_SECTIONS CPU_EXIT_SECTIONS, MEM_EXIT_SECTIONS
879+ #define ALL_XXXINIT_SECTIONS MEM_INIT_SECTIONS
880+ #define ALL_XXXEXIT_SECTIONS MEM_EXIT_SECTIONS
882881
883882#define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS
884883#define ALL_EXIT_SECTIONS EXIT_SECTIONS, ALL_XXXEXIT_SECTIONS
@@ -887,11 +886,9 @@ static void check_section(const char *modname, struct elf_info *elf,
887886#define TEXT_SECTIONS ".text$"
888887
889888#define INIT_SECTIONS ".init.*"
890- #define CPU_INIT_SECTIONS ".cpuinit.*"
891889#define MEM_INIT_SECTIONS ".meminit.*"
892890
893891#define EXIT_SECTIONS ".exit.*"
894- #define CPU_EXIT_SECTIONS ".cpuexit.*"
895892#define MEM_EXIT_SECTIONS ".memexit.*"
896893
897894/* init data sections */
@@ -979,48 +976,20 @@ const struct sectioncheck sectioncheck[] = {
979976 .mismatch = DATA_TO_ANY_EXIT ,
980977 .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST , NULL },
981978},
982- /* Do not reference init code/data from cpuinit/ meminit code/data */
979+ /* Do not reference init code/data from meminit code/data */
983980{
984981 .fromsec = { ALL_XXXINIT_SECTIONS , NULL },
985982 .tosec = { INIT_SECTIONS , NULL },
986983 .mismatch = XXXINIT_TO_SOME_INIT ,
987984 .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST , NULL },
988985},
989- /* Do not reference cpuinit code/data from meminit 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 */
986+ /* Do not reference exit code/data from memexit code/data */
1004987{
1005988 .fromsec = { ALL_XXXEXIT_SECTIONS , NULL },
1006989 .tosec = { EXIT_SECTIONS , NULL },
1007990 .mismatch = XXXEXIT_TO_SOME_EXIT ,
1008991 .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST , NULL },
1009992},
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- },
1024993/* Do not use exit code/data from init code */
1025994{
1026995 .fromsec = { ALL_INIT_SECTIONS , NULL },
@@ -1089,8 +1058,6 @@ static const struct sectioncheck *section_mismatch(
10891058 * Pattern 2:
10901059 * Many drivers utilise a *driver container with references to
10911060 * add, remove, probe functions etc.
1092- * These functions may often be marked __cpuinit and we do not want to
1093- * warn here.
10941061 * the pattern is identified by:
10951062 * tosec = init or exit section
10961063 * fromsec = data section
@@ -1249,7 +1216,6 @@ static Elf_Sym *find_elf_symbol2(struct elf_info *elf, Elf_Addr addr,
12491216/*
12501217 * Convert a section name to the function/data attribute
12511218 * .init.text => __init
1252- * .cpuinit.data => __cpudata
12531219 * .memexitconst => __memconst
12541220 * etc.
12551221 *
0 commit comments