Suspicious test in dma-default.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,


I don't know exactly why cpu_is_noncoherent_r10000() is needed, but the
test looks wrong:

	return !plat_device_is_coherent(dev) &&
	       (current_cpu_data.cputype == CPU_R10000 &&
	       current_cpu_data.cputype == CPU_R12000);


I suggest the following patch:

Signed-off-by: Maxime Bizon <mbizon@xxxxxxxxxx>

--- linux-git/arch/mips/mm/dma-default.c.orig	2007-08-31 10:55:17.000000000 +0200
+++ linux-git/arch/mips/mm/dma-default.c	2007-08-31 10:55:25.000000000 +0200
@@ -35,7 +35,7 @@
 static inline int cpu_is_noncoherent_r10000(struct device *dev)
 {
 	return !plat_device_is_coherent(dev) &&
-	       (current_cpu_data.cputype == CPU_R10000 &&
+	       (current_cpu_data.cputype == CPU_R10000 ||
 	       current_cpu_data.cputype == CPU_R12000);
 }
 

-- 
Maxime



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux