diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 40 | ||||
-rw-r--r-- | lib/dynamic_debug.c | 1 | ||||
-rw-r--r-- | lib/idr.c | 2 |
3 files changed, 21 insertions, 22 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 103c171ce605..75330bd87565 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -117,31 +117,31 @@ config DEBUG_SECTION_MISMATCH | |||
117 | help | 117 | help |
118 | The section mismatch analysis checks if there are illegal | 118 | The section mismatch analysis checks if there are illegal |
119 | references from one section to another section. | 119 | references from one section to another section. |
120 | Linux will during link or during runtime drop some sections | 120 | During linktime or runtime, some sections are dropped; |
121 | and any use of code/data previously in these sections will | 121 | any use of code/data previously in these sections would |
122 | most likely result in an oops. | 122 | most likely result in an oops. |
123 | In the code functions and variables are annotated with | 123 | In the code, functions and variables are annotated with |
124 | __init, __devinit etc. (see full list in include/linux/init.h) | 124 | __init, __devinit, etc. (see the full list in include/linux/init.h), |
125 | which results in the code/data being placed in specific sections. | 125 | which results in the code/data being placed in specific sections. |
126 | The section mismatch analysis is always done after a full | 126 | The section mismatch analysis is always performed after a full |
127 | kernel build but enabling this option will in addition | 127 | kernel build, and enabling this option causes the following |
128 | do the following: | 128 | additional steps to occur: |
129 | - Add the option -fno-inline-functions-called-once to gcc | 129 | - Add the option -fno-inline-functions-called-once to gcc commands. |
130 | When inlining a function annotated __init in a non-init | 130 | When inlining a function annotated with __init in a non-init |
131 | function we would lose the section information and thus | 131 | function, we would lose the section information and thus |
132 | the analysis would not catch the illegal reference. | 132 | the analysis would not catch the illegal reference. |
133 | This option tells gcc to inline less but will also | 133 | This option tells gcc to inline less (but it does result in |
134 | result in a larger kernel. | 134 | a larger kernel). |
135 | - Run the section mismatch analysis for each module/built-in.o | 135 | - Run the section mismatch analysis for each module/built-in.o file. |
136 | When we run the section mismatch analysis on vmlinux.o we | 136 | When we run the section mismatch analysis on vmlinux.o, we |
137 | lose valueble information about where the mismatch was | 137 | lose valueble information about where the mismatch was |
138 | introduced. | 138 | introduced. |
139 | Running the analysis for each module/built-in.o file | 139 | Running the analysis for each module/built-in.o file |
140 | will tell where the mismatch happens much closer to the | 140 | tells where the mismatch happens much closer to the |
141 | source. The drawback is that we will report the same | 141 | source. The drawback is that the same mismatch is |
142 | mismatch at least twice. | 142 | reported at least twice. |
143 | - Enable verbose reporting from modpost to help solving | 143 | - Enable verbose reporting from modpost in order to help resolve |
144 | the section mismatches reported. | 144 | the section mismatches that are reported. |
145 | 145 | ||
146 | config DEBUG_KERNEL | 146 | config DEBUG_KERNEL |
147 | bool "Kernel debugging" | 147 | bool "Kernel debugging" |
@@ -835,7 +835,7 @@ config DEBUG_CREDENTIALS | |||
835 | 835 | ||
836 | # | 836 | # |
837 | # Select this config option from the architecture Kconfig, if it | 837 | # Select this config option from the architecture Kconfig, if it |
838 | # it is preferred to always offer frame pointers as a config | 838 | # is preferred to always offer frame pointers as a config |
839 | # option on the architecture (regardless of KERNEL_DEBUG): | 839 | # option on the architecture (regardless of KERNEL_DEBUG): |
840 | # | 840 | # |
841 | config ARCH_WANT_FRAME_POINTERS | 841 | config ARCH_WANT_FRAME_POINTERS |
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 75ca78f3a8c9..79fc20b65e74 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
16 | #include <linux/kallsyms.h> | 16 | #include <linux/kallsyms.h> |
17 | #include <linux/version.h> | ||
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
19 | #include <linux/mutex.h> | 18 | #include <linux/mutex.h> |
20 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
@@ -860,7 +860,7 @@ EXPORT_SYMBOL(ida_get_new_above); | |||
860 | * and go back to the idr_pre_get() call. If the idr is full, it will | 860 | * and go back to the idr_pre_get() call. If the idr is full, it will |
861 | * return %-ENOSPC. | 861 | * return %-ENOSPC. |
862 | * | 862 | * |
863 | * @id returns a value in the range %0 ... %0x7fffffff. | 863 | * @p_id returns a value in the range %0 ... %0x7fffffff. |
864 | */ | 864 | */ |
865 | int ida_get_new(struct ida *ida, int *p_id) | 865 | int ida_get_new(struct ida *ida, int *p_id) |
866 | { | 866 | { |