* Suspicious test in dma-default.c
@ 2007-08-31 9:03 Maxime Bizon
2007-09-04 14:04 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Maxime Bizon @ 2007-08-31 9:03 UTC (permalink / raw)
To: linux-mips; +Cc: Ralf Baechle
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@freebox.fr>
--- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Suspicious test in dma-default.c
2007-08-31 9:03 Suspicious test in dma-default.c Maxime Bizon
@ 2007-09-04 14:04 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2007-09-04 14:04 UTC (permalink / raw)
To: Maxime Bizon; +Cc: linux-mips
On Fri, Aug 31, 2007 at 11:03:14AM +0200, Maxime Bizon wrote:
> 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 guess a processor need to be quite shizophrenic to pass this test ;-)
Patch applied, thanks.
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-04 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-31 9:03 Suspicious test in dma-default.c Maxime Bizon
2007-09-04 14:04 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox