linux-mips
[Top] [All Lists]

Re: memcpy and prefetch

To: ralf@linux-mips.org
Subject: Re: memcpy and prefetch
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Thu, 29 Jan 2009 00:28:50 +0900 (JST)
Cc: ddaney@caviumnetworks.com, msundius@cisco.com, linux-mips@linux-mips.org, dvomlehn@cisco.com, msundius@sundius.com
In-reply-to: <20090128103753.GC2234@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <497F9214.1000609@cisco.com> <497F93C1.3090401@caviumnetworks.com> <20090128103753.GC2234@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
On Wed, 28 Jan 2009 10:37:53 +0000, Ralf Baechle <ralf@linux-mips.org> wrote:
> > The Cavium OCTEON port overrides the default memcpy and does use  
> > prefetch.  It was recently merged (2.6.29-rc2).  Look at octeon-memcpy.S
> >
> > I have thought that memcpy could be generated by mm/page.c as copy_page  
> > and clear_page are.
> 
> No, these two only generate copy_page and clear_page.  I and Thiemo were
> considering to extend this to a full memcopy however.

BTW, this code in memcpy.S (and memcpy-atomic.S) looks weird.

#if !defined(CONFIG_DMA_COHERENT) || !defined(CONFIG_DMA_IP27)
#undef CONFIG_CPU_HAS_PREFETCH
#endif
#ifdef CONFIG_MIPS_MALTA
#undef CONFIG_CPU_HAS_PREFETCH
#endif

Are there any configuration which do not undef CONFIG_CPU_HAS_PREFETCH ? ;-)

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>