Re: [PATCH -mm] uml: disable CONFIG_HAS_DMA

From: Sam Ravnborg
Date: Sat Sep 04 2010 - 06:13:22 EST


On Sat, Sep 04, 2010 at 06:17:56PM +0900, FUJITA Tomonori wrote:
> 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 disable
> CONFIG_HAS_DMA.
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
> ---
> arch/um/Kconfig.um | 3 +
> arch/um/defconfig | 1 -
> arch/um/include/asm/dma-mapping.h | 112 -------------------------------------
> 3 files changed, 3 insertions(+), 113 deletions(-)
> delete mode 100644 arch/um/include/asm/dma-mapping.h
>
> diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um
> index ec2b8da..3de40b8 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 HAS_DMA
> + def_bool n

Other archs define NO_DMA to say they do not have DMA.
We should do it the same way for um.


Sam

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/