diff options
Diffstat (limited to 'drivers/base/Kconfig')
-rw-r--r-- | drivers/base/Kconfig | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index 9aa618acfe97..9b21469482ae 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig | |||
@@ -192,4 +192,93 @@ config DMA_SHARED_BUFFER | |||
192 | APIs extension; the file's descriptor can then be passed on to other | 192 | APIs extension; the file's descriptor can then be passed on to other |
193 | driver. | 193 | driver. |
194 | 194 | ||
195 | config CMA | ||
196 | bool "Contiguous Memory Allocator (EXPERIMENTAL)" | ||
197 | depends on HAVE_DMA_CONTIGUOUS && HAVE_MEMBLOCK && EXPERIMENTAL | ||
198 | select MIGRATION | ||
199 | help | ||
200 | This enables the Contiguous Memory Allocator which allows drivers | ||
201 | to allocate big physically-contiguous blocks of memory for use with | ||
202 | hardware components that do not support I/O map nor scatter-gather. | ||
203 | |||
204 | For more information see <include/linux/dma-contiguous.h>. | ||
205 | If unsure, say "n". | ||
206 | |||
207 | if CMA | ||
208 | |||
209 | config CMA_DEBUG | ||
210 | bool "CMA debug messages (DEVELOPMENT)" | ||
211 | depends on DEBUG_KERNEL | ||
212 | help | ||
213 | Turns on debug messages in CMA. This produces KERN_DEBUG | ||
214 | messages for every CMA call as well as various messages while | ||
215 | processing calls such as dma_alloc_from_contiguous(). | ||
216 | This option does not affect warning and error messages. | ||
217 | |||
218 | comment "Default contiguous memory area size:" | ||
219 | |||
220 | config CMA_SIZE_MBYTES | ||
221 | int "Size in Mega Bytes" | ||
222 | depends on !CMA_SIZE_SEL_PERCENTAGE | ||
223 | default 16 | ||
224 | help | ||
225 | Defines the size (in MiB) of the default memory area for Contiguous | ||
226 | Memory Allocator. | ||
227 | |||
228 | config CMA_SIZE_PERCENTAGE | ||
229 | int "Percentage of total memory" | ||
230 | depends on !CMA_SIZE_SEL_MBYTES | ||
231 | default 10 | ||
232 | help | ||
233 | Defines the size of the default memory area for Contiguous Memory | ||
234 | Allocator as a percentage of the total memory in the system. | ||
235 | |||
236 | choice | ||
237 | prompt "Selected region size" | ||
238 | default CMA_SIZE_SEL_ABSOLUTE | ||
239 | |||
240 | config CMA_SIZE_SEL_MBYTES | ||
241 | bool "Use mega bytes value only" | ||
242 | |||
243 | config CMA_SIZE_SEL_PERCENTAGE | ||
244 | bool "Use percentage value only" | ||
245 | |||
246 | config CMA_SIZE_SEL_MIN | ||
247 | bool "Use lower value (minimum)" | ||
248 | |||
249 | config CMA_SIZE_SEL_MAX | ||
250 | bool "Use higher value (maximum)" | ||
251 | |||
252 | endchoice | ||
253 | |||
254 | config CMA_ALIGNMENT | ||
255 | int "Maximum PAGE_SIZE order of alignment for contiguous buffers" | ||
256 | range 4 9 | ||
257 | default 8 | ||
258 | help | ||
259 | DMA mapping framework by default aligns all buffers to the smallest | ||
260 | PAGE_SIZE order which is greater than or equal to the requested buffer | ||
261 | size. This works well for buffers up to a few hundreds kilobytes, but | ||
262 | for larger buffers it just a memory waste. With this parameter you can | ||
263 | specify the maximum PAGE_SIZE order for contiguous buffers. Larger | ||
264 | buffers will be aligned only to this specified order. The order is | ||
265 | expressed as a power of two multiplied by the PAGE_SIZE. | ||
266 | |||
267 | For example, if your system defaults to 4KiB pages, the order value | ||
268 | of 8 means that the buffers will be aligned up to 1MiB only. | ||
269 | |||
270 | If unsure, leave the default value "8". | ||
271 | |||
272 | config CMA_AREAS | ||
273 | int "Maximum count of the CMA device-private areas" | ||
274 | default 7 | ||
275 | help | ||
276 | CMA allows to create CMA areas for particular devices. This parameter | ||
277 | sets the maximum number of such device private CMA areas in the | ||
278 | system. | ||
279 | |||
280 | If unsure, leave the default value "7". | ||
281 | |||
282 | endif | ||
283 | |||
195 | endmenu | 284 | endmenu |