diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-10-26 23:22:18 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 01:52:12 +0200 |
commit | d911202e3f722c29065942400ea108b7096bdac7 (patch) | |
tree | 17c0a4c8d2fa36db4469ddb21e7edee29184df74 /arch/um/Kconfig.um | |
parent | alpha: use single HAE window on T2 core logic (gamma, sable) (diff) | |
download | linux-d911202e3f722c29065942400ea108b7096bdac7.tar.xz linux-d911202e3f722c29065942400ea108b7096bdac7.zip |
uml: define CONFIG_NO_DMA
I think that it's better to detect DMA misuse at build time rather than
calling BUG_ON. Architectures that can't do DMA need to define
CONFIG_NO_DMA.
Thanks to Sam Ravnborg for explaining how CONFIG_NO_DMA and CONFIG_HAS_DMA
work:
http://marc.info/?l=linux-kernel&m=128359913825550&w=2
HAS_DMA is defined like this:
config HAS_DMA
boolean
depends on !NO_DMA
default y
So to set HAS_DMA to true an arch should do:
1) Do not define NO_DMA
2) Define NO_DMA abd set it to 'n'
Must archs - including um - used principle 1).
In the um case we want to say that we do NOT have any DMA.
This can be done in two ways.
a) define NO_DMA and set it to 'y'
b) redefine HAS_DMA and set it to 'n'.
The patch you provided used principle b) where other archs use principle a).
So I suggest you should use principle a) for um too.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/Kconfig.um')
-rw-r--r-- | arch/um/Kconfig.um | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um index ec2b8da1aba4..ffe0934a3ccf 100644 --- a/arch/um/Kconfig.um +++ b/arch/um/Kconfig.um @@ -147,3 +147,6 @@ config KERNEL_STACK_ORDER This option determines the size of UML kernel stacks. They will be 1 << order pages. The default is OK unless you're running Valgrind on UML, in which case, set this to 3. + +config NO_DMA + def_bool y |