diff options
author | Michael Neuling <mikey@neuling.org> | 2012-09-09 20:35:26 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-09-17 02:31:47 -0400 |
commit | b92a66a65cb4480774066d9a3080c77eb34b7232 (patch) | |
tree | ba40ef5be8bdb9b76e36ec1da29db90189d2a821 /arch/powerpc/include | |
parent | eda485f06d17f98bd58559fb5dd331951ffd1608 (diff) |
powerpc: Add denormalisation exception handling for POWER6/7
On POWER6 and POWER7 if the input operand to an instruction is a
denormalised single precision binary floating point value we can take
a denormalisation exception where it's expected that the hypervisor
(HV=1) will fix up the inputs before the instruction is run.
This adds code to handle this denormalisation exception for POWER6 and
POWER7.
It also add a CONFIG_PPC_DENORMALISATION option and sets it in
pseries/ppc64_defconfig.
This is useful on bare metal systems only. Based on patch from Milton
Miller.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/ppc-opcode.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/reg.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index 4c25319f2fbc..5f73ce63fcae 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h | |||
@@ -126,6 +126,7 @@ | |||
126 | #define PPC_INST_TLBIVAX 0x7c000624 | 126 | #define PPC_INST_TLBIVAX 0x7c000624 |
127 | #define PPC_INST_TLBSRX_DOT 0x7c0006a5 | 127 | #define PPC_INST_TLBSRX_DOT 0x7c0006a5 |
128 | #define PPC_INST_XXLOR 0xf0000510 | 128 | #define PPC_INST_XXLOR 0xf0000510 |
129 | #define PPC_INST_XVCPSGNDP 0xf0000780 | ||
129 | 130 | ||
130 | #define PPC_INST_NAP 0x4c000364 | 131 | #define PPC_INST_NAP 0x4c000364 |
131 | #define PPC_INST_SLEEP 0x4c0003a4 | 132 | #define PPC_INST_SLEEP 0x4c0003a4 |
@@ -277,6 +278,8 @@ | |||
277 | VSX_XX1((s), a, b)) | 278 | VSX_XX1((s), a, b)) |
278 | #define XXLOR(t, a, b) stringify_in_c(.long PPC_INST_XXLOR | \ | 279 | #define XXLOR(t, a, b) stringify_in_c(.long PPC_INST_XXLOR | \ |
279 | VSX_XX3((t), a, b)) | 280 | VSX_XX3((t), a, b)) |
281 | #define XVCPSGNDP(t, a, b) stringify_in_c(.long (PPC_INST_XVCPSGNDP | \ | ||
282 | VSX_XX3((t), (a), (b)))) | ||
280 | 283 | ||
281 | #define PPC_NAP stringify_in_c(.long PPC_INST_NAP) | 284 | #define PPC_NAP stringify_in_c(.long PPC_INST_NAP) |
282 | #define PPC_SLEEP stringify_in_c(.long PPC_INST_SLEEP) | 285 | #define PPC_SLEEP stringify_in_c(.long PPC_INST_SLEEP) |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 121a90bbf778..a1096fb62816 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -524,6 +524,7 @@ | |||
524 | 524 | ||
525 | #define SPRN_HSRR0 0x13A /* Save/Restore Register 0 */ | 525 | #define SPRN_HSRR0 0x13A /* Save/Restore Register 0 */ |
526 | #define SPRN_HSRR1 0x13B /* Save/Restore Register 1 */ | 526 | #define SPRN_HSRR1 0x13B /* Save/Restore Register 1 */ |
527 | #define HSRR1_DENORM 0x00100000 /* Denorm exception */ | ||
527 | 528 | ||
528 | #define SPRN_TBCTL 0x35f /* PA6T Timebase control register */ | 529 | #define SPRN_TBCTL 0x35f /* PA6T Timebase control register */ |
529 | #define TBCTL_FREEZE 0x0000000000000000ull /* Freeze all tbs */ | 530 | #define TBCTL_FREEZE 0x0000000000000000ull /* Freeze all tbs */ |