summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-03 11:38:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-05 15:12:31 +0100
commitecd50f820d864c61b97a85492417547f97753d19 (patch)
tree6b5f0277ebfcad6411163b7e5e8bc04a230fa44a
parent9175341bd80be4c90e2b26f0bac9d10be02e55b1 (diff)
Revert "MIPS: Loongson64: Enable DMA noncoherent support"
This reverts commit 3ee7e2faef87594228eb2622f8c25c0495ea50a1 which is commit edc0378eee00200a5bedf1bb9f00ad390e0d1bd4 upstream. There are reports of this causing build issues, so revert it from the 5.10.y tree for now. Reported-by: Salvatore Bonaccorso <carnil@debian.org> Link: https://lore.kernel.org/r/ZZE1X8m5PXJExffG@eldamar.lan Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/mips/Kconfig2
-rw-r--r--arch/mips/include/asm/mach-loongson64/boot_param.h3
-rw-r--r--arch/mips/loongson64/env.c10
3 files changed, 2 insertions, 13 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 18ebacf29889..57839f63074f 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -468,7 +468,6 @@ config MACH_LOONGSON2EF
config MACH_LOONGSON64
bool "Loongson 64-bit family of machines"
- select ARCH_DMA_DEFAULT_COHERENT
select ARCH_SPARSEMEM_ENABLE
select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_MIGHT_HAVE_PC_SERIO
@@ -1380,7 +1379,6 @@ config CPU_LOONGSON64
select CPU_SUPPORTS_MSA
select CPU_DIEI_BROKEN if !LOONGSON3_ENHANCEMENT
select CPU_MIPSR2_IRQ_VI
- select DMA_NONCOHERENT
select WEAK_ORDERING
select WEAK_REORDERING_BEYOND_LLSC
select MIPS_ASID_BITS_VARIABLE
diff --git a/arch/mips/include/asm/mach-loongson64/boot_param.h b/arch/mips/include/asm/mach-loongson64/boot_param.h
index de0bd14d798a..afc92b7a61c6 100644
--- a/arch/mips/include/asm/mach-loongson64/boot_param.h
+++ b/arch/mips/include/asm/mach-loongson64/boot_param.h
@@ -117,8 +117,7 @@ struct irq_source_routing_table {
u64 pci_io_start_addr;
u64 pci_io_end_addr;
u64 pci_config_addr;
- u16 dma_mask_bits;
- u16 dma_noncoherent;
+ u32 dma_mask_bits;
} __packed;
struct interface_info {
diff --git a/arch/mips/loongson64/env.c b/arch/mips/loongson64/env.c
index a59bae36f86a..134cb8e9efc2 100644
--- a/arch/mips/loongson64/env.c
+++ b/arch/mips/loongson64/env.c
@@ -13,8 +13,6 @@
* Copyright (C) 2009 Lemote Inc.
* Author: Wu Zhangjin, wuzhangjin@gmail.com
*/
-
-#include <linux/dma-map-ops.h>
#include <linux/export.h>
#include <linux/pci_ids.h>
#include <asm/bootinfo.h>
@@ -133,14 +131,8 @@ void __init prom_init_env(void)
loongson_sysconf.pci_io_base = eirq_source->pci_io_start_addr;
loongson_sysconf.dma_mask_bits = eirq_source->dma_mask_bits;
if (loongson_sysconf.dma_mask_bits < 32 ||
- loongson_sysconf.dma_mask_bits > 64) {
+ loongson_sysconf.dma_mask_bits > 64)
loongson_sysconf.dma_mask_bits = 32;
- dma_default_coherent = true;
- } else {
- dma_default_coherent = !eirq_source->dma_noncoherent;
- }
-
- pr_info("Firmware: Coherent DMA: %s\n", dma_default_coherent ? "on" : "off");
loongson_sysconf.restart_addr = boot_p->reset_system.ResetWarm;
loongson_sysconf.poweroff_addr = boot_p->reset_system.Shutdown;