diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-01-12 01:41:28 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-19 21:03:21 -0400 |
commit | 50fb8ebe7c4ad60d147700d253f78bd1e615a526 (patch) | |
tree | c214579ee3918a35da142392e31505301a85f8fe | |
parent | 0b05ac6e24807f0c26f763b3a546c0bcbf84125f (diff) |
powerpc: Add more Power7 specific definitions
This adds more SPR definitions used on newer processors when running
in hypervisor mode. Along with some other P7 specific bits and pieces
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/include/asm/ppc_asm.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/reg.h | 46 |
2 files changed, 46 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h index 98210067c1cc..1b422381fc16 100644 --- a/arch/powerpc/include/asm/ppc_asm.h +++ b/arch/powerpc/include/asm/ppc_asm.h | |||
@@ -170,6 +170,7 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR) | |||
170 | #define HMT_MEDIUM or 2,2,2 | 170 | #define HMT_MEDIUM or 2,2,2 |
171 | #define HMT_MEDIUM_HIGH or 5,5,5 # medium high priority | 171 | #define HMT_MEDIUM_HIGH or 5,5,5 # medium high priority |
172 | #define HMT_HIGH or 3,3,3 | 172 | #define HMT_HIGH or 3,3,3 |
173 | #define HMT_EXTRA_HIGH or 7,7,7 # power7 only | ||
173 | 174 | ||
174 | #ifdef __KERNEL__ | 175 | #ifdef __KERNEL__ |
175 | #ifdef CONFIG_PPC64 | 176 | #ifdef CONFIG_PPC64 |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 7e4abebe76c0..6eb1d77edb4b 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -210,8 +210,43 @@ | |||
210 | #define SPRN_TBWL 0x11C /* Time Base Lower Register (super, R/W) */ | 210 | #define SPRN_TBWL 0x11C /* Time Base Lower Register (super, R/W) */ |
211 | #define SPRN_TBWU 0x11D /* Time Base Upper Register (super, R/W) */ | 211 | #define SPRN_TBWU 0x11D /* Time Base Upper Register (super, R/W) */ |
212 | #define SPRN_SPURR 0x134 /* Scaled PURR */ | 212 | #define SPRN_SPURR 0x134 /* Scaled PURR */ |
213 | #define SPRN_HSPRG0 0x130 /* Hypervisor Scratch 0 */ | ||
214 | #define SPRN_HSPRG1 0x131 /* Hypervisor Scratch 1 */ | ||
215 | #define SPRN_HDSISR 0x132 | ||
216 | #define SPRN_HDAR 0x133 | ||
217 | #define SPRN_HDEC 0x136 /* Hypervisor Decrementer */ | ||
213 | #define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */ | 218 | #define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */ |
219 | #define SPRN_RMOR 0x138 /* Real mode offset register */ | ||
220 | #define SPRN_HRMOR 0x139 /* Real mode offset register */ | ||
221 | #define SPRN_HSRR0 0x13A /* Hypervisor Save/Restore 0 */ | ||
222 | #define SPRN_HSRR1 0x13B /* Hypervisor Save/Restore 1 */ | ||
214 | #define SPRN_LPCR 0x13E /* LPAR Control Register */ | 223 | #define SPRN_LPCR 0x13E /* LPAR Control Register */ |
224 | #define LPCR_VPM0 (1ul << (63-0)) | ||
225 | #define LPCR_VPM1 (1ul << (63-1)) | ||
226 | #define LPCR_ISL (1ul << (63-2)) | ||
227 | #define LPCR_DPFD_SH (63-11) | ||
228 | #define LPCR_VRMA_L (1ul << (63-12)) | ||
229 | #define LPCR_VRMA_LP0 (1ul << (63-15)) | ||
230 | #define LPCR_VRMA_LP1 (1ul << (63-16)) | ||
231 | #define LPCR_RMLS 0x1C000000 /* impl dependent rmo limit sel */ | ||
232 | #define LPCR_ILE 0x02000000 /* !HV irqs set MSR:LE */ | ||
233 | #define LPCR_PECE 0x00007000 /* powersave exit cause enable */ | ||
234 | #define LPCR_PECE0 0x00004000 /* ext. exceptions can cause exit */ | ||
235 | #define LPCR_PECE1 0x00002000 /* decrementer can cause exit */ | ||
236 | #define LPCR_PECE2 0x00001000 /* machine check etc can cause exit */ | ||
237 | #define LPCR_MER 0x00000800 /* Mediated External Exception */ | ||
238 | #define LPCR_LPES0 0x00000008 /* LPAR Env selector 0 */ | ||
239 | #define LPCR_LPES1 0x00000004 /* LPAR Env selector 1 */ | ||
240 | #define LPCR_RMI 0x00000002 /* real mode is cache inhibit */ | ||
241 | #define LPCR_HDICE 0x00000001 /* Hyp Decr enable (HV,PR,EE) */ | ||
242 | #define SPRN_LPID 0x13F /* Logical Partition Identifier */ | ||
243 | #define SPRN_HMER 0x150 /* Hardware m? error recovery */ | ||
244 | #define SPRN_HMEER 0x151 /* Hardware m? enable error recovery */ | ||
245 | #define SPRN_HEIR 0x153 /* Hypervisor Emulated Instruction Register */ | ||
246 | #define SPRN_TLBINDEXR 0x154 /* P7 TLB control register */ | ||
247 | #define SPRN_TLBVPNR 0x155 /* P7 TLB control register */ | ||
248 | #define SPRN_TLBRPNR 0x156 /* P7 TLB control register */ | ||
249 | #define SPRN_TLBLPIDR 0x157 /* P7 TLB control register */ | ||
215 | #define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */ | 250 | #define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */ |
216 | #define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */ | 251 | #define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */ |
217 | #define SPRN_DBAT1L 0x21B /* Data BAT 1 Lower Register */ | 252 | #define SPRN_DBAT1L 0x21B /* Data BAT 1 Lower Register */ |
@@ -434,16 +469,23 @@ | |||
434 | #define SPRN_SRR0 0x01A /* Save/Restore Register 0 */ | 469 | #define SPRN_SRR0 0x01A /* Save/Restore Register 0 */ |
435 | #define SPRN_SRR1 0x01B /* Save/Restore Register 1 */ | 470 | #define SPRN_SRR1 0x01B /* Save/Restore Register 1 */ |
436 | #define SRR1_WAKEMASK 0x00380000 /* reason for wakeup */ | 471 | #define SRR1_WAKEMASK 0x00380000 /* reason for wakeup */ |
437 | #define SRR1_WAKERESET 0x00380000 /* System reset */ | ||
438 | #define SRR1_WAKESYSERR 0x00300000 /* System error */ | 472 | #define SRR1_WAKESYSERR 0x00300000 /* System error */ |
439 | #define SRR1_WAKEEE 0x00200000 /* External interrupt */ | 473 | #define SRR1_WAKEEE 0x00200000 /* External interrupt */ |
440 | #define SRR1_WAKEMT 0x00280000 /* mtctrl */ | 474 | #define SRR1_WAKEMT 0x00280000 /* mtctrl */ |
475 | #define SRR1_WAKEHMI 0x00280000 /* Hypervisor maintenance */ | ||
441 | #define SRR1_WAKEDEC 0x00180000 /* Decrementer interrupt */ | 476 | #define SRR1_WAKEDEC 0x00180000 /* Decrementer interrupt */ |
442 | #define SRR1_WAKETHERM 0x00100000 /* Thermal management interrupt */ | 477 | #define SRR1_WAKETHERM 0x00100000 /* Thermal management interrupt */ |
478 | #define SRR1_WAKERESET 0x00100000 /* System reset */ | ||
479 | #define SRR1_WAKESTATE 0x00030000 /* Powersave exit mask [46:47] */ | ||
480 | #define SRR1_WS_DEEPEST 0x00030000 /* Some resources not maintained, | ||
481 | * may not be recoverable */ | ||
482 | #define SRR1_WS_DEEPER 0x00020000 /* Some resources not maintained */ | ||
483 | #define SRR1_WS_DEEP 0x00010000 /* All resources maintained */ | ||
443 | #define SRR1_PROGFPE 0x00100000 /* Floating Point Enabled */ | 484 | #define SRR1_PROGFPE 0x00100000 /* Floating Point Enabled */ |
444 | #define SRR1_PROGPRIV 0x00040000 /* Privileged instruction */ | 485 | #define SRR1_PROGPRIV 0x00040000 /* Privileged instruction */ |
445 | #define SRR1_PROGTRAP 0x00020000 /* Trap */ | 486 | #define SRR1_PROGTRAP 0x00020000 /* Trap */ |
446 | #define SRR1_PROGADDR 0x00010000 /* SRR0 contains subsequent addr */ | 487 | #define SRR1_PROGADDR 0x00010000 /* SRR0 contains subsequent addr */ |
488 | |||
447 | #define SPRN_HSRR0 0x13A /* Save/Restore Register 0 */ | 489 | #define SPRN_HSRR0 0x13A /* Save/Restore Register 0 */ |
448 | #define SPRN_HSRR1 0x13B /* Save/Restore Register 1 */ | 490 | #define SPRN_HSRR1 0x13B /* Save/Restore Register 1 */ |
449 | 491 | ||
@@ -894,6 +936,8 @@ | |||
894 | #define PV_POWER5p 0x003B | 936 | #define PV_POWER5p 0x003B |
895 | #define PV_POWER7 0x003F | 937 | #define PV_POWER7 0x003F |
896 | #define PV_970FX 0x003C | 938 | #define PV_970FX 0x003C |
939 | #define PV_POWER6 0x003E | ||
940 | #define PV_POWER7 0x003F | ||
897 | #define PV_630 0x0040 | 941 | #define PV_630 0x0040 |
898 | #define PV_630p 0x0041 | 942 | #define PV_630p 0x0041 |
899 | #define PV_970MP 0x0044 | 943 | #define PV_970MP 0x0044 |