Skip to content

Commit

Permalink
powerpc: Setup in HFSCR for POWER8
Browse files Browse the repository at this point in the history
Setup the HFSCR (Hypervisor Facility Status and Control Register) for POWER8
when running HV=1.  The HFSCR is the same as the FSCR except it's for
hypervisors.  It controls the available of various facilities in OS and
userspace levels.  It also indicates the cause of a hypervisor facility
unavailable interrupt (although we are not using this here).

This patch sets the facilities Linux knows about incase the firmware doesn't.

Signed-off-by: Michael Neuling <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
  • Loading branch information
mikey authored and mpe committed Apr 18, 2013
1 parent 04b418c commit 2a3563b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/powerpc/kernel/cpu_setup_power.S
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ _GLOBAL(__setup_cpu_power8)
mfspr r3,SPRN_LPCR
oris r3, r3, LPCR_AIL_3@h
bl __init_LPCR
bl __init_HFSCR
bl __init_TLB
mtlr r11
blr
Expand All @@ -72,6 +73,7 @@ _GLOBAL(__restore_cpu_power8)
mfspr r3,SPRN_LPCR
oris r3, r3, LPCR_AIL_3@h
bl __init_LPCR
bl __init_HFSCR
bl __init_TLB
mtlr r11
blr
Expand Down Expand Up @@ -120,6 +122,12 @@ __init_FSCR:
mtspr SPRN_FSCR,r3
blr

__init_HFSCR:
mfspr r3,SPRN_HFSCR
ori r3,r3,HFSCR_TAR|HFSCR_TM|HFSCR_DSCR|HFSCR_VECVSX|HFSCR_FP
mtspr SPRN_HFSCR,r3
blr

__init_TLB:
/* Clear the TLB */
li r6,128
Expand Down

0 comments on commit 2a3563b

Please sign in to comment.