powerpc: Setup BHRB instructions facility in HFSCR for POWER8
authorAnshuman Khandual <khandual@linux.vnet.ibm.com>
Thu, 25 Apr 2013 20:54:55 +0000 (20:54 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 2 May 2013 00:35:15 +0000 (10:35 +1000)
Make BHRB instructions available in problem and privileged states.

Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/reg.h
arch/powerpc/kernel/cpu_setup_power.S

index 5c6fbe2c5ce6e3192152e379eb4cdcd9e9c89912..178a85844462eabcb37247bb372a74f545c237a1 100644 (file)
 #define   HFSCR_TAR    (1 << (63-55)) /* Enable Target Address Register */
 #define   HFSCR_TM     (1 << (63-58)) /* Enable Transactional Memory */
 #define   HFSCR_PM     (1 << (63-60)) /* Enable prob/priv access to PMU SPRs */
+#define   HFSCR_BHRB   (1 << (63-59)) /* Enable Branch History Rolling Buffer*/
 #define   HFSCR_DSCR   (1 << (63-61)) /* Enable Data Stream Control Register */
 #define   HFSCR_VECVSX (1 << (63-62)) /* Enable VMX/VSX  */
 #define   HFSCR_FP     (1 << (63-63)) /* Enable Floating Point */
index e0c419b8d65b79e0dd35c2759ac348179faf93a2..7b4db965b5923eb7b504a1b15e44b298e556f328 100644 (file)
@@ -129,7 +129,8 @@ __init_FSCR:
 
 __init_HFSCR:
        mfspr   r3,SPRN_HFSCR
-       ori     r3,r3,HFSCR_TAR|HFSCR_TM|HFSCR_DSCR|HFSCR_VECVSX|HFSCR_FP|HFSCR_PM
+       ori     r3,r3,HFSCR_TAR|HFSCR_TM|HFSCR_BHRB|HFSCR_PM|\
+                               HFSCR_DSCR|HFSCR_VECVSX|HFSCR_FP
        mtspr   SPRN_HFSCR,r3
        blr