Skip to content

Commit 7e4dbdc

Browse files
Christoph Hellwigpaulburton
authored andcommitted
MIPS: remove CONFIG_DMA_COHERENT
We can just check for !CONFIG_DMA_NONCOHERENT instead and simplify things a lot. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Paul Burton <paul.burton@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/19530/ Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: David Daney <david.daney@cavium.com> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Cc: Tom Bogendoerfer <tsbogend@alpha.franken.de> Cc: Huacai Chen <chenhc@lemote.com> Cc: iommu@lists.linux-foundation.org Cc: linux-mips@linux-mips.org
1 parent 972dc3b commit 7e4dbdc

File tree

5 files changed

+6
-24
lines changed

5 files changed

+6
-24
lines changed

arch/mips/Kconfig

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,6 @@ config SGI_IP27
666666
select FW_ARC64
667667
select BOOT_ELF64
668668
select DEFAULT_SGI_PARTITION
669-
select DMA_COHERENT
670669
select SYS_HAS_EARLY_PRINTK
671670
select HW_HAS_PCI
672671
select NR_CPUS_DEFAULT_64
@@ -743,7 +742,6 @@ config SGI_IP32
743742
config SIBYTE_CRHINE
744743
bool "Sibyte BCM91120C-CRhine"
745744
select BOOT_ELF32
746-
select DMA_COHERENT
747745
select SIBYTE_BCM1120
748746
select SWAP_IO_SPACE
749747
select SYS_HAS_CPU_SB1
@@ -753,7 +751,6 @@ config SIBYTE_CRHINE
753751
config SIBYTE_CARMEL
754752
bool "Sibyte BCM91120x-Carmel"
755753
select BOOT_ELF32
756-
select DMA_COHERENT
757754
select SIBYTE_BCM1120
758755
select SWAP_IO_SPACE
759756
select SYS_HAS_CPU_SB1
@@ -763,7 +760,6 @@ config SIBYTE_CARMEL
763760
config SIBYTE_CRHONE
764761
bool "Sibyte BCM91125C-CRhone"
765762
select BOOT_ELF32
766-
select DMA_COHERENT
767763
select SIBYTE_BCM1125
768764
select SWAP_IO_SPACE
769765
select SYS_HAS_CPU_SB1
@@ -774,7 +770,6 @@ config SIBYTE_CRHONE
774770
config SIBYTE_RHONE
775771
bool "Sibyte BCM91125E-Rhone"
776772
select BOOT_ELF32
777-
select DMA_COHERENT
778773
select SIBYTE_BCM1125H
779774
select SWAP_IO_SPACE
780775
select SYS_HAS_CPU_SB1
@@ -784,7 +779,6 @@ config SIBYTE_RHONE
784779
config SIBYTE_SWARM
785780
bool "Sibyte BCM91250A-SWARM"
786781
select BOOT_ELF32
787-
select DMA_COHERENT
788782
select HAVE_PATA_PLATFORM
789783
select SIBYTE_SB1250
790784
select SWAP_IO_SPACE
@@ -797,7 +791,6 @@ config SIBYTE_SWARM
797791
config SIBYTE_LITTLESUR
798792
bool "Sibyte BCM91250C2-LittleSur"
799793
select BOOT_ELF32
800-
select DMA_COHERENT
801794
select HAVE_PATA_PLATFORM
802795
select SIBYTE_SB1250
803796
select SWAP_IO_SPACE
@@ -809,7 +802,6 @@ config SIBYTE_LITTLESUR
809802
config SIBYTE_SENTOSA
810803
bool "Sibyte BCM91250E-Sentosa"
811804
select BOOT_ELF32
812-
select DMA_COHERENT
813805
select SIBYTE_SB1250
814806
select SWAP_IO_SPACE
815807
select SYS_HAS_CPU_SB1
@@ -819,7 +811,6 @@ config SIBYTE_SENTOSA
819811
config SIBYTE_BIGSUR
820812
bool "Sibyte BCM91480B-BigSur"
821813
select BOOT_ELF32
822-
select DMA_COHERENT
823814
select NR_CPUS_DEFAULT_4
824815
select SIBYTE_BCM1x80
825816
select SWAP_IO_SPACE
@@ -896,7 +887,6 @@ config CAVIUM_OCTEON_SOC
896887
select CEVT_R4K
897888
select ARCH_HAS_PHYS_TO_DMA
898889
select PHYS_ADDR_T_64BIT
899-
select DMA_COHERENT
900890
select SYS_SUPPORTS_64BIT_KERNEL
901891
select SYS_SUPPORTS_BIG_ENDIAN
902892
select EDAC_SUPPORT
@@ -945,7 +935,6 @@ config NLM_XLR_BOARD
945935
select PHYS_ADDR_T_64BIT
946936
select SYS_SUPPORTS_BIG_ENDIAN
947937
select SYS_SUPPORTS_HIGHMEM
948-
select DMA_COHERENT
949938
select NR_CPUS_DEFAULT_32
950939
select CEVT_R4K
951940
select CSRC_R4K
@@ -973,7 +962,6 @@ config NLM_XLP_BOARD
973962
select SYS_SUPPORTS_BIG_ENDIAN
974963
select SYS_SUPPORTS_LITTLE_ENDIAN
975964
select SYS_SUPPORTS_HIGHMEM
976-
select DMA_COHERENT
977965
select NR_CPUS_DEFAULT_32
978966
select CEVT_R4K
979967
select CSRC_R4K
@@ -992,7 +980,6 @@ config MIPS_PARAVIRT
992980
bool "Para-Virtualized guest system"
993981
select CEVT_R4K
994982
select CSRC_R4K
995-
select DMA_COHERENT
996983
select SYS_SUPPORTS_64BIT_KERNEL
997984
select SYS_SUPPORTS_32BIT_KERNEL
998985
select SYS_SUPPORTS_BIG_ENDIAN
@@ -1118,9 +1105,6 @@ config DMA_PERDEV_COHERENT
11181105
bool
11191106
select DMA_MAYBE_COHERENT
11201107

