diff options
Diffstat (limited to 'arch/x86/xen/spinlock.c')
-rw-r--r-- | arch/x86/xen/spinlock.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 36a5141108df..e0500646585d 100644 --- a/arch/x86/xen/spinlock.c +++ b/arch/x86/xen/spinlock.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/debugfs.h> | 7 | #include <linux/debugfs.h> |
8 | #include <linux/log2.h> | 8 | #include <linux/log2.h> |
9 | #include <linux/gfp.h> | ||
9 | 10 | ||
10 | #include <asm/paravirt.h> | 11 | #include <asm/paravirt.h> |
11 | 12 | ||
@@ -120,14 +121,14 @@ struct xen_spinlock { | |||
120 | unsigned short spinners; /* count of waiting cpus */ | 121 | unsigned short spinners; /* count of waiting cpus */ |
121 | }; | 122 | }; |
122 | 123 | ||
123 | static int xen_spin_is_locked(struct raw_spinlock *lock) | 124 | static int xen_spin_is_locked(struct arch_spinlock *lock) |
124 | { | 125 | { |
125 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; | 126 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; |
126 | 127 | ||
127 | return xl->lock != 0; | 128 | return xl->lock != 0; |
128 | } | 129 | } |
129 | 130 | ||
130 | static int xen_spin_is_contended(struct raw_spinlock *lock) | 131 | static int xen_spin_is_contended(struct arch_spinlock *lock) |
131 | { | 132 | { |
132 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; | 133 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; |
133 | 134 | ||
@@ -136,7 +137,7 @@ static int xen_spin_is_contended(struct raw_spinlock *lock) | |||
136 | return xl->spinners != 0; | 137 | return xl->spinners != 0; |
137 | } | 138 | } |
138 | 139 | ||
139 | static int xen_spin_trylock(struct raw_spinlock *lock) | 140 | static int xen_spin_trylock(struct arch_spinlock *lock) |
140 | { | 141 | { |
141 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; | 142 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; |
142 | u8 old = 1; | 143 | u8 old = 1; |
@@ -181,7 +182,7 @@ static inline void unspinning_lock(struct xen_spinlock *xl, struct xen_spinlock | |||
181 | __get_cpu_var(lock_spinners) = prev; | 182 | __get_cpu_var(lock_spinners) = prev; |
182 | } | 183 | } |
183 | 184 | ||
184 | static noinline int xen_spin_lock_slow(struct raw_spinlock *lock, bool irq_enable) | 185 | static noinline int xen_spin_lock_slow(struct arch_spinlock *lock, bool irq_enable) |
185 | { | 186 | { |
186 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; | 187 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; |
187 | struct xen_spinlock *prev; | 188 | struct xen_spinlock *prev; |
@@ -254,7 +255,7 @@ out: | |||
254 | return ret; | 255 | return ret; |
255 | } | 256 | } |
256 | 257 | ||
257 | static inline void __xen_spin_lock(struct raw_spinlock *lock, bool irq_enable) | 258 | static inline void __xen_spin_lock(struct arch_spinlock *lock, bool irq_enable) |
258 | { | 259 | { |
259 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; | 260 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; |
260 | unsigned timeout; | 261 | unsigned timeout; |
@@ -291,12 +292,12 @@ static inline void __xen_spin_lock(struct raw_spinlock *lock, bool irq_enable) | |||
291 | spin_time_accum_total(start_spin); | 292 | spin_time_accum_total(start_spin); |
292 | } | 293 | } |
293 | 294 | ||
294 | static void xen_spin_lock(struct raw_spinlock *lock) | 295 | static void xen_spin_lock(struct arch_spinlock *lock) |
295 | { | 296 | { |
296 | __xen_spin_lock(lock, false); | 297 | __xen_spin_lock(lock, false); |
297 | } | 298 | } |
298 | 299 | ||
299 | static void xen_spin_lock_flags(struct raw_spinlock *lock, unsigned long flags) | 300 | static void xen_spin_lock_flags(struct arch_spinlock *lock, unsigned long flags) |
300 | { | 301 | { |
301 | __xen_spin_lock(lock, !raw_irqs_disabled_flags(flags)); | 302 | __xen_spin_lock(lock, !raw_irqs_disabled_flags(flags)); |
302 | } | 303 | } |
@@ -317,7 +318,7 @@ static noinline void xen_spin_unlock_slow(struct xen_spinlock *xl) | |||
317 | } | 318 | } |
318 | } | 319 | } |
319 | 320 | ||
320 | static void xen_spin_unlock(struct raw_spinlock *lock) | 321 | static void xen_spin_unlock(struct arch_spinlock *lock) |
321 | { | 322 | { |
322 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; | 323 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; |
323 | 324 | ||