~ubuntu-branches/debian/experimental/linux-tools/experimental

« back to all changes in this revision

Viewing changes to arch/alpha/include/asm/pal.h

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-02-02 16:57:49 UTC
  • mfrom: (1.1.10) (0.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20140202165749-tw94o9t1t0a8txk6
Tags: 3.13-1~exp2
Merge changes from sid up to 3.12.6-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
__CALL_PAL_RW2(wrperfmon, unsigned long, unsigned long, unsigned long);
90
90
__CALL_PAL_W1(wrusp, unsigned long);
91
91
__CALL_PAL_W1(wrvptptr, unsigned long);
 
92
__CALL_PAL_RW1(wtint, unsigned long, unsigned long);
92
93
 
93
94
/*
94
95
 * TB routines..
111
112
#define tbiap()         __tbi(-1, /* no second argument */)
112
113
#define tbia()          __tbi(-2, /* no second argument */)
113
114
 
 
115
/*
 
116
 * QEMU Cserv routines..
 
117
 */
 
118
 
 
119
static inline unsigned long
 
120
qemu_get_walltime(void)
 
121
{
 
122
        register unsigned long v0 __asm__("$0");
 
123
        register unsigned long a0 __asm__("$16") = 3;
 
124
 
 
125
        asm("call_pal %2 # cserve get_time"
 
126
            : "=r"(v0), "+r"(a0)
 
127
            : "i"(PAL_cserve)
 
128
            : "$17", "$18", "$19", "$20", "$21");
 
129
 
 
130
        return v0;
 
131
}
 
132
 
 
133
static inline unsigned long
 
134
qemu_get_alarm(void)
 
135
{
 
136
        register unsigned long v0 __asm__("$0");
 
137
        register unsigned long a0 __asm__("$16") = 4;
 
138
 
 
139
        asm("call_pal %2 # cserve get_alarm"
 
140
            : "=r"(v0), "+r"(a0)
 
141
            : "i"(PAL_cserve)
 
142
            : "$17", "$18", "$19", "$20", "$21");
 
143
 
 
144
        return v0;
 
145
}
 
146
 
 
147
static inline void
 
148
qemu_set_alarm_rel(unsigned long expire)
 
149
{
 
150
        register unsigned long a0 __asm__("$16") = 5;
 
151
        register unsigned long a1 __asm__("$17") = expire;
 
152
 
 
153
        asm volatile("call_pal %2 # cserve set_alarm_rel"
 
154
                     : "+r"(a0), "+r"(a1)
 
155
                     : "i"(PAL_cserve)
 
156
                     : "$0", "$18", "$19", "$20", "$21");
 
157
}
 
158
 
 
159
static inline void
 
160
qemu_set_alarm_abs(unsigned long expire)
 
161
{
 
162
        register unsigned long a0 __asm__("$16") = 6;
 
163
        register unsigned long a1 __asm__("$17") = expire;
 
164
 
 
165
        asm volatile("call_pal %2 # cserve set_alarm_abs"
 
166
                     : "+r"(a0), "+r"(a1)
 
167
                     : "i"(PAL_cserve)
 
168
                     : "$0", "$18", "$19", "$20", "$21");
 
169
}
 
170
 
 
171
static inline unsigned long
 
172
qemu_get_vmtime(void)
 
173
{
 
174
        register unsigned long v0 __asm__("$0");
 
175
        register unsigned long a0 __asm__("$16") = 7;
 
176
 
 
177
        asm("call_pal %2 # cserve get_time"
 
178
            : "=r"(v0), "+r"(a0)
 
179
            : "i"(PAL_cserve)
 
180
            : "$17", "$18", "$19", "$20", "$21");
 
181
 
 
182
        return v0;
 
183
}
 
184
 
114
185
#endif /* !__ASSEMBLY__ */
115
186
#endif /* __ALPHA_PAL_H */