aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-01-23 21:25:55 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-19 21:03:23 -0400
commit895796a8ab548fe03b6fea410dcb1b86e1913708 (patch)
treed25d7c5c284386d21c1f16162d0cfd52fbc154e8
parent673b189a2e3353061fa8c49515d1014dab6ad9b9 (diff)
powerpc: Initialize LPCR:DPFD on power7 to a sane default
This sets the default data stream prefetch size for operating systems that don't set their own value in DSCR. We use 4 which is "medium". Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/kernel/cpu_setup_power7.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/cpu_setup_power7.S b/arch/powerpc/kernel/cpu_setup_power7.S
index e801ef15d6d0..2390f6f7c478 100644
--- a/arch/powerpc/kernel/cpu_setup_power7.S
+++ b/arch/powerpc/kernel/cpu_setup_power7.S
@@ -54,6 +54,7 @@ __init_LPCR:
54 * 54 *
55 * LPES = 0b01 (HSRR0/1 used for 0x500) 55 * LPES = 0b01 (HSRR0/1 used for 0x500)
56 * PECE = 0b111 56 * PECE = 0b111
57 * DPFD = 4
57 * 58 *
58 * Other bits untouched for now 59 * Other bits untouched for now
59 */ 60 */
@@ -61,6 +62,12 @@ __init_LPCR:
61 ori r3,r3,(LPCR_LPES0|LPCR_LPES1) 62 ori r3,r3,(LPCR_LPES0|LPCR_LPES1)
62 xori r3,r3, LPCR_LPES0 63 xori r3,r3, LPCR_LPES0
63 ori r3,r3,(LPCR_PECE0|LPCR_PECE1|LPCR_PECE2) 64 ori r3,r3,(LPCR_PECE0|LPCR_PECE1|LPCR_PECE2)
65 li r5,7
66 sldi r5,r5,LPCR_DPFD_SH
67 andc r3,r3,r5
68 li r5,4
69 sldi r5,r5,LPCR_DPFD_SH
70 or r3,r3,r5
64 mtspr SPRN_LPCR,r3 71 mtspr SPRN_LPCR,r3
65 isync 72 isync
66 blr 73 blr