Lines Matching full:hwlock

63 int hwspin_lock_free(struct hwspinlock *hwlock);
65 int hwspin_lock_get_id(struct hwspinlock *hwlock);
71 int hwspin_lock_bust(struct hwspinlock *hwlock, unsigned int id);
72 int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock);
108 static inline int hwspin_lock_free(struct hwspinlock *hwlock) in hwspin_lock_free() argument
114 int __hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int to, in __hwspin_lock_timeout() argument
121 int __hwspin_trylock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_trylock() argument
127 void __hwspin_unlock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_unlock() argument
131 static inline int hwspin_lock_bust(struct hwspinlock *hwlock, unsigned int id) in hwspin_lock_bust() argument
141 static inline int hwspin_lock_get_id(struct hwspinlock *hwlock) in hwspin_lock_get_id() argument
153 int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock) in devm_hwspin_lock_free() argument
174 * @hwlock: an hwspinlock which we want to trylock
186 * the hwspinlock was already taken, and -EINVAL if @hwlock is invalid.
189 int hwspin_trylock_irqsave(struct hwspinlock *hwlock, unsigned long *flags) in hwspin_trylock_irqsave() argument
191 return __hwspin_trylock(hwlock, HWLOCK_IRQSTATE, flags); in hwspin_trylock_irqsave()
196 * @hwlock: an hwspinlock which we want to trylock
206 * the hwspinlock was already taken, and -EINVAL if @hwlock is invalid.
208 static inline int hwspin_trylock_irq(struct hwspinlock *hwlock) in hwspin_trylock_irq() argument
210 return __hwspin_trylock(hwlock, HWLOCK_IRQ, NULL); in hwspin_trylock_irq()
215 * @hwlock: an hwspinlock which we want to trylock
225 * the hwspinlock was already taken, and -EINVAL if @hwlock is invalid.
227 static inline int hwspin_trylock_raw(struct hwspinlock *hwlock) in hwspin_trylock_raw() argument
229 return __hwspin_trylock(hwlock, HWLOCK_RAW, NULL); in hwspin_trylock_raw()
234 * @hwlock: an hwspinlock which we want to trylock
242 * the hwspinlock was already taken, and -EINVAL if @hwlock is invalid.
244 static inline int hwspin_trylock_in_atomic(struct hwspinlock *hwlock) in hwspin_trylock_in_atomic() argument
246 return __hwspin_trylock(hwlock, HWLOCK_IN_ATOMIC, NULL); in hwspin_trylock_in_atomic()
251 * @hwlock: an hwspinlock which we want to trylock
262 * the hwspinlock was already taken, and -EINVAL if @hwlock is invalid.
264 static inline int hwspin_trylock(struct hwspinlock *hwlock) in hwspin_trylock() argument
266 return __hwspin_trylock(hwlock, 0, NULL); in hwspin_trylock()
271 * @hwlock: the hwspinlock to be locked
275 * This function locks the underlying @hwlock. If the @hwlock
283 * Returns 0 when the @hwlock was successfully taken, and an appropriate
284 * error code otherwise (most notably an -ETIMEDOUT if the @hwlock is still
287 static inline int hwspin_lock_timeout_irqsave(struct hwspinlock *hwlock, in hwspin_lock_timeout_irqsave() argument
290 return __hwspin_lock_timeout(hwlock, to, HWLOCK_IRQSTATE, flags); in hwspin_lock_timeout_irqsave()
295 * @hwlock: the hwspinlock to be locked
298 * This function locks the underlying @hwlock. If the @hwlock
306 * Returns 0 when the @hwlock was successfully taken, and an appropriate
307 * error code otherwise (most notably an -ETIMEDOUT if the @hwlock is still
311 int hwspin_lock_timeout_irq(struct hwspinlock *hwlock, unsigned int to) in hwspin_lock_timeout_irq() argument
313 return __hwspin_lock_timeout(hwlock, to, HWLOCK_IRQ, NULL); in hwspin_lock_timeout_irq()
318 * @hwlock: the hwspinlock to be locked
321 * This function locks the underlying @hwlock. If the @hwlock
329 * Returns 0 when the @hwlock was successfully taken, and an appropriate
330 * error code otherwise (most notably an -ETIMEDOUT if the @hwlock is still
334 int hwspin_lock_timeout_raw(struct hwspinlock *hwlock, unsigned int to) in hwspin_lock_timeout_raw() argument
336 return __hwspin_lock_timeout(hwlock, to, HWLOCK_RAW, NULL); in hwspin_lock_timeout_raw()
341 * @hwlock: the hwspinlock to be locked
344 * This function locks the underlying @hwlock. If the @hwlock
351 * Returns 0 when the @hwlock was successfully taken, and an appropriate
352 * error code otherwise (most notably an -ETIMEDOUT if the @hwlock is still
356 int hwspin_lock_timeout_in_atomic(struct hwspinlock *hwlock, unsigned int to) in hwspin_lock_timeout_in_atomic() argument
358 return __hwspin_lock_timeout(hwlock, to, HWLOCK_IN_ATOMIC, NULL); in hwspin_lock_timeout_in_atomic()
363 * @hwlock: the hwspinlock to be locked
366 * This function locks the underlying @hwlock. If the @hwlock
376 * Returns 0 when the @hwlock was successfully taken, and an appropriate
377 * error code otherwise (most notably an -ETIMEDOUT if the @hwlock is still
381 int hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int to) in hwspin_lock_timeout() argument
383 return __hwspin_lock_timeout(hwlock, to, 0, NULL); in hwspin_lock_timeout()
388 * @hwlock: a previously-acquired hwspinlock which we want to unlock
395 * @hwlock must be already locked before calling this function: it is a bug
396 * to call unlock on a @hwlock that is already unlocked.
398 static inline void hwspin_unlock_irqrestore(struct hwspinlock *hwlock, in hwspin_unlock_irqrestore() argument
401 __hwspin_unlock(hwlock, HWLOCK_IRQSTATE, flags); in hwspin_unlock_irqrestore()
406 * @hwlock: a previously-acquired hwspinlock which we want to unlock
411 * @hwlock must be already locked (e.g. by hwspin_trylock_irq()) before
412 * calling this function: it is a bug to call unlock on a @hwlock that is
415 static inline void hwspin_unlock_irq(struct hwspinlock *hwlock) in hwspin_unlock_irq() argument
417 __hwspin_unlock(hwlock, HWLOCK_IRQ, NULL); in hwspin_unlock_irq()
422 * @hwlock: a previously-acquired hwspinlock which we want to unlock
426 * @hwlock must be already locked (e.g. by hwspin_trylock()) before calling
427 * this function: it is a bug to call unlock on a @hwlock that is already
430 static inline void hwspin_unlock_raw(struct hwspinlock *hwlock) in hwspin_unlock_raw() argument
432 __hwspin_unlock(hwlock, HWLOCK_RAW, NULL); in hwspin_unlock_raw()
437 * @hwlock: a previously-acquired hwspinlock which we want to unlock
441 * @hwlock must be already locked (e.g. by hwspin_trylock()) before calling
442 * this function: it is a bug to call unlock on a @hwlock that is already
445 static inline void hwspin_unlock_in_atomic(struct hwspinlock *hwlock) in hwspin_unlock_in_atomic() argument
447 __hwspin_unlock(hwlock, HWLOCK_IN_ATOMIC, NULL); in hwspin_unlock_in_atomic()
452 * @hwlock: a previously-acquired hwspinlock which we want to unlock
457 * @hwlock must be already locked (e.g. by hwspin_trylock()) before calling
458 * this function: it is a bug to call unlock on a @hwlock that is already
461 static inline void hwspin_unlock(struct hwspinlock *hwlock) in hwspin_unlock() argument
463 __hwspin_unlock(hwlock, 0, NULL); in hwspin_unlock()