From: Christoph Hellwig Date: Tue, 14 Jul 2020 12:18:55 +0000 (+0200) Subject: sh: don't allow non-coherent DMA for NOMMU X-Git-Tag: baikal/mips/sdk5.9~12876^2~6 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=2d1d64cf76bc886bb02073b3460444a353b7e2f2;p=kernel.git sh: don't allow non-coherent DMA for NOMMU The code handling non-coherent DMA depends on being able to remap code as non-cached. But that can't be done without an MMU, so using this option on NOMMU builds is broken. Signed-off-by: Christoph Hellwig Signed-off-by: Rich Felker --- diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 1bf23e2724839..7082a4a499fdf 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -61,6 +61,7 @@ config SUPERH select MAY_HAVE_SPARSE_IRQ select MODULES_USE_ELF_RELA select NEED_SG_DMA_LENGTH + select NO_DMA if !MMU && !DMA_COHERENT select NO_GENERIC_PCI_IOPORT_MAP if PCI select OLD_SIGACTION select OLD_SIGSUSPEND @@ -135,7 +136,7 @@ config DMA_COHERENT bool config DMA_NONCOHERENT - def_bool !DMA_COHERENT + def_bool !NO_DMA && !DMA_COHERENT select ARCH_HAS_SYNC_DMA_FOR_DEVICE config PGTABLE_LEVELS