diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2016-06-18 21:09:30 -0400 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2016-06-21 08:40:38 -0400 |
commit | 1d9e94779956b765d316924cc39af2165ad631fb (patch) | |
tree | 494f9ff55568aec4eb5260139a6ef23bf1570d03 | |
parent | b829037136766abf34456e2406bab67d689b3538 (diff) |
ARM: i.MX: system.c: Tweak prefetch settings for performance
Update Prefetch Control Register settings to match that of Freescale's
Linux tree. As the commit e3addf1b773964eac7f797e8538c69481be4279c
states (author Nitin Garg):
"... set Prefetch offset to 15, since it improves memcpy performance by
35%. Don't enable Incr double Linefill enable since it adversely affects
memcpy performance by about 32MB/s and reads by 90MB/s. Tested with 4K
to 16MB sized src and dst aligned buffer..."
Those results are also corroborated by our own testing.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Chris Healy <cphealy@gmail.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
-rw-r--r-- | arch/arm/mach-imx/system.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index 76d7ebe883d7..bf7ab779d5bf 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c | |||
@@ -111,8 +111,12 @@ void __init imx_init_l2cache(void) | |||
111 | val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL); | 111 | val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL); |
112 | val |= L310_PREFETCH_CTRL_DBL_LINEFILL | | 112 | val |= L310_PREFETCH_CTRL_DBL_LINEFILL | |
113 | L310_PREFETCH_CTRL_INSTR_PREFETCH | | 113 | L310_PREFETCH_CTRL_INSTR_PREFETCH | |
114 | L310_PREFETCH_CTRL_DATA_PREFETCH | | 114 | L310_PREFETCH_CTRL_DATA_PREFETCH; |
115 | L310_PREFETCH_CTRL_DBL_LINEFILL_INCR; | 115 | |
116 | /* Set perfetch offset to improve performance */ | ||
117 | val &= ~L310_PREFETCH_CTRL_OFFSET_MASK; | ||
118 | val |= 15; | ||
119 | |||
116 | writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL); | 120 | writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL); |
117 | } | 121 | } |
118 | 122 | ||