[ARM] tegra: Enable pl310 data prefetching and prefetch offset
authorChris Fries <C.Fries@motorola.com>
Fri, 11 Feb 2011 20:26:20 +0000 (14:26 -0600)
committerColin Cross <ccross@android.com>
Sat, 12 Feb 2011 22:52:03 +0000 (14:52 -0800)
commit6c77fdda35688ae3c9d9029a9824f7cf941f348d
tree18424961ebd40a35e79697b368ff1f78a45506c9
parent6b53bad8ac54b3d748c4b0dbe6b0a4ed6e2e60f4
[ARM] tegra: Enable pl310 data prefetching and prefetch offset

Enable data prefetching in the L2 cache controller, and set
the prefetch offset to 7.

Memcpy performance measured copying 16 MB buffers 78 times:
Data prefetch disabled, prefetch offset 0: 440 MB/s
Enabling data prefetching, prefetch offset 0: 430 MB/s
Enabling data prefetching, prefetch offset 7: 502 MB/s

Overall, this patch gives a 14% improvement in memcpy performance.

Prefetch offset of 8 causes prefetches to cross 4k boundaries
and cannot be used.

Original-author: Gary King <gking@nvidia.com>
Signed-off-by: Chris Fries <C.Fries@motorola.com>
Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I7ce0810b3f94edc2640df3f643cf81357052f2f1
arch/arm/mach-tegra/common.c