1121-
config DMA_COHERENT
1122-
bool
1123-
11241108
config DMA_NONCOHERENT
11251109
bool
11261110
select NEED_DMA_MAP_STATE

arch/mips/include/asm/dma-coherence.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ enum coherent_io_user_state {
2121
extern enum coherent_io_user_state coherentio;
2222
extern int hw_coherentio;
2323
#else
24-
#ifdef CONFIG_DMA_COHERENT
25-
#define coherentio IO_COHERENCE_ENABLED
26-
#else
24+
#ifdef CONFIG_DMA_NONCOHERENT
2725
#define coherentio IO_COHERENCE_DISABLED
26+
#else
27+
#define coherentio IO_COHERENCE_ENABLED
2828
#endif
2929
#define hw_coherentio 0
3030
#endif /* CONFIG_DMA_MAYBE_COHERENT */

arch/mips/include/asm/mach-generic/kmalloc.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
#ifndef __ASM_MACH_GENERIC_KMALLOC_H
33
#define __ASM_MACH_GENERIC_KMALLOC_H
44

5-
6-
#ifndef CONFIG_DMA_COHERENT
5+
#ifdef CONFIG_DMA_NONCOHERENT
76
/*
87
* Total overkill for most systems but need as a safe default.
98
* Set this one if any device in the system might do non-coherent DMA.

arch/mips/mti-malta/malta-setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static void __init bonito_quirks_setup(void)
227227
} else
228228
BONITO_BONGENCFG &= ~BONITO_BONGENCFG_DEBUGMODE;
229229

230-
#ifdef CONFIG_DMA_COHERENT
230+
#ifndef CONFIG_DMA_NONCOHERENT
231231
if (BONITO_PCICACHECTRL & BONITO_PCICACHECTRL_CPUCOH_PRES) {
232232
BONITO_PCICACHECTRL |= BONITO_PCICACHECTRL_CPUCOH_EN;
233233
pr_info("Enabled Bonito CPU coherency\n");
@@ -279,7 +279,7 @@ void __init plat_mem_setup(void)
279279
*/
280280
enable_dma(4);
281281

282-
#ifdef CONFIG_DMA_COHERENT
282+
#ifndef CONFIG_DMA_NONCOHERENT
283283
if (mips_revision_sconid != MIPS_REVISION_SCON_BONITO)
284284
panic("Hardware DMA cache coherency not supported");
285285
#endif

arch/mips/sibyte/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ config SIBYTE_BCM1x55
7070

7171
config SIBYTE_SB1xxx_SOC
7272
bool
73-
select DMA_COHERENT
7473
select IRQ_MIPS_CPU
7574
select SWAP_IO_SPACE
7675
select SYS_SUPPORTS_32BIT_KERNEL

0 commit comments

Comments
 (0)