[PATCH] Revert "MIPS: Loongson64: Enable DMA noncoherent support"
authorSalvatore Bonaccorso <carnil@debian.org>
Sun, 31 Dec 2023 08:10:20 +0000 (09:10 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Sun, 31 Dec 2023 15:46:35 +0000 (16:46 +0100)
This reverts commit 3ee7e2faef87594228eb2622f8c25c0495ea50a1.

Build for mipsel and mips64el fails to build due to missing
requisites for this commit:

/<<PKGBUILDDIR>>/arch/mips/loongson64/env.c: In function 'prom_init_env':
/<<PKGBUILDDIR>>/arch/mips/loongson64/env.c:138:3: error: 'dma_default_coherent' undeclared (first use in this function); did you mean 'dma_free_coherent'?
  138 |   dma_default_coherent = true;
      |   ^~~~~~~~~~~~~~~~~~~~
      |   dma_free_coherent
/<<PKGBUILDDIR>>/arch/mips/loongson64/env.c:138:3: note: each undeclared identifier is reported only once for each function it appears in
make[6]: *** [/<<PKGBUILDDIR>>/scripts/Makefile.build:291: arch/mips/loongson64/env.o] Error 1
make[6]: *** Waiting for unfinished jobs....

Link: https://lore.kernel.org/stable/ZZBx01WttA3R1XjI@eldamar.lan/
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Gbp-Pq: Topic bugfix/mips
Gbp-Pq: Name Revert-MIPS-Loongson64-Enable-DMA-noncoherent-suppor.patch

arch/mips/Kconfig
arch/mips/include/asm/mach-loongson64/boot_param.h
arch/mips/loongson64/env.c

index 18ebacf298891e633c59971567657b1007fc9bd0..57839f63074f75ef093da100d9ef64f3fe31346c 100644 (file)
@@ -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
index de0bd14d798aa01dfe0319c1907aea9ac7108e31..afc92b7a61c60736d2e9e1c1e8147d4b4792b46a 100644 (file)
@@ -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 {
index a59bae36f86a7e10d20bc28355db9823995e579b..134cb8e9efc21c71566b5f2ca7bf8d903ab45f8d 100644 (file)
@@ -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;