Skip to content

Commit

Permalink
powerpc: Initialize LPCR:DPFD on power7 to a sane default
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Benjamin Herrenschmidt committed Apr 20, 2011
1 parent 673b189 commit 895796a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/powerpc/kernel/cpu_setup_power7.S
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,20 @@ __init_LPCR:
*
* LPES = 0b01 (HSRR0/1 used for 0x500)
* PECE = 0b111
* DPFD = 4
*
* Other bits untouched for now
*/
mfspr r3,SPRN_LPCR
ori r3,r3,(LPCR_LPES0|LPCR_LPES1)
xori r3,r3, LPCR_LPES0
ori r3,r3,(LPCR_PECE0|LPCR_PECE1|LPCR_PECE2)
li r5,7
sldi r5,r5,LPCR_DPFD_SH
andc r3,r3,r5
li r5,4
sldi r5,r5,LPCR_DPFD_SH
or r3,r3,r5
mtspr SPRN_LPCR,r3
isync
blr

0 comments on commit 895796a

Please sign in to comment.