Commit ee7e5516be4f2107535ad5a3d47d9c79f93661a2
Committed by
Ingo Molnar
1 parent
543cf4cb3f
Exists in
master
and in
20 other branches
generic: per-device coherent dma allocator
Currently x86_32, sh and cris-v32 provide per-device coherent dma memory allocator. However their implementation is nearly identical. Refactor out common code to be reused by them. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 4 changed files with 164 additions and 0 deletions Inline Diff
include/asm-generic/dma-coherent.h
File was created | 1 | #ifndef DMA_COHERENT_H | |
2 | #define DMA_COHERENT_H | ||
3 | |||
4 | #ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT | ||
5 | /* | ||
6 | * These two functions are only for dma allocator. | ||
7 | * Don't use them in device drivers. | ||
8 | */ | ||
9 | int dma_alloc_from_coherent(struct device *dev, ssize_t size, | ||
10 | dma_addr_t *dma_handle, void **ret); | ||
11 | int dma_release_from_coherent(struct device *dev, int order, void *vaddr); | ||
12 | |||
13 | /* | ||
14 | * Standard interface | ||
15 | */ | ||
16 | #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | ||
17 | extern int | ||
18 | dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | ||
19 | dma_addr_t device_addr, size_t size, int flags); | ||
20 | |||
21 | extern void | ||
22 | dma_release_declared_memory(struct device *dev); | ||
23 | |||
24 | extern void * | ||
25 | dma_mark_declared_memory_occupied(struct device *dev, | ||
26 | dma_addr_t device_addr, size_t size); | ||
27 | #else | ||
28 | #define dma_alloc_from_coherent(dev, size, handle, ret) (0) | ||
29 | #define dma_release_from_coherent(dev, order, vaddr) (0) | ||
30 | #endif | ||
31 | |||
32 | #endif | ||
33 |
init/Kconfig
1 | config ARCH | 1 | config ARCH |
2 | string | 2 | string |
3 | option env="ARCH" | 3 | option env="ARCH" |
4 | 4 | ||
5 | config KERNELVERSION | 5 | config KERNELVERSION |
6 | string | 6 | string |
7 | option env="KERNELVERSION" | 7 | option env="KERNELVERSION" |
8 | 8 | ||
9 | config DEFCONFIG_LIST | 9 | config DEFCONFIG_LIST |
10 | string | 10 | string |
11 | depends on !UML | 11 | depends on !UML |
12 | option defconfig_list | 12 | option defconfig_list |
13 | default "/lib/modules/$UNAME_RELEASE/.config" | 13 | default "/lib/modules/$UNAME_RELEASE/.config" |
14 | default "/etc/kernel-config" | 14 | default "/etc/kernel-config" |
15 | default "/boot/config-$UNAME_RELEASE" | 15 | default "/boot/config-$UNAME_RELEASE" |
16 | default "$ARCH_DEFCONFIG" | 16 | default "$ARCH_DEFCONFIG" |
17 | default "arch/$ARCH/defconfig" | 17 | default "arch/$ARCH/defconfig" |
18 | 18 | ||
19 | menu "General setup" | 19 | menu "General setup" |
20 | 20 | ||
21 | config EXPERIMENTAL | 21 | config EXPERIMENTAL |
22 | bool "Prompt for development and/or incomplete code/drivers" | 22 | bool "Prompt for development and/or incomplete code/drivers" |
23 | ---help--- | 23 | ---help--- |
24 | Some of the various things that Linux supports (such as network | 24 | Some of the various things that Linux supports (such as network |
25 | drivers, file systems, network protocols, etc.) can be in a state | 25 | drivers, file systems, network protocols, etc.) can be in a state |
26 | of development where the functionality, stability, or the level of | 26 | of development where the functionality, stability, or the level of |
27 | testing is not yet high enough for general use. This is usually | 27 | testing is not yet high enough for general use. This is usually |
28 | known as the "alpha-test" phase among developers. If a feature is | 28 | known as the "alpha-test" phase among developers. If a feature is |
29 | currently in alpha-test, then the developers usually discourage | 29 | currently in alpha-test, then the developers usually discourage |
30 | uninformed widespread use of this feature by the general public to | 30 | uninformed widespread use of this feature by the general public to |
31 | avoid "Why doesn't this work?" type mail messages. However, active | 31 | avoid "Why doesn't this work?" type mail messages. However, active |
32 | testing and use of these systems is welcomed. Just be aware that it | 32 | testing and use of these systems is welcomed. Just be aware that it |
33 | may not meet the normal level of reliability or it may fail to work | 33 | may not meet the normal level of reliability or it may fail to work |
34 | in some special cases. Detailed bug reports from people familiar | 34 | in some special cases. Detailed bug reports from people familiar |
35 | with the kernel internals are usually welcomed by the developers | 35 | with the kernel internals are usually welcomed by the developers |
36 | (before submitting bug reports, please read the documents | 36 | (before submitting bug reports, please read the documents |
37 | <file:README>, <file:MAINTAINERS>, <file:REPORTING-BUGS>, | 37 | <file:README>, <file:MAINTAINERS>, <file:REPORTING-BUGS>, |
38 | <file:Documentation/BUG-HUNTING>, and | 38 | <file:Documentation/BUG-HUNTING>, and |
39 | <file:Documentation/oops-tracing.txt> in the kernel source). | 39 | <file:Documentation/oops-tracing.txt> in the kernel source). |
40 | 40 | ||
41 | This option will also make obsoleted drivers available. These are | 41 | This option will also make obsoleted drivers available. These are |
42 | drivers that have been replaced by something else, and/or are | 42 | drivers that have been replaced by something else, and/or are |
43 | scheduled to be removed in a future kernel release. | 43 | scheduled to be removed in a future kernel release. |
44 | 44 | ||
45 | Unless you intend to help test and develop a feature or driver that | 45 | Unless you intend to help test and develop a feature or driver that |
46 | falls into this category, or you have a situation that requires | 46 | falls into this category, or you have a situation that requires |
47 | using these features, you should probably say N here, which will | 47 | using these features, you should probably say N here, which will |
48 | cause the configurator to present you with fewer choices. If | 48 | cause the configurator to present you with fewer choices. If |
49 | you say Y here, you will be offered the choice of using features or | 49 | you say Y here, you will be offered the choice of using features or |
50 | drivers that are currently considered to be in the alpha-test phase. | 50 | drivers that are currently considered to be in the alpha-test phase. |
51 | 51 | ||
52 | config BROKEN | 52 | config BROKEN |
53 | bool | 53 | bool |
54 | 54 | ||
55 | config BROKEN_ON_SMP | 55 | config BROKEN_ON_SMP |
56 | bool | 56 | bool |
57 | depends on BROKEN || !SMP | 57 | depends on BROKEN || !SMP |
58 | default y | 58 | default y |
59 | 59 | ||
60 | config LOCK_KERNEL | 60 | config LOCK_KERNEL |
61 | bool | 61 | bool |
62 | depends on SMP || PREEMPT | 62 | depends on SMP || PREEMPT |
63 | default y | 63 | default y |
64 | 64 | ||
65 | config INIT_ENV_ARG_LIMIT | 65 | config INIT_ENV_ARG_LIMIT |
66 | int | 66 | int |
67 | default 32 if !UML | 67 | default 32 if !UML |
68 | default 128 if UML | 68 | default 128 if UML |
69 | help | 69 | help |
70 | Maximum of each of the number of arguments and environment | 70 | Maximum of each of the number of arguments and environment |
71 | variables passed to init from the kernel command line. | 71 | variables passed to init from the kernel command line. |
72 | 72 | ||
73 | 73 | ||
74 | config LOCALVERSION | 74 | config LOCALVERSION |
75 | string "Local version - append to kernel release" | 75 | string "Local version - append to kernel release" |
76 | help | 76 | help |
77 | Append an extra string to the end of your kernel version. | 77 | Append an extra string to the end of your kernel version. |
78 | This will show up when you type uname, for example. | 78 | This will show up when you type uname, for example. |
79 | The string you set here will be appended after the contents of | 79 | The string you set here will be appended after the contents of |
80 | any files with a filename matching localversion* in your | 80 | any files with a filename matching localversion* in your |
81 | object and source tree, in that order. Your total string can | 81 | object and source tree, in that order. Your total string can |
82 | be a maximum of 64 characters. | 82 | be a maximum of 64 characters. |
83 | 83 | ||
84 | config LOCALVERSION_AUTO | 84 | config LOCALVERSION_AUTO |
85 | bool "Automatically append version information to the version string" | 85 | bool "Automatically append version information to the version string" |
86 | default y | 86 | default y |
87 | help | 87 | help |
88 | This will try to automatically determine if the current tree is a | 88 | This will try to automatically determine if the current tree is a |
89 | release tree by looking for git tags that belong to the current | 89 | release tree by looking for git tags that belong to the current |
90 | top of tree revision. | 90 | top of tree revision. |
91 | 91 | ||
92 | A string of the format -gxxxxxxxx will be added to the localversion | 92 | A string of the format -gxxxxxxxx will be added to the localversion |
93 | if a git-based tree is found. The string generated by this will be | 93 | if a git-based tree is found. The string generated by this will be |
94 | appended after any matching localversion* files, and after the value | 94 | appended after any matching localversion* files, and after the value |
95 | set in CONFIG_LOCALVERSION. | 95 | set in CONFIG_LOCALVERSION. |
96 | 96 | ||
97 | (The actual string used here is the first eight characters produced | 97 | (The actual string used here is the first eight characters produced |
98 | by running the command: | 98 | by running the command: |
99 | 99 | ||
100 | $ git rev-parse --verify HEAD | 100 | $ git rev-parse --verify HEAD |
101 | 101 | ||
102 | which is done within the script "scripts/setlocalversion".) | 102 | which is done within the script "scripts/setlocalversion".) |
103 | 103 | ||
104 | config SWAP | 104 | config SWAP |
105 | bool "Support for paging of anonymous memory (swap)" | 105 | bool "Support for paging of anonymous memory (swap)" |
106 | depends on MMU && BLOCK | 106 | depends on MMU && BLOCK |
107 | default y | 107 | default y |
108 | help | 108 | help |
109 | This option allows you to choose whether you want to have support | 109 | This option allows you to choose whether you want to have support |
110 | for so called swap devices or swap files in your kernel that are | 110 | for so called swap devices or swap files in your kernel that are |
111 | used to provide more virtual memory than the actual RAM present | 111 | used to provide more virtual memory than the actual RAM present |
112 | in your computer. If unsure say Y. | 112 | in your computer. If unsure say Y. |
113 | 113 | ||
114 | config SYSVIPC | 114 | config SYSVIPC |
115 | bool "System V IPC" | 115 | bool "System V IPC" |
116 | ---help--- | 116 | ---help--- |
117 | Inter Process Communication is a suite of library functions and | 117 | Inter Process Communication is a suite of library functions and |
118 | system calls which let processes (running programs) synchronize and | 118 | system calls which let processes (running programs) synchronize and |
119 | exchange information. It is generally considered to be a good thing, | 119 | exchange information. It is generally considered to be a good thing, |
120 | and some programs won't run unless you say Y here. In particular, if | 120 | and some programs won't run unless you say Y here. In particular, if |
121 | you want to run the DOS emulator dosemu under Linux (read the | 121 | you want to run the DOS emulator dosemu under Linux (read the |
122 | DOSEMU-HOWTO, available from <http://www.tldp.org/docs.html#howto>), | 122 | DOSEMU-HOWTO, available from <http://www.tldp.org/docs.html#howto>), |
123 | you'll need to say Y here. | 123 | you'll need to say Y here. |
124 | 124 | ||
125 | You can find documentation about IPC with "info ipc" and also in | 125 | You can find documentation about IPC with "info ipc" and also in |
126 | section 6.4 of the Linux Programmer's Guide, available from | 126 | section 6.4 of the Linux Programmer's Guide, available from |
127 | <http://www.tldp.org/guides.html>. | 127 | <http://www.tldp.org/guides.html>. |
128 | 128 | ||
129 | config SYSVIPC_SYSCTL | 129 | config SYSVIPC_SYSCTL |
130 | bool | 130 | bool |
131 | depends on SYSVIPC | 131 | depends on SYSVIPC |
132 | depends on SYSCTL | 132 | depends on SYSCTL |
133 | default y | 133 | default y |
134 | 134 | ||
135 | config POSIX_MQUEUE | 135 | config POSIX_MQUEUE |
136 | bool "POSIX Message Queues" | 136 | bool "POSIX Message Queues" |
137 | depends on NET && EXPERIMENTAL | 137 | depends on NET && EXPERIMENTAL |
138 | ---help--- | 138 | ---help--- |
139 | POSIX variant of message queues is a part of IPC. In POSIX message | 139 | POSIX variant of message queues is a part of IPC. In POSIX message |
140 | queues every message has a priority which decides about succession | 140 | queues every message has a priority which decides about succession |
141 | of receiving it by a process. If you want to compile and run | 141 | of receiving it by a process. If you want to compile and run |
142 | programs written e.g. for Solaris with use of its POSIX message | 142 | programs written e.g. for Solaris with use of its POSIX message |
143 | queues (functions mq_*) say Y here. | 143 | queues (functions mq_*) say Y here. |
144 | 144 | ||
145 | POSIX message queues are visible as a filesystem called 'mqueue' | 145 | POSIX message queues are visible as a filesystem called 'mqueue' |
146 | and can be mounted somewhere if you want to do filesystem | 146 | and can be mounted somewhere if you want to do filesystem |
147 | operations on message queues. | 147 | operations on message queues. |
148 | 148 | ||
149 | If unsure, say Y. | 149 | If unsure, say Y. |
150 | 150 | ||
151 | config BSD_PROCESS_ACCT | 151 | config BSD_PROCESS_ACCT |
152 | bool "BSD Process Accounting" | 152 | bool "BSD Process Accounting" |
153 | help | 153 | help |
154 | If you say Y here, a user level program will be able to instruct the | 154 | If you say Y here, a user level program will be able to instruct the |
155 | kernel (via a special system call) to write process accounting | 155 | kernel (via a special system call) to write process accounting |
156 | information to a file: whenever a process exits, information about | 156 | information to a file: whenever a process exits, information about |
157 | that process will be appended to the file by the kernel. The | 157 | that process will be appended to the file by the kernel. The |
158 | information includes things such as creation time, owning user, | 158 | information includes things such as creation time, owning user, |
159 | command name, memory usage, controlling terminal etc. (the complete | 159 | command name, memory usage, controlling terminal etc. (the complete |
160 | list is in the struct acct in <file:include/linux/acct.h>). It is | 160 | list is in the struct acct in <file:include/linux/acct.h>). It is |
161 | up to the user level program to do useful things with this | 161 | up to the user level program to do useful things with this |
162 | information. This is generally a good idea, so say Y. | 162 | information. This is generally a good idea, so say Y. |
163 | 163 | ||
164 | config BSD_PROCESS_ACCT_V3 | 164 | config BSD_PROCESS_ACCT_V3 |
165 | bool "BSD Process Accounting version 3 file format" | 165 | bool "BSD Process Accounting version 3 file format" |
166 | depends on BSD_PROCESS_ACCT | 166 | depends on BSD_PROCESS_ACCT |
167 | default n | 167 | default n |
168 | help | 168 | help |
169 | If you say Y here, the process accounting information is written | 169 | If you say Y here, the process accounting information is written |
170 | in a new file format that also logs the process IDs of each | 170 | in a new file format that also logs the process IDs of each |
171 | process and it's parent. Note that this file format is incompatible | 171 | process and it's parent. Note that this file format is incompatible |
172 | with previous v0/v1/v2 file formats, so you will need updated tools | 172 | with previous v0/v1/v2 file formats, so you will need updated tools |
173 | for processing it. A preliminary version of these tools is available | 173 | for processing it. A preliminary version of these tools is available |
174 | at <http://www.physik3.uni-rostock.de/tim/kernel/utils/acct/>. | 174 | at <http://www.physik3.uni-rostock.de/tim/kernel/utils/acct/>. |
175 | 175 | ||
176 | config TASKSTATS | 176 | config TASKSTATS |
177 | bool "Export task/process statistics through netlink (EXPERIMENTAL)" | 177 | bool "Export task/process statistics through netlink (EXPERIMENTAL)" |
178 | depends on NET | 178 | depends on NET |
179 | default n | 179 | default n |
180 | help | 180 | help |
181 | Export selected statistics for tasks/processes through the | 181 | Export selected statistics for tasks/processes through the |
182 | generic netlink interface. Unlike BSD process accounting, the | 182 | generic netlink interface. Unlike BSD process accounting, the |
183 | statistics are available during the lifetime of tasks/processes as | 183 | statistics are available during the lifetime of tasks/processes as |
184 | responses to commands. Like BSD accounting, they are sent to user | 184 | responses to commands. Like BSD accounting, they are sent to user |
185 | space on task exit. | 185 | space on task exit. |
186 | 186 | ||
187 | Say N if unsure. | 187 | Say N if unsure. |
188 | 188 | ||
189 | config TASK_DELAY_ACCT | 189 | config TASK_DELAY_ACCT |
190 | bool "Enable per-task delay accounting (EXPERIMENTAL)" | 190 | bool "Enable per-task delay accounting (EXPERIMENTAL)" |
191 | depends on TASKSTATS | 191 | depends on TASKSTATS |
192 | help | 192 | help |
193 | Collect information on time spent by a task waiting for system | 193 | Collect information on time spent by a task waiting for system |
194 | resources like cpu, synchronous block I/O completion and swapping | 194 | resources like cpu, synchronous block I/O completion and swapping |
195 | in pages. Such statistics can help in setting a task's priorities | 195 | in pages. Such statistics can help in setting a task's priorities |
196 | relative to other tasks for cpu, io, rss limits etc. | 196 | relative to other tasks for cpu, io, rss limits etc. |
197 | 197 | ||
198 | Say N if unsure. | 198 | Say N if unsure. |
199 | 199 | ||
200 | config TASK_XACCT | 200 | config TASK_XACCT |
201 | bool "Enable extended accounting over taskstats (EXPERIMENTAL)" | 201 | bool "Enable extended accounting over taskstats (EXPERIMENTAL)" |
202 | depends on TASKSTATS | 202 | depends on TASKSTATS |
203 | help | 203 | help |
204 | Collect extended task accounting data and send the data | 204 | Collect extended task accounting data and send the data |
205 | to userland for processing over the taskstats interface. | 205 | to userland for processing over the taskstats interface. |
206 | 206 | ||
207 | Say N if unsure. | 207 | Say N if unsure. |
208 | 208 | ||
209 | config TASK_IO_ACCOUNTING | 209 | config TASK_IO_ACCOUNTING |
210 | bool "Enable per-task storage I/O accounting (EXPERIMENTAL)" | 210 | bool "Enable per-task storage I/O accounting (EXPERIMENTAL)" |
211 | depends on TASK_XACCT | 211 | depends on TASK_XACCT |
212 | help | 212 | help |
213 | Collect information on the number of bytes of storage I/O which this | 213 | Collect information on the number of bytes of storage I/O which this |
214 | task has caused. | 214 | task has caused. |
215 | 215 | ||
216 | Say N if unsure. | 216 | Say N if unsure. |
217 | 217 | ||
218 | config AUDIT | 218 | config AUDIT |
219 | bool "Auditing support" | 219 | bool "Auditing support" |
220 | depends on NET | 220 | depends on NET |
221 | help | 221 | help |
222 | Enable auditing infrastructure that can be used with another | 222 | Enable auditing infrastructure that can be used with another |
223 | kernel subsystem, such as SELinux (which requires this for | 223 | kernel subsystem, such as SELinux (which requires this for |
224 | logging of avc messages output). Does not do system-call | 224 | logging of avc messages output). Does not do system-call |
225 | auditing without CONFIG_AUDITSYSCALL. | 225 | auditing without CONFIG_AUDITSYSCALL. |
226 | 226 | ||
227 | config AUDITSYSCALL | 227 | config AUDITSYSCALL |
228 | bool "Enable system-call auditing support" | 228 | bool "Enable system-call auditing support" |
229 | depends on AUDIT && (X86 || PPC || PPC64 || S390 || IA64 || UML || SPARC64|| SUPERH) | 229 | depends on AUDIT && (X86 || PPC || PPC64 || S390 || IA64 || UML || SPARC64|| SUPERH) |
230 | default y if SECURITY_SELINUX | 230 | default y if SECURITY_SELINUX |
231 | help | 231 | help |
232 | Enable low-overhead system-call auditing infrastructure that | 232 | Enable low-overhead system-call auditing infrastructure that |
233 | can be used independently or with another kernel subsystem, | 233 | can be used independently or with another kernel subsystem, |
234 | such as SELinux. To use audit's filesystem watch feature, please | 234 | such as SELinux. To use audit's filesystem watch feature, please |
235 | ensure that INOTIFY is configured. | 235 | ensure that INOTIFY is configured. |
236 | 236 | ||
237 | config AUDIT_TREE | 237 | config AUDIT_TREE |
238 | def_bool y | 238 | def_bool y |
239 | depends on AUDITSYSCALL && INOTIFY | 239 | depends on AUDITSYSCALL && INOTIFY |
240 | 240 | ||
241 | config IKCONFIG | 241 | config IKCONFIG |
242 | tristate "Kernel .config support" | 242 | tristate "Kernel .config support" |
243 | ---help--- | 243 | ---help--- |
244 | This option enables the complete Linux kernel ".config" file | 244 | This option enables the complete Linux kernel ".config" file |
245 | contents to be saved in the kernel. It provides documentation | 245 | contents to be saved in the kernel. It provides documentation |
246 | of which kernel options are used in a running kernel or in an | 246 | of which kernel options are used in a running kernel or in an |
247 | on-disk kernel. This information can be extracted from the kernel | 247 | on-disk kernel. This information can be extracted from the kernel |
248 | image file with the script scripts/extract-ikconfig and used as | 248 | image file with the script scripts/extract-ikconfig and used as |
249 | input to rebuild the current kernel or to build another kernel. | 249 | input to rebuild the current kernel or to build another kernel. |
250 | It can also be extracted from a running kernel by reading | 250 | It can also be extracted from a running kernel by reading |
251 | /proc/config.gz if enabled (below). | 251 | /proc/config.gz if enabled (below). |
252 | 252 | ||
253 | config IKCONFIG_PROC | 253 | config IKCONFIG_PROC |
254 | bool "Enable access to .config through /proc/config.gz" | 254 | bool "Enable access to .config through /proc/config.gz" |
255 | depends on IKCONFIG && PROC_FS | 255 | depends on IKCONFIG && PROC_FS |
256 | ---help--- | 256 | ---help--- |
257 | This option enables access to the kernel configuration file | 257 | This option enables access to the kernel configuration file |
258 | through /proc/config.gz. | 258 | through /proc/config.gz. |
259 | 259 | ||
260 | config LOG_BUF_SHIFT | 260 | config LOG_BUF_SHIFT |
261 | int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" | 261 | int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" |
262 | range 12 21 | 262 | range 12 21 |
263 | default 17 | 263 | default 17 |
264 | help | 264 | help |
265 | Select kernel log buffer size as a power of 2. | 265 | Select kernel log buffer size as a power of 2. |
266 | Examples: | 266 | Examples: |
267 | 17 => 128 KB | 267 | 17 => 128 KB |
268 | 16 => 64 KB | 268 | 16 => 64 KB |
269 | 15 => 32 KB | 269 | 15 => 32 KB |
270 | 14 => 16 KB | 270 | 14 => 16 KB |
271 | 13 => 8 KB | 271 | 13 => 8 KB |
272 | 12 => 4 KB | 272 | 12 => 4 KB |
273 | 273 | ||
274 | config CGROUPS | 274 | config CGROUPS |
275 | bool "Control Group support" | 275 | bool "Control Group support" |
276 | help | 276 | help |
277 | This option will let you use process cgroup subsystems | 277 | This option will let you use process cgroup subsystems |
278 | such as Cpusets | 278 | such as Cpusets |
279 | 279 | ||
280 | Say N if unsure. | 280 | Say N if unsure. |
281 | 281 | ||
282 | config CGROUP_DEBUG | 282 | config CGROUP_DEBUG |
283 | bool "Example debug cgroup subsystem" | 283 | bool "Example debug cgroup subsystem" |
284 | depends on CGROUPS | 284 | depends on CGROUPS |
285 | default n | 285 | default n |
286 | help | 286 | help |
287 | This option enables a simple cgroup subsystem that | 287 | This option enables a simple cgroup subsystem that |
288 | exports useful debugging information about the cgroups | 288 | exports useful debugging information about the cgroups |
289 | framework | 289 | framework |
290 | 290 | ||
291 | Say N if unsure | 291 | Say N if unsure |
292 | 292 | ||
293 | config CGROUP_NS | 293 | config CGROUP_NS |
294 | bool "Namespace cgroup subsystem" | 294 | bool "Namespace cgroup subsystem" |
295 | depends on CGROUPS | 295 | depends on CGROUPS |
296 | help | 296 | help |
297 | Provides a simple namespace cgroup subsystem to | 297 | Provides a simple namespace cgroup subsystem to |
298 | provide hierarchical naming of sets of namespaces, | 298 | provide hierarchical naming of sets of namespaces, |
299 | for instance virtual servers and checkpoint/restart | 299 | for instance virtual servers and checkpoint/restart |
300 | jobs. | 300 | jobs. |
301 | 301 | ||
302 | config CGROUP_DEVICE | 302 | config CGROUP_DEVICE |
303 | bool "Device controller for cgroups" | 303 | bool "Device controller for cgroups" |
304 | depends on CGROUPS && EXPERIMENTAL | 304 | depends on CGROUPS && EXPERIMENTAL |
305 | help | 305 | help |
306 | Provides a cgroup implementing whitelists for devices which | 306 | Provides a cgroup implementing whitelists for devices which |
307 | a process in the cgroup can mknod or open. | 307 | a process in the cgroup can mknod or open. |
308 | 308 | ||
309 | config CPUSETS | 309 | config CPUSETS |
310 | bool "Cpuset support" | 310 | bool "Cpuset support" |
311 | depends on SMP && CGROUPS | 311 | depends on SMP && CGROUPS |
312 | help | 312 | help |
313 | This option will let you create and manage CPUSETs which | 313 | This option will let you create and manage CPUSETs which |
314 | allow dynamically partitioning a system into sets of CPUs and | 314 | allow dynamically partitioning a system into sets of CPUs and |
315 | Memory Nodes and assigning tasks to run only within those sets. | 315 | Memory Nodes and assigning tasks to run only within those sets. |
316 | This is primarily useful on large SMP or NUMA systems. | 316 | This is primarily useful on large SMP or NUMA systems. |
317 | 317 | ||
318 | Say N if unsure. | 318 | Say N if unsure. |
319 | 319 | ||
320 | # | 320 | # |
321 | # Architectures with an unreliable sched_clock() should select this: | 321 | # Architectures with an unreliable sched_clock() should select this: |
322 | # | 322 | # |
323 | config HAVE_UNSTABLE_SCHED_CLOCK | 323 | config HAVE_UNSTABLE_SCHED_CLOCK |
324 | bool | 324 | bool |
325 | 325 | ||
326 | config GROUP_SCHED | 326 | config GROUP_SCHED |
327 | bool "Group CPU scheduler" | 327 | bool "Group CPU scheduler" |
328 | depends on EXPERIMENTAL | 328 | depends on EXPERIMENTAL |
329 | default n | 329 | default n |
330 | help | 330 | help |
331 | This feature lets CPU scheduler recognize task groups and control CPU | 331 | This feature lets CPU scheduler recognize task groups and control CPU |
332 | bandwidth allocation to such task groups. | 332 | bandwidth allocation to such task groups. |
333 | 333 | ||
334 | config FAIR_GROUP_SCHED | 334 | config FAIR_GROUP_SCHED |
335 | bool "Group scheduling for SCHED_OTHER" | 335 | bool "Group scheduling for SCHED_OTHER" |
336 | depends on GROUP_SCHED | 336 | depends on GROUP_SCHED |
337 | default GROUP_SCHED | 337 | default GROUP_SCHED |
338 | 338 | ||
339 | config RT_GROUP_SCHED | 339 | config RT_GROUP_SCHED |
340 | bool "Group scheduling for SCHED_RR/FIFO" | 340 | bool "Group scheduling for SCHED_RR/FIFO" |
341 | depends on EXPERIMENTAL | 341 | depends on EXPERIMENTAL |
342 | depends on GROUP_SCHED | 342 | depends on GROUP_SCHED |
343 | default n | 343 | default n |
344 | help | 344 | help |
345 | This feature lets you explicitly allocate real CPU bandwidth | 345 | This feature lets you explicitly allocate real CPU bandwidth |
346 | to users or control groups (depending on the "Basis for grouping tasks" | 346 | to users or control groups (depending on the "Basis for grouping tasks" |
347 | setting below. If enabled, it will also make it impossible to | 347 | setting below. If enabled, it will also make it impossible to |
348 | schedule realtime tasks for non-root users until you allocate | 348 | schedule realtime tasks for non-root users until you allocate |
349 | realtime bandwidth for them. | 349 | realtime bandwidth for them. |
350 | See Documentation/sched-rt-group.txt for more information. | 350 | See Documentation/sched-rt-group.txt for more information. |
351 | 351 | ||
352 | choice | 352 | choice |
353 | depends on GROUP_SCHED | 353 | depends on GROUP_SCHED |
354 | prompt "Basis for grouping tasks" | 354 | prompt "Basis for grouping tasks" |
355 | default USER_SCHED | 355 | default USER_SCHED |
356 | 356 | ||
357 | config USER_SCHED | 357 | config USER_SCHED |
358 | bool "user id" | 358 | bool "user id" |
359 | help | 359 | help |
360 | This option will choose userid as the basis for grouping | 360 | This option will choose userid as the basis for grouping |
361 | tasks, thus providing equal CPU bandwidth to each user. | 361 | tasks, thus providing equal CPU bandwidth to each user. |
362 | 362 | ||
363 | config CGROUP_SCHED | 363 | config CGROUP_SCHED |
364 | bool "Control groups" | 364 | bool "Control groups" |
365 | depends on CGROUPS | 365 | depends on CGROUPS |
366 | help | 366 | help |
367 | This option allows you to create arbitrary task groups | 367 | This option allows you to create arbitrary task groups |
368 | using the "cgroup" pseudo filesystem and control | 368 | using the "cgroup" pseudo filesystem and control |
369 | the cpu bandwidth allocated to each such task group. | 369 | the cpu bandwidth allocated to each such task group. |
370 | Refer to Documentation/cgroups.txt for more information | 370 | Refer to Documentation/cgroups.txt for more information |
371 | on "cgroup" pseudo filesystem. | 371 | on "cgroup" pseudo filesystem. |
372 | 372 | ||
373 | endchoice | 373 | endchoice |
374 | 374 | ||
375 | config CGROUP_CPUACCT | 375 | config CGROUP_CPUACCT |
376 | bool "Simple CPU accounting cgroup subsystem" | 376 | bool "Simple CPU accounting cgroup subsystem" |
377 | depends on CGROUPS | 377 | depends on CGROUPS |
378 | help | 378 | help |
379 | Provides a simple Resource Controller for monitoring the | 379 | Provides a simple Resource Controller for monitoring the |
380 | total CPU consumed by the tasks in a cgroup | 380 | total CPU consumed by the tasks in a cgroup |
381 | 381 | ||
382 | config RESOURCE_COUNTERS | 382 | config RESOURCE_COUNTERS |
383 | bool "Resource counters" | 383 | bool "Resource counters" |
384 | help | 384 | help |
385 | This option enables controller independent resource accounting | 385 | This option enables controller independent resource accounting |
386 | infrastructure that works with cgroups | 386 | infrastructure that works with cgroups |
387 | depends on CGROUPS | 387 | depends on CGROUPS |
388 | 388 | ||
389 | config MM_OWNER | 389 | config MM_OWNER |
390 | bool | 390 | bool |
391 | 391 | ||
392 | config CGROUP_MEM_RES_CTLR | 392 | config CGROUP_MEM_RES_CTLR |
393 | bool "Memory Resource Controller for Control Groups" | 393 | bool "Memory Resource Controller for Control Groups" |
394 | depends on CGROUPS && RESOURCE_COUNTERS | 394 | depends on CGROUPS && RESOURCE_COUNTERS |
395 | select MM_OWNER | 395 | select MM_OWNER |
396 | help | 396 | help |
397 | Provides a memory resource controller that manages both page cache and | 397 | Provides a memory resource controller that manages both page cache and |
398 | RSS memory. | 398 | RSS memory. |
399 | 399 | ||
400 | Note that setting this option increases fixed memory overhead | 400 | Note that setting this option increases fixed memory overhead |
401 | associated with each page of memory in the system by 4/8 bytes | 401 | associated with each page of memory in the system by 4/8 bytes |
402 | and also increases cache misses because struct page on many 64bit | 402 | and also increases cache misses because struct page on many 64bit |
403 | systems will not fit into a single cache line anymore. | 403 | systems will not fit into a single cache line anymore. |
404 | 404 | ||
405 | Only enable when you're ok with these trade offs and really | 405 | Only enable when you're ok with these trade offs and really |
406 | sure you need the memory resource controller. | 406 | sure you need the memory resource controller. |
407 | 407 | ||
408 | This config option also selects MM_OWNER config option, which | 408 | This config option also selects MM_OWNER config option, which |
409 | could in turn add some fork/exit overhead. | 409 | could in turn add some fork/exit overhead. |
410 | 410 | ||
411 | config SYSFS_DEPRECATED | 411 | config SYSFS_DEPRECATED |
412 | bool | 412 | bool |
413 | 413 | ||
414 | config SYSFS_DEPRECATED_V2 | 414 | config SYSFS_DEPRECATED_V2 |
415 | bool "Create deprecated sysfs files" | 415 | bool "Create deprecated sysfs files" |
416 | depends on SYSFS | 416 | depends on SYSFS |
417 | default y | 417 | default y |
418 | select SYSFS_DEPRECATED | 418 | select SYSFS_DEPRECATED |
419 | help | 419 | help |
420 | This option creates deprecated symlinks such as the | 420 | This option creates deprecated symlinks such as the |
421 | "device"-link, the <subsystem>:<name>-link, and the | 421 | "device"-link, the <subsystem>:<name>-link, and the |
422 | "bus"-link. It may also add deprecated key in the | 422 | "bus"-link. It may also add deprecated key in the |
423 | uevent environment. | 423 | uevent environment. |
424 | None of these features or values should be used today, as | 424 | None of these features or values should be used today, as |
425 | they export driver core implementation details to userspace | 425 | they export driver core implementation details to userspace |
426 | or export properties which can't be kept stable across kernel | 426 | or export properties which can't be kept stable across kernel |
427 | releases. | 427 | releases. |
428 | 428 | ||
429 | If enabled, this option will also move any device structures | 429 | If enabled, this option will also move any device structures |
430 | that belong to a class, back into the /sys/class hierarchy, in | 430 | that belong to a class, back into the /sys/class hierarchy, in |
431 | order to support older versions of udev and some userspace | 431 | order to support older versions of udev and some userspace |
432 | programs. | 432 | programs. |
433 | 433 | ||
434 | If you are using a distro with the most recent userspace | 434 | If you are using a distro with the most recent userspace |
435 | packages, it should be safe to say N here. | 435 | packages, it should be safe to say N here. |
436 | 436 | ||
437 | config PROC_PID_CPUSET | 437 | config PROC_PID_CPUSET |
438 | bool "Include legacy /proc/<pid>/cpuset file" | 438 | bool "Include legacy /proc/<pid>/cpuset file" |
439 | depends on CPUSETS | 439 | depends on CPUSETS |
440 | default y | 440 | default y |
441 | 441 | ||
442 | config RELAY | 442 | config RELAY |
443 | bool "Kernel->user space relay support (formerly relayfs)" | 443 | bool "Kernel->user space relay support (formerly relayfs)" |
444 | help | 444 | help |
445 | This option enables support for relay interface support in | 445 | This option enables support for relay interface support in |
446 | certain file systems (such as debugfs). | 446 | certain file systems (such as debugfs). |
447 | It is designed to provide an efficient mechanism for tools and | 447 | It is designed to provide an efficient mechanism for tools and |
448 | facilities to relay large amounts of data from kernel space to | 448 | facilities to relay large amounts of data from kernel space to |
449 | user space. | 449 | user space. |
450 | 450 | ||
451 | If unsure, say N. | 451 | If unsure, say N. |
452 | 452 | ||
453 | config NAMESPACES | 453 | config NAMESPACES |
454 | bool "Namespaces support" if EMBEDDED | 454 | bool "Namespaces support" if EMBEDDED |
455 | default !EMBEDDED | 455 | default !EMBEDDED |
456 | help | 456 | help |
457 | Provides the way to make tasks work with different objects using | 457 | Provides the way to make tasks work with different objects using |
458 | the same id. For example same IPC id may refer to different objects | 458 | the same id. For example same IPC id may refer to different objects |
459 | or same user id or pid may refer to different tasks when used in | 459 | or same user id or pid may refer to different tasks when used in |
460 | different namespaces. | 460 | different namespaces. |
461 | 461 | ||
462 | config UTS_NS | 462 | config UTS_NS |
463 | bool "UTS namespace" | 463 | bool "UTS namespace" |
464 | depends on NAMESPACES | 464 | depends on NAMESPACES |
465 | help | 465 | help |
466 | In this namespace tasks see different info provided with the | 466 | In this namespace tasks see different info provided with the |
467 | uname() system call | 467 | uname() system call |
468 | 468 | ||
469 | config IPC_NS | 469 | config IPC_NS |
470 | bool "IPC namespace" | 470 | bool "IPC namespace" |
471 | depends on NAMESPACES && SYSVIPC | 471 | depends on NAMESPACES && SYSVIPC |
472 | help | 472 | help |
473 | In this namespace tasks work with IPC ids which correspond to | 473 | In this namespace tasks work with IPC ids which correspond to |
474 | different IPC objects in different namespaces | 474 | different IPC objects in different namespaces |
475 | 475 | ||
476 | config USER_NS | 476 | config USER_NS |
477 | bool "User namespace (EXPERIMENTAL)" | 477 | bool "User namespace (EXPERIMENTAL)" |
478 | depends on NAMESPACES && EXPERIMENTAL | 478 | depends on NAMESPACES && EXPERIMENTAL |
479 | help | 479 | help |
480 | This allows containers, i.e. vservers, to use user namespaces | 480 | This allows containers, i.e. vservers, to use user namespaces |
481 | to provide different user info for different servers. | 481 | to provide different user info for different servers. |
482 | If unsure, say N. | 482 | If unsure, say N. |
483 | 483 | ||
484 | config PID_NS | 484 | config PID_NS |
485 | bool "PID Namespaces (EXPERIMENTAL)" | 485 | bool "PID Namespaces (EXPERIMENTAL)" |
486 | default n | 486 | default n |
487 | depends on NAMESPACES && EXPERIMENTAL | 487 | depends on NAMESPACES && EXPERIMENTAL |
488 | help | 488 | help |
489 | Suport process id namespaces. This allows having multiple | 489 | Suport process id namespaces. This allows having multiple |
490 | process with the same pid as long as they are in different | 490 | process with the same pid as long as they are in different |
491 | pid namespaces. This is a building block of containers. | 491 | pid namespaces. This is a building block of containers. |
492 | 492 | ||
493 | Unless you want to work with an experimental feature | 493 | Unless you want to work with an experimental feature |
494 | say N here. | 494 | say N here. |
495 | 495 | ||
496 | config BLK_DEV_INITRD | 496 | config BLK_DEV_INITRD |
497 | bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support" | 497 | bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support" |
498 | depends on BROKEN || !FRV | 498 | depends on BROKEN || !FRV |
499 | help | 499 | help |
500 | The initial RAM filesystem is a ramfs which is loaded by the | 500 | The initial RAM filesystem is a ramfs which is loaded by the |
501 | boot loader (loadlin or lilo) and that is mounted as root | 501 | boot loader (loadlin or lilo) and that is mounted as root |
502 | before the normal boot procedure. It is typically used to | 502 | before the normal boot procedure. It is typically used to |
503 | load modules needed to mount the "real" root file system, | 503 | load modules needed to mount the "real" root file system, |
504 | etc. See <file:Documentation/initrd.txt> for details. | 504 | etc. See <file:Documentation/initrd.txt> for details. |
505 | 505 | ||
506 | If RAM disk support (BLK_DEV_RAM) is also included, this | 506 | If RAM disk support (BLK_DEV_RAM) is also included, this |
507 | also enables initial RAM disk (initrd) support and adds | 507 | also enables initial RAM disk (initrd) support and adds |
508 | 15 Kbytes (more on some other architectures) to the kernel size. | 508 | 15 Kbytes (more on some other architectures) to the kernel size. |
509 | 509 | ||
510 | If unsure say Y. | 510 | If unsure say Y. |
511 | 511 | ||
512 | if BLK_DEV_INITRD | 512 | if BLK_DEV_INITRD |
513 | 513 | ||
514 | source "usr/Kconfig" | 514 | source "usr/Kconfig" |
515 | 515 | ||
516 | endif | 516 | endif |
517 | 517 | ||
518 | config CC_OPTIMIZE_FOR_SIZE | 518 | config CC_OPTIMIZE_FOR_SIZE |
519 | bool "Optimize for size" | 519 | bool "Optimize for size" |
520 | default y | 520 | default y |
521 | help | 521 | help |
522 | Enabling this option will pass "-Os" instead of "-O2" to gcc | 522 | Enabling this option will pass "-Os" instead of "-O2" to gcc |
523 | resulting in a smaller kernel. | 523 | resulting in a smaller kernel. |
524 | 524 | ||
525 | If unsure, say N. | 525 | If unsure, say N. |
526 | 526 | ||
527 | config SYSCTL | 527 | config SYSCTL |
528 | bool | 528 | bool |
529 | 529 | ||
530 | menuconfig EMBEDDED | 530 | menuconfig EMBEDDED |
531 | bool "Configure standard kernel features (for small systems)" | 531 | bool "Configure standard kernel features (for small systems)" |
532 | help | 532 | help |
533 | This option allows certain base kernel options and settings | 533 | This option allows certain base kernel options and settings |
534 | to be disabled or tweaked. This is for specialized | 534 | to be disabled or tweaked. This is for specialized |
535 | environments which can tolerate a "non-standard" kernel. | 535 | environments which can tolerate a "non-standard" kernel. |
536 | Only use this if you really know what you are doing. | 536 | Only use this if you really know what you are doing. |
537 | 537 | ||
538 | config UID16 | 538 | config UID16 |
539 | bool "Enable 16-bit UID system calls" if EMBEDDED | 539 | bool "Enable 16-bit UID system calls" if EMBEDDED |
540 | depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && COMPAT) || UML || (X86_64 && IA32_EMULATION) | 540 | depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && COMPAT) || UML || (X86_64 && IA32_EMULATION) |
541 | default y | 541 | default y |
542 | help | 542 | help |
543 | This enables the legacy 16-bit UID syscall wrappers. | 543 | This enables the legacy 16-bit UID syscall wrappers. |
544 | 544 | ||
545 | config SYSCTL_SYSCALL | 545 | config SYSCTL_SYSCALL |
546 | bool "Sysctl syscall support" if EMBEDDED | 546 | bool "Sysctl syscall support" if EMBEDDED |
547 | default y | 547 | default y |
548 | select SYSCTL | 548 | select SYSCTL |
549 | ---help--- | 549 | ---help--- |
550 | sys_sysctl uses binary paths that have been found challenging | 550 | sys_sysctl uses binary paths that have been found challenging |
551 | to properly maintain and use. The interface in /proc/sys | 551 | to properly maintain and use. The interface in /proc/sys |
552 | using paths with ascii names is now the primary path to this | 552 | using paths with ascii names is now the primary path to this |
553 | information. | 553 | information. |
554 | 554 | ||
555 | Almost nothing using the binary sysctl interface so if you are | 555 | Almost nothing using the binary sysctl interface so if you are |
556 | trying to save some space it is probably safe to disable this, | 556 | trying to save some space it is probably safe to disable this, |
557 | making your kernel marginally smaller. | 557 | making your kernel marginally smaller. |
558 | 558 | ||
559 | If unsure say Y here. | 559 | If unsure say Y here. |
560 | 560 | ||
561 | config SYSCTL_SYSCALL_CHECK | 561 | config SYSCTL_SYSCALL_CHECK |
562 | bool "Sysctl checks" if EMBEDDED | 562 | bool "Sysctl checks" if EMBEDDED |
563 | depends on SYSCTL_SYSCALL | 563 | depends on SYSCTL_SYSCALL |
564 | default y | 564 | default y |
565 | ---help--- | 565 | ---help--- |
566 | sys_sysctl uses binary paths that have been found challenging | 566 | sys_sysctl uses binary paths that have been found challenging |
567 | to properly maintain and use. This enables checks that help | 567 | to properly maintain and use. This enables checks that help |
568 | you to keep things correct. | 568 | you to keep things correct. |
569 | 569 | ||
570 | If unsure say Y here. | 570 | If unsure say Y here. |
571 | 571 | ||
572 | config KALLSYMS | 572 | config KALLSYMS |
573 | bool "Load all symbols for debugging/ksymoops" if EMBEDDED | 573 | bool "Load all symbols for debugging/ksymoops" if EMBEDDED |
574 | default y | 574 | default y |
575 | help | 575 | help |
576 | Say Y here to let the kernel print out symbolic crash information and | 576 | Say Y here to let the kernel print out symbolic crash information and |
577 | symbolic stack backtraces. This increases the size of the kernel | 577 | symbolic stack backtraces. This increases the size of the kernel |
578 | somewhat, as all symbols have to be loaded into the kernel image. | 578 | somewhat, as all symbols have to be loaded into the kernel image. |
579 | 579 | ||
580 | config KALLSYMS_ALL | 580 | config KALLSYMS_ALL |
581 | bool "Include all symbols in kallsyms" | 581 | bool "Include all symbols in kallsyms" |
582 | depends on DEBUG_KERNEL && KALLSYMS | 582 | depends on DEBUG_KERNEL && KALLSYMS |
583 | help | 583 | help |
584 | Normally kallsyms only contains the symbols of functions, for nicer | 584 | Normally kallsyms only contains the symbols of functions, for nicer |
585 | OOPS messages. Some debuggers can use kallsyms for other | 585 | OOPS messages. Some debuggers can use kallsyms for other |
586 | symbols too: say Y here to include all symbols, if you need them | 586 | symbols too: say Y here to include all symbols, if you need them |
587 | and you don't care about adding 300k to the size of your kernel. | 587 | and you don't care about adding 300k to the size of your kernel. |
588 | 588 | ||
589 | Say N. | 589 | Say N. |
590 | 590 | ||
591 | config KALLSYMS_EXTRA_PASS | 591 | config KALLSYMS_EXTRA_PASS |
592 | bool "Do an extra kallsyms pass" | 592 | bool "Do an extra kallsyms pass" |
593 | depends on KALLSYMS | 593 | depends on KALLSYMS |
594 | help | 594 | help |
595 | If kallsyms is not working correctly, the build will fail with | 595 | If kallsyms is not working correctly, the build will fail with |
596 | inconsistent kallsyms data. If that occurs, log a bug report and | 596 | inconsistent kallsyms data. If that occurs, log a bug report and |
597 | turn on KALLSYMS_EXTRA_PASS which should result in a stable build. | 597 | turn on KALLSYMS_EXTRA_PASS which should result in a stable build. |
598 | Always say N here unless you find a bug in kallsyms, which must be | 598 | Always say N here unless you find a bug in kallsyms, which must be |
599 | reported. KALLSYMS_EXTRA_PASS is only a temporary workaround while | 599 | reported. KALLSYMS_EXTRA_PASS is only a temporary workaround while |
600 | you wait for kallsyms to be fixed. | 600 | you wait for kallsyms to be fixed. |
601 | 601 | ||
602 | 602 | ||
603 | config HOTPLUG | 603 | config HOTPLUG |
604 | bool "Support for hot-pluggable devices" if EMBEDDED | 604 | bool "Support for hot-pluggable devices" if EMBEDDED |
605 | default y | 605 | default y |
606 | help | 606 | help |
607 | This option is provided for the case where no hotplug or uevent | 607 | This option is provided for the case where no hotplug or uevent |
608 | capabilities is wanted by the kernel. You should only consider | 608 | capabilities is wanted by the kernel. You should only consider |
609 | disabling this option for embedded systems that do not use modules, a | 609 | disabling this option for embedded systems that do not use modules, a |
610 | dynamic /dev tree, or dynamic device discovery. Just say Y. | 610 | dynamic /dev tree, or dynamic device discovery. Just say Y. |
611 | 611 | ||
612 | config PRINTK | 612 | config PRINTK |
613 | default y | 613 | default y |
614 | bool "Enable support for printk" if EMBEDDED | 614 | bool "Enable support for printk" if EMBEDDED |
615 | help | 615 | help |
616 | This option enables normal printk support. Removing it | 616 | This option enables normal printk support. Removing it |
617 | eliminates most of the message strings from the kernel image | 617 | eliminates most of the message strings from the kernel image |
618 | and makes the kernel more or less silent. As this makes it | 618 | and makes the kernel more or less silent. As this makes it |
619 | very difficult to diagnose system problems, saying N here is | 619 | very difficult to diagnose system problems, saying N here is |
620 | strongly discouraged. | 620 | strongly discouraged. |
621 | 621 | ||
622 | config BUG | 622 | config BUG |
623 | bool "BUG() support" if EMBEDDED | 623 | bool "BUG() support" if EMBEDDED |
624 | default y | 624 | default y |
625 | help | 625 | help |
626 | Disabling this option eliminates support for BUG and WARN, reducing | 626 | Disabling this option eliminates support for BUG and WARN, reducing |
627 | the size of your kernel image and potentially quietly ignoring | 627 | the size of your kernel image and potentially quietly ignoring |
628 | numerous fatal conditions. You should only consider disabling this | 628 | numerous fatal conditions. You should only consider disabling this |
629 | option for embedded systems with no facilities for reporting errors. | 629 | option for embedded systems with no facilities for reporting errors. |
630 | Just say Y. | 630 | Just say Y. |
631 | 631 | ||
632 | config ELF_CORE | 632 | config ELF_CORE |
633 | default y | 633 | default y |
634 | bool "Enable ELF core dumps" if EMBEDDED | 634 | bool "Enable ELF core dumps" if EMBEDDED |
635 | help | 635 | help |
636 | Enable support for generating core dumps. Disabling saves about 4k. | 636 | Enable support for generating core dumps. Disabling saves about 4k. |
637 | 637 | ||
638 | config PCSPKR_PLATFORM | 638 | config PCSPKR_PLATFORM |
639 | bool "Enable PC-Speaker support" if EMBEDDED | 639 | bool "Enable PC-Speaker support" if EMBEDDED |
640 | depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES | 640 | depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES |
641 | default y | 641 | default y |
642 | help | 642 | help |
643 | This option allows to disable the internal PC-Speaker | 643 | This option allows to disable the internal PC-Speaker |
644 | support, saving some memory. | 644 | support, saving some memory. |
645 | 645 | ||
646 | config COMPAT_BRK | 646 | config COMPAT_BRK |
647 | bool "Disable heap randomization" | 647 | bool "Disable heap randomization" |
648 | default y | 648 | default y |
649 | help | 649 | help |
650 | Randomizing heap placement makes heap exploits harder, but it | 650 | Randomizing heap placement makes heap exploits harder, but it |
651 | also breaks ancient binaries (including anything libc5 based). | 651 | also breaks ancient binaries (including anything libc5 based). |
652 | This option changes the bootup default to heap randomization | 652 | This option changes the bootup default to heap randomization |
653 | disabled, and can be overriden runtime by setting | 653 | disabled, and can be overriden runtime by setting |
654 | /proc/sys/kernel/randomize_va_space to 2. | 654 | /proc/sys/kernel/randomize_va_space to 2. |
655 | 655 | ||
656 | On non-ancient distros (post-2000 ones) N is usually a safe choice. | 656 | On non-ancient distros (post-2000 ones) N is usually a safe choice. |
657 | 657 | ||
658 | config BASE_FULL | 658 | config BASE_FULL |
659 | default y | 659 | default y |
660 | bool "Enable full-sized data structures for core" if EMBEDDED | 660 | bool "Enable full-sized data structures for core" if EMBEDDED |
661 | help | 661 | help |
662 | Disabling this option reduces the size of miscellaneous core | 662 | Disabling this option reduces the size of miscellaneous core |
663 | kernel data structures. This saves memory on small machines, | 663 | kernel data structures. This saves memory on small machines, |
664 | but may reduce performance. | 664 | but may reduce performance. |
665 | 665 | ||
666 | config FUTEX | 666 | config FUTEX |
667 | bool "Enable futex support" if EMBEDDED | 667 | bool "Enable futex support" if EMBEDDED |
668 | default y | 668 | default y |
669 | select RT_MUTEXES | 669 | select RT_MUTEXES |
670 | help | 670 | help |
671 | Disabling this option will cause the kernel to be built without | 671 | Disabling this option will cause the kernel to be built without |
672 | support for "fast userspace mutexes". The resulting kernel may not | 672 | support for "fast userspace mutexes". The resulting kernel may not |
673 | run glibc-based applications correctly. | 673 | run glibc-based applications correctly. |
674 | 674 | ||
675 | config ANON_INODES | 675 | config ANON_INODES |
676 | bool | 676 | bool |
677 | 677 | ||
678 | config EPOLL | 678 | config EPOLL |
679 | bool "Enable eventpoll support" if EMBEDDED | 679 | bool "Enable eventpoll support" if EMBEDDED |
680 | default y | 680 | default y |
681 | select ANON_INODES | 681 | select ANON_INODES |
682 | help | 682 | help |
683 | Disabling this option will cause the kernel to be built without | 683 | Disabling this option will cause the kernel to be built without |
684 | support for epoll family of system calls. | 684 | support for epoll family of system calls. |
685 | 685 | ||
686 | config SIGNALFD | 686 | config SIGNALFD |
687 | bool "Enable signalfd() system call" if EMBEDDED | 687 | bool "Enable signalfd() system call" if EMBEDDED |
688 | select ANON_INODES | 688 | select ANON_INODES |
689 | default y | 689 | default y |
690 | help | 690 | help |
691 | Enable the signalfd() system call that allows to receive signals | 691 | Enable the signalfd() system call that allows to receive signals |
692 | on a file descriptor. | 692 | on a file descriptor. |
693 | 693 | ||
694 | If unsure, say Y. | 694 | If unsure, say Y. |
695 | 695 | ||
696 | config TIMERFD | 696 | config TIMERFD |
697 | bool "Enable timerfd() system call" if EMBEDDED | 697 | bool "Enable timerfd() system call" if EMBEDDED |
698 | select ANON_INODES | 698 | select ANON_INODES |
699 | default y | 699 | default y |
700 | help | 700 | help |
701 | Enable the timerfd() system call that allows to receive timer | 701 | Enable the timerfd() system call that allows to receive timer |
702 | events on a file descriptor. | 702 | events on a file descriptor. |
703 | 703 | ||
704 | If unsure, say Y. | 704 | If unsure, say Y. |
705 | 705 | ||
706 | config EVENTFD | 706 | config EVENTFD |
707 | bool "Enable eventfd() system call" if EMBEDDED | 707 | bool "Enable eventfd() system call" if EMBEDDED |
708 | select ANON_INODES | 708 | select ANON_INODES |
709 | default y | 709 | default y |
710 | help | 710 | help |
711 | Enable the eventfd() system call that allows to receive both | 711 | Enable the eventfd() system call that allows to receive both |
712 | kernel notification (ie. KAIO) or userspace notifications. | 712 | kernel notification (ie. KAIO) or userspace notifications. |
713 | 713 | ||
714 | If unsure, say Y. | 714 | If unsure, say Y. |
715 | 715 | ||
716 | config SHMEM | 716 | config SHMEM |
717 | bool "Use full shmem filesystem" if EMBEDDED | 717 | bool "Use full shmem filesystem" if EMBEDDED |
718 | default y | 718 | default y |
719 | depends on MMU | 719 | depends on MMU |
720 | help | 720 | help |
721 | The shmem is an internal filesystem used to manage shared memory. | 721 | The shmem is an internal filesystem used to manage shared memory. |
722 | It is backed by swap and manages resource limits. It is also exported | 722 | It is backed by swap and manages resource limits. It is also exported |
723 | to userspace as tmpfs if TMPFS is enabled. Disabling this | 723 | to userspace as tmpfs if TMPFS is enabled. Disabling this |
724 | option replaces shmem and tmpfs with the much simpler ramfs code, | 724 | option replaces shmem and tmpfs with the much simpler ramfs code, |
725 | which may be appropriate on small systems without swap. | 725 | which may be appropriate on small systems without swap. |
726 | 726 | ||
727 | config VM_EVENT_COUNTERS | 727 | config VM_EVENT_COUNTERS |
728 | default y | 728 | default y |
729 | bool "Enable VM event counters for /proc/vmstat" if EMBEDDED | 729 | bool "Enable VM event counters for /proc/vmstat" if EMBEDDED |
730 | help | 730 | help |
731 | VM event counters are needed for event counts to be shown. | 731 | VM event counters are needed for event counts to be shown. |
732 | This option allows the disabling of the VM event counters | 732 | This option allows the disabling of the VM event counters |
733 | on EMBEDDED systems. /proc/vmstat will only show page counts | 733 | on EMBEDDED systems. /proc/vmstat will only show page counts |
734 | if VM event counters are disabled. | 734 | if VM event counters are disabled. |
735 | 735 | ||
736 | config SLUB_DEBUG | 736 | config SLUB_DEBUG |
737 | default y | 737 | default y |
738 | bool "Enable SLUB debugging support" if EMBEDDED | 738 | bool "Enable SLUB debugging support" if EMBEDDED |
739 | depends on SLUB && SYSFS | 739 | depends on SLUB && SYSFS |
740 | help | 740 | help |
741 | SLUB has extensive debug support features. Disabling these can | 741 | SLUB has extensive debug support features. Disabling these can |
742 | result in significant savings in code size. This also disables | 742 | result in significant savings in code size. This also disables |
743 | SLUB sysfs support. /sys/slab will not exist and there will be | 743 | SLUB sysfs support. /sys/slab will not exist and there will be |
744 | no support for cache validation etc. | 744 | no support for cache validation etc. |
745 | 745 | ||
746 | choice | 746 | choice |
747 | prompt "Choose SLAB allocator" | 747 | prompt "Choose SLAB allocator" |
748 | default SLUB | 748 | default SLUB |
749 | help | 749 | help |
750 | This option allows to select a slab allocator. | 750 | This option allows to select a slab allocator. |
751 | 751 | ||
752 | config SLAB | 752 | config SLAB |
753 | bool "SLAB" | 753 | bool "SLAB" |
754 | help | 754 | help |
755 | The regular slab allocator that is established and known to work | 755 | The regular slab allocator that is established and known to work |
756 | well in all environments. It organizes cache hot objects in | 756 | well in all environments. It organizes cache hot objects in |
757 | per cpu and per node queues. SLAB is the default choice for | 757 | per cpu and per node queues. SLAB is the default choice for |
758 | a slab allocator. | 758 | a slab allocator. |
759 | 759 | ||
760 | config SLUB | 760 | config SLUB |
761 | bool "SLUB (Unqueued Allocator)" | 761 | bool "SLUB (Unqueued Allocator)" |
762 | help | 762 | help |
763 | SLUB is a slab allocator that minimizes cache line usage | 763 | SLUB is a slab allocator that minimizes cache line usage |
764 | instead of managing queues of cached objects (SLAB approach). | 764 | instead of managing queues of cached objects (SLAB approach). |
765 | Per cpu caching is realized using slabs of objects instead | 765 | Per cpu caching is realized using slabs of objects instead |
766 | of queues of objects. SLUB can use memory efficiently | 766 | of queues of objects. SLUB can use memory efficiently |
767 | and has enhanced diagnostics. | 767 | and has enhanced diagnostics. |
768 | 768 | ||
769 | config SLOB | 769 | config SLOB |
770 | depends on EMBEDDED | 770 | depends on EMBEDDED |
771 | bool "SLOB (Simple Allocator)" | 771 | bool "SLOB (Simple Allocator)" |
772 | help | 772 | help |
773 | SLOB replaces the stock allocator with a drastically simpler | 773 | SLOB replaces the stock allocator with a drastically simpler |
774 | allocator. SLOB is generally more space efficient but | 774 | allocator. SLOB is generally more space efficient but |
775 | does not perform as well on large systems. | 775 | does not perform as well on large systems. |
776 | 776 | ||
777 | endchoice | 777 | endchoice |
778 | 778 | ||
779 | config PROFILING | 779 | config PROFILING |
780 | bool "Profiling support (EXPERIMENTAL)" | 780 | bool "Profiling support (EXPERIMENTAL)" |
781 | help | 781 | help |
782 | Say Y here to enable the extended profiling support mechanisms used | 782 | Say Y here to enable the extended profiling support mechanisms used |
783 | by profilers such as OProfile. | 783 | by profilers such as OProfile. |
784 | 784 | ||
785 | config MARKERS | 785 | config MARKERS |
786 | bool "Activate markers" | 786 | bool "Activate markers" |
787 | help | 787 | help |
788 | Place an empty function call at each marker site. Can be | 788 | Place an empty function call at each marker site. Can be |
789 | dynamically changed for a probe function. | 789 | dynamically changed for a probe function. |
790 | 790 | ||
791 | source "arch/Kconfig" | 791 | source "arch/Kconfig" |
792 | 792 | ||
793 | config PROC_PAGE_MONITOR | 793 | config PROC_PAGE_MONITOR |
794 | default y | 794 | default y |
795 | depends on PROC_FS && MMU | 795 | depends on PROC_FS && MMU |
796 | bool "Enable /proc page monitoring" if EMBEDDED | 796 | bool "Enable /proc page monitoring" if EMBEDDED |
797 | help | 797 | help |
798 | Various /proc files exist to monitor process memory utilization: | 798 | Various /proc files exist to monitor process memory utilization: |
799 | /proc/pid/smaps, /proc/pid/clear_refs, /proc/pid/pagemap, | 799 | /proc/pid/smaps, /proc/pid/clear_refs, /proc/pid/pagemap, |
800 | /proc/kpagecount, and /proc/kpageflags. Disabling these | 800 | /proc/kpagecount, and /proc/kpageflags. Disabling these |
801 | interfaces will reduce the size of the kernel by approximately 4kb. | 801 | interfaces will reduce the size of the kernel by approximately 4kb. |
802 | 802 | ||
803 | endmenu # General setup | 803 | endmenu # General setup |
804 | 804 | ||
805 | config HAVE_GENERIC_DMA_COHERENT | ||
806 | bool | ||
807 | default n | ||
808 | |||
805 | config SLABINFO | 809 | config SLABINFO |
806 | bool | 810 | bool |
807 | depends on PROC_FS | 811 | depends on PROC_FS |
808 | depends on SLAB || SLUB_DEBUG | 812 | depends on SLAB || SLUB_DEBUG |
809 | default y | 813 | default y |
810 | 814 | ||
811 | config RT_MUTEXES | 815 | config RT_MUTEXES |
812 | boolean | 816 | boolean |
813 | select PLIST | 817 | select PLIST |
814 | 818 | ||
815 | config TINY_SHMEM | 819 | config TINY_SHMEM |
816 | default !SHMEM | 820 | default !SHMEM |
817 | bool | 821 | bool |
818 | 822 | ||
819 | config BASE_SMALL | 823 | config BASE_SMALL |
820 | int | 824 | int |
821 | default 0 if BASE_FULL | 825 | default 0 if BASE_FULL |
822 | default 1 if !BASE_FULL | 826 | default 1 if !BASE_FULL |
823 | 827 | ||
824 | menuconfig MODULES | 828 | menuconfig MODULES |
825 | bool "Enable loadable module support" | 829 | bool "Enable loadable module support" |
826 | help | 830 | help |
827 | Kernel modules are small pieces of compiled code which can | 831 | Kernel modules are small pieces of compiled code which can |
828 | be inserted in the running kernel, rather than being | 832 | be inserted in the running kernel, rather than being |
829 | permanently built into the kernel. You use the "modprobe" | 833 | permanently built into the kernel. You use the "modprobe" |
830 | tool to add (and sometimes remove) them. If you say Y here, | 834 | tool to add (and sometimes remove) them. If you say Y here, |
831 | many parts of the kernel can be built as modules (by | 835 | many parts of the kernel can be built as modules (by |
832 | answering M instead of Y where indicated): this is most | 836 | answering M instead of Y where indicated): this is most |
833 | useful for infrequently used options which are not required | 837 | useful for infrequently used options which are not required |
834 | for booting. For more information, see the man pages for | 838 | for booting. For more information, see the man pages for |
835 | modprobe, lsmod, modinfo, insmod and rmmod. | 839 | modprobe, lsmod, modinfo, insmod and rmmod. |
836 | 840 | ||
837 | If you say Y here, you will need to run "make | 841 | If you say Y here, you will need to run "make |
838 | modules_install" to put the modules under /lib/modules/ | 842 | modules_install" to put the modules under /lib/modules/ |
839 | where modprobe can find them (you may need to be root to do | 843 | where modprobe can find them (you may need to be root to do |
840 | this). | 844 | this). |
841 | 845 | ||
842 | If unsure, say Y. | 846 | If unsure, say Y. |
843 | 847 | ||
844 | config MODULE_FORCE_LOAD | 848 | config MODULE_FORCE_LOAD |
845 | bool "Forced module loading" | 849 | bool "Forced module loading" |
846 | depends on MODULES | 850 | depends on MODULES |
847 | default n | 851 | default n |
848 | help | 852 | help |
849 | Allow loading of modules without version information (ie. modprobe | 853 | Allow loading of modules without version information (ie. modprobe |
850 | --force). Forced module loading sets the 'F' (forced) taint flag and | 854 | --force). Forced module loading sets the 'F' (forced) taint flag and |
851 | is usually a really bad idea. | 855 | is usually a really bad idea. |
852 | 856 | ||
853 | config MODULE_UNLOAD | 857 | config MODULE_UNLOAD |
854 | bool "Module unloading" | 858 | bool "Module unloading" |
855 | depends on MODULES | 859 | depends on MODULES |
856 | help | 860 | help |
857 | Without this option you will not be able to unload any | 861 | Without this option you will not be able to unload any |
858 | modules (note that some modules may not be unloadable | 862 | modules (note that some modules may not be unloadable |
859 | anyway), which makes your kernel slightly smaller and | 863 | anyway), which makes your kernel slightly smaller and |
860 | simpler. If unsure, say Y. | 864 | simpler. If unsure, say Y. |
861 | 865 | ||
862 | config MODULE_FORCE_UNLOAD | 866 | config MODULE_FORCE_UNLOAD |
863 | bool "Forced module unloading" | 867 | bool "Forced module unloading" |
864 | depends on MODULE_UNLOAD && EXPERIMENTAL | 868 | depends on MODULE_UNLOAD && EXPERIMENTAL |
865 | help | 869 | help |
866 | This option allows you to force a module to unload, even if the | 870 | This option allows you to force a module to unload, even if the |
867 | kernel believes it is unsafe: the kernel will remove the module | 871 | kernel believes it is unsafe: the kernel will remove the module |
868 | without waiting for anyone to stop using it (using the -f option to | 872 | without waiting for anyone to stop using it (using the -f option to |
869 | rmmod). This is mainly for kernel developers and desperate users. | 873 | rmmod). This is mainly for kernel developers and desperate users. |
870 | If unsure, say N. | 874 | If unsure, say N. |
871 | 875 | ||
872 | config MODVERSIONS | 876 | config MODVERSIONS |
873 | bool "Module versioning support" | 877 | bool "Module versioning support" |
874 | depends on MODULES | 878 | depends on MODULES |
875 | help | 879 | help |
876 | Usually, you have to use modules compiled with your kernel. | 880 | Usually, you have to use modules compiled with your kernel. |
877 | Saying Y here makes it sometimes possible to use modules | 881 | Saying Y here makes it sometimes possible to use modules |
878 | compiled for different kernels, by adding enough information | 882 | compiled for different kernels, by adding enough information |
879 | to the modules to (hopefully) spot any changes which would | 883 | to the modules to (hopefully) spot any changes which would |
880 | make them incompatible with the kernel you are running. If | 884 | make them incompatible with the kernel you are running. If |
881 | unsure, say N. | 885 | unsure, say N. |
882 | 886 | ||
883 | config MODULE_SRCVERSION_ALL | 887 | config MODULE_SRCVERSION_ALL |
884 | bool "Source checksum for all modules" | 888 | bool "Source checksum for all modules" |
885 | depends on MODULES | 889 | depends on MODULES |
886 | help | 890 | help |
887 | Modules which contain a MODULE_VERSION get an extra "srcversion" | 891 | Modules which contain a MODULE_VERSION get an extra "srcversion" |
888 | field inserted into their modinfo section, which contains a | 892 | field inserted into their modinfo section, which contains a |
889 | sum of the source files which made it. This helps maintainers | 893 | sum of the source files which made it. This helps maintainers |
890 | see exactly which source was used to build a module (since | 894 | see exactly which source was used to build a module (since |
891 | others sometimes change the module source without updating | 895 | others sometimes change the module source without updating |
892 | the version). With this option, such a "srcversion" field | 896 | the version). With this option, such a "srcversion" field |
893 | will be created for all modules. If unsure, say N. | 897 | will be created for all modules. If unsure, say N. |
894 | 898 | ||
895 | config KMOD | 899 | config KMOD |
896 | bool "Automatic kernel module loading" | 900 | bool "Automatic kernel module loading" |
897 | depends on MODULES | 901 | depends on MODULES |
898 | help | 902 | help |
899 | Normally when you have selected some parts of the kernel to | 903 | Normally when you have selected some parts of the kernel to |
900 | be created as kernel modules, you must load them (using the | 904 | be created as kernel modules, you must load them (using the |
901 | "modprobe" command) before you can use them. If you say Y | 905 | "modprobe" command) before you can use them. If you say Y |
902 | here, some parts of the kernel will be able to load modules | 906 | here, some parts of the kernel will be able to load modules |
903 | automatically: when a part of the kernel needs a module, it | 907 | automatically: when a part of the kernel needs a module, it |
904 | runs modprobe with the appropriate arguments, thereby | 908 | runs modprobe with the appropriate arguments, thereby |
905 | loading the module if it is available. If unsure, say Y. | 909 | loading the module if it is available. If unsure, say Y. |
906 | 910 | ||
907 | config STOP_MACHINE | 911 | config STOP_MACHINE |
908 | bool | 912 | bool |
909 | default y | 913 | default y |
910 | depends on (SMP && MODULE_UNLOAD) || HOTPLUG_CPU | 914 | depends on (SMP && MODULE_UNLOAD) || HOTPLUG_CPU |
911 | help | 915 | help |
912 | Need stop_machine() primitive. | 916 | Need stop_machine() primitive. |
913 | 917 | ||
914 | source "block/Kconfig" | 918 | source "block/Kconfig" |
915 | 919 | ||
916 | config PREEMPT_NOTIFIERS | 920 | config PREEMPT_NOTIFIERS |
917 | bool | 921 | bool |
918 | 922 | ||
919 | config CLASSIC_RCU | 923 | config CLASSIC_RCU |
920 | def_bool !PREEMPT_RCU | 924 | def_bool !PREEMPT_RCU |
921 | help | 925 | help |
922 | This option selects the classic RCU implementation that is | 926 | This option selects the classic RCU implementation that is |
923 | designed for best read-side performance on non-realtime | 927 | designed for best read-side performance on non-realtime |
924 | systems. Classic RCU is the default. Note that the | 928 | systems. Classic RCU is the default. Note that the |
925 | PREEMPT_RCU symbol is used to select/deselect this option. | 929 | PREEMPT_RCU symbol is used to select/deselect this option. |
926 | 930 |
kernel/Makefile
1 | # | 1 | # |
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \ | 5 | obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \ |
6 | exit.o itimer.o time.o softirq.o resource.o \ | 6 | exit.o itimer.o time.o softirq.o resource.o \ |
7 | sysctl.o capability.o ptrace.o timer.o user.o \ | 7 | sysctl.o capability.o ptrace.o timer.o user.o \ |
8 | signal.o sys.o kmod.o workqueue.o pid.o \ | 8 | signal.o sys.o kmod.o workqueue.o pid.o \ |
9 | rcupdate.o extable.o params.o posix-timers.o \ | 9 | rcupdate.o extable.o params.o posix-timers.o \ |
10 | kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \ | 10 | kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \ |
11 | hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \ | 11 | hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \ |
12 | notifier.o ksysfs.o pm_qos_params.o sched_clock.o | 12 | notifier.o ksysfs.o pm_qos_params.o sched_clock.o |
13 | 13 | ||
14 | obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o | 14 | obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o |
15 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 15 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
16 | obj-y += time/ | 16 | obj-y += time/ |
17 | obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o | 17 | obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o |
18 | obj-$(CONFIG_LOCKDEP) += lockdep.o | 18 | obj-$(CONFIG_LOCKDEP) += lockdep.o |
19 | ifeq ($(CONFIG_PROC_FS),y) | 19 | ifeq ($(CONFIG_PROC_FS),y) |
20 | obj-$(CONFIG_LOCKDEP) += lockdep_proc.o | 20 | obj-$(CONFIG_LOCKDEP) += lockdep_proc.o |
21 | endif | 21 | endif |
22 | obj-$(CONFIG_FUTEX) += futex.o | 22 | obj-$(CONFIG_FUTEX) += futex.o |
23 | ifeq ($(CONFIG_COMPAT),y) | 23 | ifeq ($(CONFIG_COMPAT),y) |
24 | obj-$(CONFIG_FUTEX) += futex_compat.o | 24 | obj-$(CONFIG_FUTEX) += futex_compat.o |
25 | endif | 25 | endif |
26 | obj-$(CONFIG_RT_MUTEXES) += rtmutex.o | 26 | obj-$(CONFIG_RT_MUTEXES) += rtmutex.o |
27 | obj-$(CONFIG_DEBUG_RT_MUTEXES) += rtmutex-debug.o | 27 | obj-$(CONFIG_DEBUG_RT_MUTEXES) += rtmutex-debug.o |
28 | obj-$(CONFIG_RT_MUTEX_TESTER) += rtmutex-tester.o | 28 | obj-$(CONFIG_RT_MUTEX_TESTER) += rtmutex-tester.o |
29 | obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o | 29 | obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o |
30 | obj-$(CONFIG_SMP) += cpu.o spinlock.o | 30 | obj-$(CONFIG_SMP) += cpu.o spinlock.o |
31 | obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o | 31 | obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o |
32 | obj-$(CONFIG_PROVE_LOCKING) += spinlock.o | 32 | obj-$(CONFIG_PROVE_LOCKING) += spinlock.o |
33 | obj-$(CONFIG_UID16) += uid16.o | 33 | obj-$(CONFIG_UID16) += uid16.o |
34 | obj-$(CONFIG_MODULES) += module.o | 34 | obj-$(CONFIG_MODULES) += module.o |
35 | obj-$(CONFIG_KALLSYMS) += kallsyms.o | 35 | obj-$(CONFIG_KALLSYMS) += kallsyms.o |
36 | obj-$(CONFIG_PM) += power/ | 36 | obj-$(CONFIG_PM) += power/ |
37 | obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o | 37 | obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o |
38 | obj-$(CONFIG_KEXEC) += kexec.o | 38 | obj-$(CONFIG_KEXEC) += kexec.o |
39 | obj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o | 39 | obj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o |
40 | obj-$(CONFIG_COMPAT) += compat.o | 40 | obj-$(CONFIG_COMPAT) += compat.o |
41 | obj-$(CONFIG_CGROUPS) += cgroup.o | 41 | obj-$(CONFIG_CGROUPS) += cgroup.o |
42 | obj-$(CONFIG_CGROUP_DEBUG) += cgroup_debug.o | 42 | obj-$(CONFIG_CGROUP_DEBUG) += cgroup_debug.o |
43 | obj-$(CONFIG_CPUSETS) += cpuset.o | 43 | obj-$(CONFIG_CPUSETS) += cpuset.o |
44 | obj-$(CONFIG_CGROUP_NS) += ns_cgroup.o | 44 | obj-$(CONFIG_CGROUP_NS) += ns_cgroup.o |
45 | obj-$(CONFIG_UTS_NS) += utsname.o | 45 | obj-$(CONFIG_UTS_NS) += utsname.o |
46 | obj-$(CONFIG_USER_NS) += user_namespace.o | 46 | obj-$(CONFIG_USER_NS) += user_namespace.o |
47 | obj-$(CONFIG_PID_NS) += pid_namespace.o | 47 | obj-$(CONFIG_PID_NS) += pid_namespace.o |
48 | obj-$(CONFIG_IKCONFIG) += configs.o | 48 | obj-$(CONFIG_IKCONFIG) += configs.o |
49 | obj-$(CONFIG_RESOURCE_COUNTERS) += res_counter.o | 49 | obj-$(CONFIG_RESOURCE_COUNTERS) += res_counter.o |
50 | obj-$(CONFIG_STOP_MACHINE) += stop_machine.o | 50 | obj-$(CONFIG_STOP_MACHINE) += stop_machine.o |
51 | obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o | 51 | obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o |
52 | obj-$(CONFIG_AUDIT) += audit.o auditfilter.o | 52 | obj-$(CONFIG_AUDIT) += audit.o auditfilter.o |
53 | obj-$(CONFIG_AUDITSYSCALL) += auditsc.o | 53 | obj-$(CONFIG_AUDITSYSCALL) += auditsc.o |
54 | obj-$(CONFIG_AUDIT_TREE) += audit_tree.o | 54 | obj-$(CONFIG_AUDIT_TREE) += audit_tree.o |
55 | obj-$(CONFIG_KPROBES) += kprobes.o | 55 | obj-$(CONFIG_KPROBES) += kprobes.o |
56 | obj-$(CONFIG_KGDB) += kgdb.o | 56 | obj-$(CONFIG_KGDB) += kgdb.o |
57 | obj-$(CONFIG_DETECT_SOFTLOCKUP) += softlockup.o | 57 | obj-$(CONFIG_DETECT_SOFTLOCKUP) += softlockup.o |
58 | obj-$(CONFIG_GENERIC_HARDIRQS) += irq/ | 58 | obj-$(CONFIG_GENERIC_HARDIRQS) += irq/ |
59 | obj-$(CONFIG_SECCOMP) += seccomp.o | 59 | obj-$(CONFIG_SECCOMP) += seccomp.o |
60 | obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o | 60 | obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o |
61 | obj-$(CONFIG_CLASSIC_RCU) += rcuclassic.o | 61 | obj-$(CONFIG_CLASSIC_RCU) += rcuclassic.o |
62 | obj-$(CONFIG_PREEMPT_RCU) += rcupreempt.o | 62 | obj-$(CONFIG_PREEMPT_RCU) += rcupreempt.o |
63 | ifeq ($(CONFIG_PREEMPT_RCU),y) | 63 | ifeq ($(CONFIG_PREEMPT_RCU),y) |
64 | obj-$(CONFIG_RCU_TRACE) += rcupreempt_trace.o | 64 | obj-$(CONFIG_RCU_TRACE) += rcupreempt_trace.o |
65 | endif | 65 | endif |
66 | obj-$(CONFIG_RELAY) += relay.o | 66 | obj-$(CONFIG_RELAY) += relay.o |
67 | obj-$(CONFIG_SYSCTL) += utsname_sysctl.o | 67 | obj-$(CONFIG_SYSCTL) += utsname_sysctl.o |
68 | obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o | 68 | obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o |
69 | obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o | 69 | obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o |
70 | obj-$(CONFIG_MARKERS) += marker.o | 70 | obj-$(CONFIG_MARKERS) += marker.o |
71 | obj-$(CONFIG_LATENCYTOP) += latencytop.o | 71 | obj-$(CONFIG_LATENCYTOP) += latencytop.o |
72 | obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o | ||
72 | 73 | ||
73 | ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y) | 74 | ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y) |
74 | # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is | 75 | # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is |
75 | # needed for x86 only. Why this used to be enabled for all architectures is beyond | 76 | # needed for x86 only. Why this used to be enabled for all architectures is beyond |
76 | # me. I suspect most platforms don't need this, but until we know that for sure | 77 | # me. I suspect most platforms don't need this, but until we know that for sure |
77 | # I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k | 78 | # I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k |
78 | # to get a correct value for the wait-channel (WCHAN in ps). --davidm | 79 | # to get a correct value for the wait-channel (WCHAN in ps). --davidm |
79 | CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer | 80 | CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer |
80 | endif | 81 | endif |
81 | 82 | ||
82 | $(obj)/configs.o: $(obj)/config_data.h | 83 | $(obj)/configs.o: $(obj)/config_data.h |
83 | 84 | ||
84 | # config_data.h contains the same information as ikconfig.h but gzipped. | 85 | # config_data.h contains the same information as ikconfig.h but gzipped. |
85 | # Info from config_data can be extracted from /proc/config* | 86 | # Info from config_data can be extracted from /proc/config* |
86 | targets += config_data.gz | 87 | targets += config_data.gz |
87 | $(obj)/config_data.gz: .config FORCE | 88 | $(obj)/config_data.gz: .config FORCE |
88 | $(call if_changed,gzip) | 89 | $(call if_changed,gzip) |
89 | 90 | ||
90 | quiet_cmd_ikconfiggz = IKCFG $@ | 91 | quiet_cmd_ikconfiggz = IKCFG $@ |
91 | cmd_ikconfiggz = (echo "static const char kernel_config_data[] = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") > $@ | 92 | cmd_ikconfiggz = (echo "static const char kernel_config_data[] = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") > $@ |
92 | targets += config_data.h | 93 | targets += config_data.h |
93 | $(obj)/config_data.h: $(obj)/config_data.gz FORCE | 94 | $(obj)/config_data.h: $(obj)/config_data.gz FORCE |
94 | $(call if_changed,ikconfiggz) | 95 | $(call if_changed,ikconfiggz) |
95 | 96 | ||
96 | $(obj)/time.o: $(obj)/timeconst.h | 97 | $(obj)/time.o: $(obj)/timeconst.h |
97 | 98 | ||
98 | quiet_cmd_timeconst = TIMEC $@ | 99 | quiet_cmd_timeconst = TIMEC $@ |
99 | cmd_timeconst = $(PERL) $< $(CONFIG_HZ) > $@ | 100 | cmd_timeconst = $(PERL) $< $(CONFIG_HZ) > $@ |
100 | targets += timeconst.h | 101 | targets += timeconst.h |
101 | $(obj)/timeconst.h: $(src)/timeconst.pl FORCE | 102 | $(obj)/timeconst.h: $(src)/timeconst.pl FORCE |
102 | $(call if_changed,timeconst) | 103 | $(call if_changed,timeconst) |
103 | 104 |
kernel/dma-coherent.c
File was created | 1 | /* | |
2 | * Coherent per-device memory handling. | ||
3 | * Borrowed from i386 | ||
4 | */ | ||
5 | #include <linux/kernel.h> | ||
6 | #include <linux/dma-mapping.h> | ||
7 | |||
8 | struct dma_coherent_mem { | ||
9 | void *virt_base; | ||
10 | u32 device_base; | ||
11 | int size; | ||
12 | int flags; | ||
13 | unsigned long *bitmap; | ||
14 | }; | ||
15 | |||
16 | int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | ||
17 | dma_addr_t device_addr, size_t size, int flags) | ||
18 | { | ||
19 | void __iomem *mem_base = NULL; | ||
20 | int pages = size >> PAGE_SHIFT; | ||
21 | int bitmap_size = BITS_TO_LONGS(pages) * sizeof(long); | ||
22 | |||
23 | if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0) | ||
24 | goto out; | ||
25 | if (!size) | ||
26 | goto out; | ||
27 | if (dev->dma_mem) | ||
28 | goto out; | ||
29 | |||
30 | /* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */ | ||
31 | |||
32 | mem_base = ioremap(bus_addr, size); | ||
33 | if (!mem_base) | ||
34 | goto out; | ||
35 | |||
36 | dev->dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL); | ||
37 | if (!dev->dma_mem) | ||
38 | goto out; | ||
39 | dev->dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL); | ||
40 | if (!dev->dma_mem->bitmap) | ||
41 | goto free1_out; | ||
42 | |||
43 | dev->dma_mem->virt_base = mem_base; | ||
44 | dev->dma_mem->device_base = device_addr; | ||
45 | dev->dma_mem->size = pages; | ||
46 | dev->dma_mem->flags = flags; | ||
47 | |||
48 | if (flags & DMA_MEMORY_MAP) | ||
49 | return DMA_MEMORY_MAP; | ||
50 | |||
51 | return DMA_MEMORY_IO; | ||
52 | |||
53 | free1_out: | ||
54 | kfree(dev->dma_mem); | ||
55 | out: | ||
56 | if (mem_base) | ||
57 | iounmap(mem_base); | ||
58 | return 0; | ||
59 | } | ||
60 | EXPORT_SYMBOL(dma_declare_coherent_memory); | ||
61 | |||
62 | void dma_release_declared_memory(struct device *dev) | ||
63 | { | ||
64 | struct dma_coherent_mem *mem = dev->dma_mem; | ||
65 | |||
66 | if (!mem) | ||
67 | return; | ||
68 | dev->dma_mem = NULL; | ||
69 | iounmap(mem->virt_base); | ||
70 | kfree(mem->bitmap); | ||
71 | kfree(mem); | ||
72 | } | ||
73 | EXPORT_SYMBOL(dma_release_declared_memory); | ||
74 | |||
75 | void *dma_mark_declared_memory_occupied(struct device *dev, | ||
76 | dma_addr_t device_addr, size_t size) | ||
77 | { | ||
78 | struct dma_coherent_mem *mem = dev->dma_mem; | ||
79 | int pos, err; | ||
80 | int pages = (size + (device_addr & ~PAGE_MASK) + PAGE_SIZE - 1); | ||
81 | |||
82 | pages >>= PAGE_SHIFT; | ||
83 | |||
84 | if (!mem) | ||
85 | return ERR_PTR(-EINVAL); | ||
86 | |||
87 | pos = (device_addr - mem->device_base) >> PAGE_SHIFT; | ||
88 | err = bitmap_allocate_region(mem->bitmap, pos, get_order(pages)); | ||
89 | if (err != 0) | ||
90 | return ERR_PTR(err); | ||
91 | return mem->virt_base + (pos << PAGE_SHIFT); | ||
92 | } | ||
93 | EXPORT_SYMBOL(dma_mark_declared_memory_occupied); | ||
94 | |||
95 | int dma_alloc_from_coherent(struct device *dev, ssize_t size, | ||
96 | dma_addr_t *dma_handle, void **ret) | ||
97 | { | ||
98 | struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL; | ||
99 | int order = get_order(size); | ||
100 | |||
101 | if (mem) { | ||
102 | int page = bitmap_find_free_region(mem->bitmap, mem->size, | ||
103 | order); | ||
104 | if (page >= 0) { | ||
105 | *dma_handle = mem->device_base + (page << PAGE_SHIFT); | ||
106 | *ret = mem->virt_base + (page << PAGE_SHIFT); | ||
107 | memset(*ret, 0, size); | ||
108 | } | ||
109 | if (mem->flags & DMA_MEMORY_EXCLUSIVE) | ||
110 | *ret = NULL; | ||
111 | } | ||
112 | return (mem != NULL); | ||
113 | } | ||
114 | |||
115 | int dma_release_from_coherent(struct device *dev, int order, void *vaddr) | ||
116 | { | ||
117 | struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL; | ||
118 | |||
119 | if (mem && vaddr >= mem->virt_base && vaddr < | ||
120 | (mem->virt_base + (mem->size << PAGE_SHIFT))) { | ||
121 | int page = (vaddr - mem->virt_base) >> PAGE_SHIFT; | ||
122 | |||
123 | bitmap_release_region(mem->bitmap, page, order); | ||
124 | return 1; | ||
125 | } | ||
126 | return 0; | ||
127 | } | ||
128 |