All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: R14000: Add missing CPU_R14000 reference in cpu_needs_post_dma_flush()
@ 2014-10-08  1:17 Joshua Kinard
  2014-11-11 21:22 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Joshua Kinard @ 2014-10-08  1:17 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Linux MIPS List

cpu_needs_post_dma_flush() in arch/mips/mm/dma-default.c is missing a check for
CPU_R14000, where it already has checks for CPU_R10000 and CPU_R12000.  This
patch adds the missing CPU_R14000 check.

Signed-off-by: Joshua Kinard <kumba@gentoo.org>
---
 arch/mips/mm/dma-default.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index 44b6dff..3693c91 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -66,6 +66,7 @@ static inline int cpu_needs_post_dma_flush(struct device *dev)
 	return !plat_device_is_coherent(dev) &&
 	       (boot_cpu_type() == CPU_R10000 ||
 		boot_cpu_type() == CPU_R12000 ||
+		boot_cpu_type() == CPU_R14000 ||
 		boot_cpu_type() == CPU_BMIPS5000);
 }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: R14000: Add missing CPU_R14000 reference in cpu_needs_post_dma_flush()
  2014-10-08  1:17 [PATCH] MIPS: R14000: Add missing CPU_R14000 reference in cpu_needs_post_dma_flush() Joshua Kinard
@ 2014-11-11 21:22 ` Ralf Baechle
  2014-11-12  5:41   ` Joshua Kinard
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2014-11-11 21:22 UTC (permalink / raw)
  To: Joshua Kinard; +Cc: Linux MIPS List

On Tue, Oct 07, 2014 at 09:17:45PM -0400, Joshua Kinard wrote:

> cpu_needs_post_dma_flush() in arch/mips/mm/dma-default.c is missing a check for
> CPU_R14000, where it already has checks for CPU_R10000 and CPU_R12000.  This
> patch adds the missing CPU_R14000 check.

Patch is entirely correct.  Except.

This is only used on systems which don't have DMA cache coherency.  Those
systems are the IP28 and IP22 which featured an R10000 rsp.  R10000 or
R12000 processor which is why the R14000 is intentionally not listed in
this if().  Saves a few bytes and cycles.  And probably deserves a
comment in the code!

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: R14000: Add missing CPU_R14000 reference in cpu_needs_post_dma_flush()
  2014-11-11 21:22 ` Ralf Baechle
@ 2014-11-12  5:41   ` Joshua Kinard
  0 siblings, 0 replies; 3+ messages in thread
From: Joshua Kinard @ 2014-11-12  5:41 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Linux MIPS List

On 11/11/2014 16:22, Ralf Baechle wrote:
> On Tue, Oct 07, 2014 at 09:17:45PM -0400, Joshua Kinard wrote:
> 
>> cpu_needs_post_dma_flush() in arch/mips/mm/dma-default.c is missing a check for
>> CPU_R14000, where it already has checks for CPU_R10000 and CPU_R12000.  This
>> patch adds the missing CPU_R14000 check.
> 
> Patch is entirely correct.  Except.
> 
> This is only used on systems which don't have DMA cache coherency.  Those
> systems are the IP28 and IP22 which featured an R10000 rsp.  R10000 or
> R12000 processor which is why the R14000 is intentionally not listed in
> this if().  Saves a few bytes and cycles.  And probably deserves a
> comment in the code!
> 
>   Ralf

A comment in the code sounds great in that case then!  I'll drop this locally,
then.  Thanks!

-- 
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
4096R/D25D95E3 2011-03-28

"The past tempts us, the present confuses us, the future frightens us.  And our
lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-12  5:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-08  1:17 [PATCH] MIPS: R14000: Add missing CPU_R14000 reference in cpu_needs_post_dma_flush() Joshua Kinard
2014-11-11 21:22 ` Ralf Baechle
2014-11-12  5:41   ` Joshua Kinard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.