aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/xmon/privinst.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc/xmon/privinst.h')
-rw-r--r--arch/ppc/xmon/privinst.h90
1 files changed, 0 insertions, 90 deletions
diff --git a/arch/ppc/xmon/privinst.h b/arch/ppc/xmon/privinst.h
deleted file mode 100644
index c492a35687bd..000000000000
--- a/arch/ppc/xmon/privinst.h
+++ /dev/null
@@ -1,90 +0,0 @@
1/*
2 * Copyright (C) 1996 Paul Mackerras.
3 */
4
5#define GETREG(reg) \
6 static inline int get_ ## reg (void) \
7 { int ret; asm volatile ("mf" #reg " %0" : "=r" (ret) :); return ret; }
8
9#define SETREG(reg) \
10 static inline void set_ ## reg (int val) \
11 { asm volatile ("mt" #reg " %0" : : "r" (val)); }
12
13GETREG(msr)
14SETREG(msr)
15GETREG(cr)
16
17#define GSETSPR(n, name) \
18 static inline int get_ ## name (void) \
19 { int ret; asm volatile ("mfspr %0," #n : "=r" (ret) : ); return ret; } \
20 static inline void set_ ## name (int val) \
21 { asm volatile ("mtspr " #n ",%0" : : "r" (val)); }
22
23GSETSPR(0, mq)
24GSETSPR(1, xer)
25GSETSPR(4, rtcu)
26GSETSPR(5, rtcl)
27GSETSPR(8, lr)
28GSETSPR(9, ctr)
29GSETSPR(18, dsisr)
30GSETSPR(19, dar)
31GSETSPR(22, dec)
32GSETSPR(25, sdr1)
33GSETSPR(26, srr0)
34GSETSPR(27, srr1)
35GSETSPR(272, sprg0)
36GSETSPR(273, sprg1)
37GSETSPR(274, sprg2)
38GSETSPR(275, sprg3)
39GSETSPR(282, ear)
40GSETSPR(287, pvr)
41#ifndef CONFIG_8xx
42GSETSPR(528, bat0u)
43GSETSPR(529, bat0l)
44GSETSPR(530, bat1u)
45GSETSPR(531, bat1l)
46GSETSPR(532, bat2u)
47GSETSPR(533, bat2l)
48GSETSPR(534, bat3u)
49GSETSPR(535, bat3l)
50GSETSPR(1008, hid0)
51GSETSPR(1009, hid1)
52GSETSPR(1010, iabr)
53GSETSPR(1013, dabr)
54GSETSPR(1023, pir)
55#else
56GSETSPR(144, cmpa)
57GSETSPR(145, cmpb)
58GSETSPR(146, cmpc)
59GSETSPR(147, cmpd)
60GSETSPR(158, ictrl)
61#endif
62
63static inline int get_sr(int n)
64{
65 int ret;
66
67 asm (" mfsrin %0,%1" : "=r" (ret) : "r" (n << 28));
68 return ret;
69}
70
71static inline void set_sr(int n, int val)
72{
73 asm ("mtsrin %0,%1" : : "r" (val), "r" (n << 28));
74}
75
76static inline void store_inst(void *p)
77{
78 asm volatile ("dcbst 0,%0; sync; icbi 0,%0; isync" : : "r" (p));
79}
80
81static inline void cflush(void *p)
82{
83 asm volatile ("dcbf 0,%0; icbi 0,%0" : : "r" (p));
84}
85
86static inline void cinval(void *p)
87{
88 asm volatile ("dcbi 0,%0; icbi 0,%0" : : "r" (p));
89}
90