linux/arch/sh/include
Giuseppe CAVALLARO d53e4307c2 sh: Use GCC __builtin_prefetch() to implement prefetch().
GCC's __builtin_prefetch() was introduced a long time ago, all
supported GCC versions have it. So this patch is to use it for
implementing the prefetch on SH2A and SH4.

The current  prefetch implementation is almost equivalent with
__builtin_prefetch.
The third parameter in the __builtin_prefetch is the locality
that it's not supported on SH architectures.  It has been set
to three and it should be verified if it's suitable for SH2A
as well. I didn't test on this architecture.

The builtin usage should be more efficient that an __asm__
because less barriers, and because the compiler doesn't see the
inst as a "black box" allowing better code generation.

This has been already done on other architectures (see the commit:
0453fb3c52).

Many thanks to Christian Bruel <christain.bruel@st.com> for his
support on evaluate the impact of the gcc built-in on SH4 arch.

No regressions found while testing with LMbench on STLinux targets.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-18 14:53:18 +09:00
..
asm sh: Use GCC __builtin_prefetch() to implement prefetch(). 2010-11-18 14:53:18 +09:00
cpu-common/cpu sh: Kill off unused cpu/cacheflush.h. 2009-08-21 16:20:57 +09:00
cpu-sh2/cpu sh: Mass ctrl_in/outX to __raw_read/writeX conversion. 2010-01-26 12:58:40 +09:00
cpu-sh2a/cpu sh: Convert SH-2A to new cacheflush interface. 2009-08-15 12:38:29 +09:00
cpu-sh3/cpu sh: Fix up the SH-3 build. 2010-10-07 02:57:39 +09:00
cpu-sh4/cpu sh: pinmux support for SH-X3 proto CPUs. 2010-10-02 19:20:51 +09:00
cpu-sh5/cpu sh: Convert cache disabled SH-5 over to new cache interface. 2009-08-16 00:53:56 +09:00
mach-common/mach sh: mach-edosk7705: Kill off machtype, consolidate board def. 2010-10-29 19:38:19 +09:00
mach-dreamcast/mach sh: mach-dreamcast: Convert to sparseirq. 2010-02-02 18:01:55 +09:00
mach-ecovec24/mach sh: add romImage MMCIF boot for sh7724 and Ecovec V2 2010-05-31 13:11:54 +09:00
mach-kfr2r09/mach sh: add a parameter to LCDC driver's .display_on() callback 2010-08-04 16:12:11 +09:00
mach-landisk/mach
mach-migor/mach sh: audio support for the sh7722 Migo-R board 2010-03-02 11:08:54 +09:00
mach-sdk7786/mach sh: mach-sdk7786: Add support for the FPGA SRAM. 2010-10-15 02:13:04 +09:00
mach-se/mach sh: mach-se: Convert SE7343 FPGA to dynamic IRQ allocation. 2010-01-12 13:37:04 +09:00
mach-sh03/mach
mach-x3proto/mach sh: mach-x3proto: Support for baseboard GPIOs. 2010-10-04 02:59:29 +09:00