Lines Matching full:hwlock

63 int hwspin_lock_free(struct hwspinlock *hwlock);
65 int hwspin_lock_get_id(struct hwspinlock *hwlock);
71 int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock);
107 static inline int hwspin_lock_free(struct hwspinlock *hwlock) in hwspin_lock_free() argument
113 int __hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int to, in __hwspin_lock_timeout() argument
120 int __hwspin_trylock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_trylock() argument
126 void __hwspin_unlock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_unlock() argument
135 static inline int hwspin_lock_get_id(struct hwspinlock *hwlock) in hwspin_lock_get_id() argument
147 int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock) in devm_hwspin_lock_free() argument
168 * @hwlock: an hwspinlock which we want to trylock
180 * the hwspinlock was already taken, and -EINVAL if @hwlock is invalid.
183 int hwspin_trylock_irqsave(struct hwspinlock *hwlock, unsigned long *flags) in hwspin_trylock_irqsave() argument
185 return __hwspin_trylock(hwlock, HWLOCK_IRQSTATE, flags); in hwspin_trylock_irqsave()
190 * @hwlock: an hwspinlock which we want to trylock
200 * the hwspinlock was already taken, and -EINVAL if @hwlock is invalid.
202 static inline int hwspin_trylock_irq(struct hwspinlock *hwlock) in hwspin_trylock_irq() argument
204 return __hwspin_trylock(hwlock, HWLOCK_IRQ, NULL); in hwspin_trylock_irq()
209 * @hwlock: an hwspinlock which we want to trylock
219 * the hwspinlock was already taken, and -EINVAL if @hwlock is invalid.
221 static inline int hwspin_trylock_raw(struct hwspinlock *hwlock) in hwspin_trylock_raw() argument
223 return __hwspin_trylock(hwlock, HWLOCK_RAW, NULL); in hwspin_trylock_raw()
228 * @hwlock: an hwspinlock which we want to trylock
236 * the hwspinlock was already taken, and -EINVAL if @hwlock is invalid.
238 static inline int hwspin_trylock_in_atomic(struct hwspinlock *hwlock) in hwspin_trylock_in_atomic() argument
240 return __hwspin_trylock(hwlock, HWLOCK_IN_ATOMIC, NULL); in hwspin_trylock_in_atomic()
245 * @hwlock: an hwspinlock which we want to trylock
256 * the hwspinlock was already taken, and -EINVAL if @hwlock is invalid.
258 static inline int hwspin_trylock(struct hwspinlock *hwlock) in hwspin_trylock() argument
260 return __hwspin_trylock(hwlock, 0, NULL); in hwspin_trylock()
265 * @hwlock: the hwspinlock to be locked
269 * This function locks the underlying @hwlock. If the @hwlock
277 * Returns 0 when the @hwlock was successfully taken, and an appropriate
278 * error code otherwise (most notably an -ETIMEDOUT if the @hwlock is still
281 static inline int hwspin_lock_timeout_irqsave(struct hwspinlock *hwlock, in hwspin_lock_timeout_irqsave() argument
284 return __hwspin_lock_timeout(hwlock, to, HWLOCK_IRQSTATE, flags); in hwspin_lock_timeout_irqsave()
289 * @hwlock: the hwspinlock to be locked
292 * This function locks the underlying @hwlock. If the @hwlock
300 * Returns 0 when the @hwlock was successfully taken, and an appropriate
301 * error code otherwise (most notably an -ETIMEDOUT if the @hwlock is still
305 int hwspin_lock_timeout_irq(struct hwspinlock *hwlock, unsigned int to) in hwspin_lock_timeout_irq() argument
307 return __hwspin_lock_timeout(hwlock, to, HWLOCK_IRQ, NULL); in hwspin_lock_timeout_irq()
312 * @hwlock: the hwspinlock to be locked
315 * This function locks the underlying @hwlock. If the @hwlock
323 * Returns 0 when the @hwlock was successfully taken, and an appropriate
324 * error code otherwise (most notably an -ETIMEDOUT if the @hwlock is still
328 int hwspin_lock_timeout_raw(struct hwspinlock *hwlock, unsigned int to) in hwspin_lock_timeout_raw() argument
330 return __hwspin_lock_timeout(hwlock, to, HWLOCK_RAW, NULL); in hwspin_lock_timeout_raw()
335 * @hwlock: the hwspinlock to be locked
338 * This function locks the underlying @hwlock. If the @hwlock
345 * Returns 0 when the @hwlock was successfully taken, and an appropriate
346 * error code otherwise (most notably an -ETIMEDOUT if the @hwlock is still
350 int hwspin_lock_timeout_in_atomic(struct hwspinlock *hwlock, unsigned int to) in hwspin_lock_timeout_in_atomic() argument
352 return __hwspin_lock_timeout(hwlock, to, HWLOCK_IN_ATOMIC, NULL); in hwspin_lock_timeout_in_atomic()
357 * @hwlock: the hwspinlock to be locked
360 * This function locks the underlying @hwlock. If the @hwlock
370 * Returns 0 when the @hwlock was successfully taken, and an appropriate
371 * error code otherwise (most notably an -ETIMEDOUT if the @hwlock is still
375 int hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int to) in hwspin_lock_timeout() argument
377 return __hwspin_lock_timeout(hwlock, to, 0, NULL); in hwspin_lock_timeout()
382 * @hwlock: a previously-acquired hwspinlock which we want to unlock
389 * @hwlock must be already locked before calling this function: it is a bug
390 * to call unlock on a @hwlock that is already unlocked.
392 static inline void hwspin_unlock_irqrestore(struct hwspinlock *hwlock, in hwspin_unlock_irqrestore() argument
395 __hwspin_unlock(hwlock, HWLOCK_IRQSTATE, flags); in hwspin_unlock_irqrestore()
400 * @hwlock: a previously-acquired hwspinlock which we want to unlock
405 * @hwlock must be already locked (e.g. by hwspin_trylock_irq()) before
406 * calling this function: it is a bug to call unlock on a @hwlock that is
409 static inline void hwspin_unlock_irq(struct hwspinlock *hwlock) in hwspin_unlock_irq() argument
411 __hwspin_unlock(hwlock, HWLOCK_IRQ, NULL); in hwspin_unlock_irq()
416 * @hwlock: a previously-acquired hwspinlock which we want to unlock
420 * @hwlock must be already locked (e.g. by hwspin_trylock()) before calling
421 * this function: it is a bug to call unlock on a @hwlock that is already
424 static inline void hwspin_unlock_raw(struct hwspinlock *hwlock) in hwspin_unlock_raw() argument
426 __hwspin_unlock(hwlock, HWLOCK_RAW, NULL); in hwspin_unlock_raw()
431 * @hwlock: a previously-acquired hwspinlock which we want to unlock
435 * @hwlock must be already locked (e.g. by hwspin_trylock()) before calling
436 * this function: it is a bug to call unlock on a @hwlock that is already
439 static inline void hwspin_unlock_in_atomic(struct hwspinlock *hwlock) in hwspin_unlock_in_atomic() argument
441 __hwspin_unlock(hwlock, HWLOCK_IN_ATOMIC, NULL); in hwspin_unlock_in_atomic()
446 * @hwlock: a previously-acquired hwspinlock which we want to unlock
451 * @hwlock must be already locked (e.g. by hwspin_trylock()) before calling
452 * this function: it is a bug to call unlock on a @hwlock that is already
455 static inline void hwspin_unlock(struct hwspinlock *hwlock) in hwspin_unlock() argument
457 __hwspin_unlock(hwlock, 0, NULL); in hwspin_unlock()