diff options
-rw-r--r-- | arch/powerpc/kernel/fpu.S | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/vector.S | 4 | ||||
-rw-r--r-- | include/asm-powerpc/reg.h | 13 |
3 files changed, 18 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S index 340730fb8c91..01f71200c603 100644 --- a/arch/powerpc/kernel/fpu.S +++ b/arch/powerpc/kernel/fpu.S | |||
@@ -72,7 +72,7 @@ _GLOBAL(load_up_fpu) | |||
72 | std r12,_MSR(r1) | 72 | std r12,_MSR(r1) |
73 | #endif | 73 | #endif |
74 | lfd fr0,THREAD_FPSCR(r5) | 74 | lfd fr0,THREAD_FPSCR(r5) |
75 | mtfsf 0xff,fr0 | 75 | MTFSF_L(fr0) |
76 | REST_32FPRS(0, r5) | 76 | REST_32FPRS(0, r5) |
77 | #ifndef CONFIG_SMP | 77 | #ifndef CONFIG_SMP |
78 | subi r4,r5,THREAD | 78 | subi r4,r5,THREAD |
@@ -127,7 +127,7 @@ _GLOBAL(giveup_fpu) | |||
127 | 127 | ||
128 | _GLOBAL(cvt_fd) | 128 | _GLOBAL(cvt_fd) |
129 | lfd 0,THREAD_FPSCR(r5) /* load up fpscr value */ | 129 | lfd 0,THREAD_FPSCR(r5) /* load up fpscr value */ |
130 | mtfsf 0xff,0 | 130 | MTFSF_L(0) |
131 | lfs 0,0(r3) | 131 | lfs 0,0(r3) |
132 | stfd 0,0(r4) | 132 | stfd 0,0(r4) |
133 | mffs 0 | 133 | mffs 0 |
@@ -136,7 +136,7 @@ _GLOBAL(cvt_fd) | |||
136 | 136 | ||
137 | _GLOBAL(cvt_df) | 137 | _GLOBAL(cvt_df) |
138 | lfd 0,THREAD_FPSCR(r5) /* load up fpscr value */ | 138 | lfd 0,THREAD_FPSCR(r5) /* load up fpscr value */ |
139 | mtfsf 0xff,0 | 139 | MTFSF_L(0) |
140 | lfd 0,0(r3) | 140 | lfd 0,0(r3) |
141 | stfs 0,0(r4) | 141 | stfs 0,0(r4) |
142 | mffs 0 | 142 | mffs 0 |
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S index 66b3d03c5fa5..9416b4ab92ec 100644 --- a/arch/powerpc/kernel/vector.S +++ b/arch/powerpc/kernel/vector.S | |||
@@ -53,12 +53,12 @@ fpenable: | |||
53 | stfd fr31,8(r1) | 53 | stfd fr31,8(r1) |
54 | LDCONST(fr1, fpzero) | 54 | LDCONST(fr1, fpzero) |
55 | mffs fr31 | 55 | mffs fr31 |
56 | mtfsf 0xff,fr1 | 56 | MTFSF_L(fr1) |
57 | blr | 57 | blr |
58 | 58 | ||
59 | fpdisable: | 59 | fpdisable: |
60 | mtlr r12 | 60 | mtlr r12 |
61 | mtfsf 0xff,fr31 | 61 | MTFSF_L(fr31) |
62 | lfd fr31,8(r1) | 62 | lfd fr31,8(r1) |
63 | lfd fr1,16(r1) | 63 | lfd fr1,16(r1) |
64 | lfd fr0,24(r1) | 64 | lfd fr0,24(r1) |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index 3779b21a7c71..bfc7dc14ffcc 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
@@ -499,6 +499,19 @@ | |||
499 | #define MMCR0_PMC2_LOADMISSTIME 0x5 | 499 | #define MMCR0_PMC2_LOADMISSTIME 0x5 |
500 | #endif | 500 | #endif |
501 | 501 | ||
502 | /* | ||
503 | * An mtfsf instruction with the L bit set. On CPUs that support this a | ||
504 | * full 64bits of FPSCR is restored and on other CPUs it is ignored. | ||
505 | * | ||
506 | * Until binutils gets the new form of mtfsf, hardwire the instruction. | ||
507 | */ | ||
508 | #ifdef CONFIG_PPC64 | ||
509 | #define MTFSF_L(REG) \ | ||
510 | .long (0xfc00058e | ((0xff) << 17) | ((REG) << 11) | (1 << 25)) | ||
511 | #else | ||
512 | #define MTFSF_L(REG) mtfsf 0xff, (REG) | ||
513 | #endif | ||
514 | |||
502 | /* Processor Version Register (PVR) field extraction */ | 515 | /* Processor Version Register (PVR) field extraction */ |
503 | 516 | ||
504 | #define PVR_VER(pvr) (((pvr) >> 16) & 0xFFFF) /* Version field */ | 517 | #define PVR_VER(pvr) (((pvr) >> 16) & 0xFFFF) /* Version field */ |