aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/reg.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/reg.h')
-rw-r--r--include/asm-powerpc/reg.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h
index 8fb96811b55d..a3631b15754c 100644
--- a/include/asm-powerpc/reg.h
+++ b/include/asm-powerpc/reg.h
@@ -143,6 +143,7 @@
143 143
144/* Special Purpose Registers (SPRNs)*/ 144/* Special Purpose Registers (SPRNs)*/
145#define SPRN_CTR 0x009 /* Count Register */ 145#define SPRN_CTR 0x009 /* Count Register */
146#define SPRN_DSCR 0x11
146#define SPRN_CTRLF 0x088 147#define SPRN_CTRLF 0x088
147#define SPRN_CTRLT 0x098 148#define SPRN_CTRLT 0x098
148#define CTRL_CT 0xc0000000 /* current thread */ 149#define CTRL_CT 0xc0000000 /* current thread */
@@ -163,6 +164,7 @@
163#define SPRN_TBRU 0x10D /* Time Base Read Upper Register (user, R/O) */ 164#define SPRN_TBRU 0x10D /* Time Base Read Upper Register (user, R/O) */
164#define SPRN_TBWL 0x11C /* Time Base Lower Register (super, R/W) */ 165#define SPRN_TBWL 0x11C /* Time Base Lower Register (super, R/W) */
165#define SPRN_TBWU 0x11D /* Time Base Upper Register (super, R/W) */ 166#define SPRN_TBWU 0x11D /* Time Base Upper Register (super, R/W) */
167#define SPRN_SPURR 0x134 /* Scaled PURR */
166#define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */ 168#define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */
167#define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */ 169#define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */
168#define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */ 170#define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */
@@ -591,6 +593,7 @@
591#define PV_630 0x0040 593#define PV_630 0x0040
592#define PV_630p 0x0041 594#define PV_630p 0x0041
593#define PV_970MP 0x0044 595#define PV_970MP 0x0044
596#define PV_970GX 0x0045
594#define PV_BE 0x0070 597#define PV_BE 0x0070
595#define PV_PA6T 0x0090 598#define PV_PA6T 0x0090
596 599
@@ -618,10 +621,35 @@
618 : "=r" (rval)); rval;}) 621 : "=r" (rval)); rval;})
619#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v)) 622#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
620 623
624#ifdef __powerpc64__
625#ifdef CONFIG_PPC_CELL
626#define mftb() ({unsigned long rval; \
627 asm volatile( \
628 "90: mftb %0;\n" \
629 "97: cmpwi %0,0;\n" \
630 " beq- 90b;\n" \
631 "99:\n" \
632 ".section __ftr_fixup,\"a\"\n" \
633 ".align 3\n" \
634 "98:\n" \
635 " .llong %1\n" \
636 " .llong %1\n" \
637 " .llong 97b-98b\n" \
638 " .llong 99b-98b\n" \
639 ".previous" \
640 : "=r" (rval) : "i" (CPU_FTR_CELL_TB_BUG)); rval;})
641#else
621#define mftb() ({unsigned long rval; \ 642#define mftb() ({unsigned long rval; \
622 asm volatile("mftb %0" : "=r" (rval)); rval;}) 643 asm volatile("mftb %0" : "=r" (rval)); rval;})
644#endif /* !CONFIG_PPC_CELL */
645
646#else /* __powerpc64__ */
647
623#define mftbl() ({unsigned long rval; \ 648#define mftbl() ({unsigned long rval; \
624 asm volatile("mftbl %0" : "=r" (rval)); rval;}) 649 asm volatile("mftbl %0" : "=r" (rval)); rval;})
650#define mftbu() ({unsigned long rval; \
651 asm volatile("mftbu %0" : "=r" (rval)); rval;})
652#endif /* !__powerpc64__ */
625 653
626#define mttbl(v) asm volatile("mttbl %0":: "r"(v)) 654#define mttbl(v) asm volatile("mttbl %0":: "r"(v))
627#define mttbu(v) asm volatile("mttbu %0":: "r"(v)) 655#define mttbu(v) asm volatile("mttbu %0":: "r"(v))