Loading drivers/hwspinlock/msm_remote_spinlock.c +0 −34 Original line number Diff line number Diff line Loading @@ -419,37 +419,3 @@ int _remote_spin_owner(_remote_spinlock_t *lock) } EXPORT_SYMBOL(_remote_spin_owner); /* end common spinlock API -------------------------------------------------- */ /* remote mutex implementation ---------------------------------------------- */ int _remote_mutex_init(struct remote_mutex_id *id, _remote_mutex_t *lock) { BUG_ON(id == NULL); lock->delay_us = id->delay_us; return _remote_spin_lock_init(id->r_spinlock_id, &(lock->r_spinlock)); } EXPORT_SYMBOL(_remote_mutex_init); void _remote_mutex_lock(_remote_mutex_t *lock) { while (!_remote_spin_trylock(&(lock->r_spinlock))) { if (lock->delay_us >= 1000) msleep(lock->delay_us/1000); else udelay(lock->delay_us); } } EXPORT_SYMBOL(_remote_mutex_lock); void _remote_mutex_unlock(_remote_mutex_t *lock) { _remote_spin_unlock(&(lock->r_spinlock)); } EXPORT_SYMBOL(_remote_mutex_unlock); int _remote_mutex_trylock(_remote_mutex_t *lock) { return _remote_spin_trylock(&(lock->r_spinlock)); } EXPORT_SYMBOL(_remote_mutex_trylock); /* end remote mutex implementation ------------------------------------------ */ include/linux/msm_remote_spinlock.h +0 −33 Original line number Diff line number Diff line Loading @@ -62,37 +62,4 @@ static inline int _remote_spin_owner(_remote_spinlock_t *lock) return -ENODEV; } #endif /* Remote mutex definitions. */ typedef struct { _remote_spinlock_t r_spinlock; uint32_t delay_us; } _remote_mutex_t; struct remote_mutex_id { remote_spinlock_id_t r_spinlock_id; uint32_t delay_us; }; #ifdef CONFIG_REMOTE_SPINLOCK_MSM int _remote_mutex_init(struct remote_mutex_id *id, _remote_mutex_t *lock); void _remote_mutex_lock(_remote_mutex_t *lock); void _remote_mutex_unlock(_remote_mutex_t *lock); int _remote_mutex_trylock(_remote_mutex_t *lock); #else static inline int _remote_mutex_init(struct remote_mutex_id *id, _remote_mutex_t *lock) { return -EINVAL; } static inline void _remote_mutex_lock(_remote_mutex_t *lock) {} static inline void _remote_mutex_unlock(_remote_mutex_t *lock) {} static inline int _remote_mutex_trylock(_remote_mutex_t *lock) { return 0; } #endif #endif /* __ASM__ARCH_QC_REMOTE_SPINLOCK_H */ include/linux/remote_spinlock.h +0 −31 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ #define __LINUX_REMOTE_SPINLOCK_H #include <linux/spinlock.h> #include <linux/mutex.h> #include <linux/msm_remote_spinlock.h> /* Grabbing a local spin lock before going for a remote lock has several Loading Loading @@ -91,34 +90,4 @@ typedef struct { #define remote_spin_owner(lock) \ _remote_spin_owner(&((lock)->remote)) typedef struct { struct mutex local; _remote_mutex_t remote; } remote_mutex_t; #define remote_mutex_init(lock, id) \ ({ \ mutex_init(&((lock)->local)); \ _remote_mutex_init(id, &((lock)->remote)); \ }) #define remote_mutex_lock(lock) \ do { \ mutex_lock(&((lock)->local)); \ _remote_mutex_lock(&((lock)->remote)); \ } while (0) #define remote_mutex_trylock(lock) \ ({ \ mutex_trylock(&((lock)->local)) \ ? _remote_mutex_trylock(&((lock)->remote)) \ ? 1 \ : ({mutex_unlock(&((lock)->local)); 0; }) \ : 0; \ }) #define remote_mutex_unlock(lock) \ do { \ _remote_mutex_unlock(&((lock)->remote)); \ mutex_unlock(&((lock)->local)); \ } while (0) #endif Loading
drivers/hwspinlock/msm_remote_spinlock.c +0 −34 Original line number Diff line number Diff line Loading @@ -419,37 +419,3 @@ int _remote_spin_owner(_remote_spinlock_t *lock) } EXPORT_SYMBOL(_remote_spin_owner); /* end common spinlock API -------------------------------------------------- */ /* remote mutex implementation ---------------------------------------------- */ int _remote_mutex_init(struct remote_mutex_id *id, _remote_mutex_t *lock) { BUG_ON(id == NULL); lock->delay_us = id->delay_us; return _remote_spin_lock_init(id->r_spinlock_id, &(lock->r_spinlock)); } EXPORT_SYMBOL(_remote_mutex_init); void _remote_mutex_lock(_remote_mutex_t *lock) { while (!_remote_spin_trylock(&(lock->r_spinlock))) { if (lock->delay_us >= 1000) msleep(lock->delay_us/1000); else udelay(lock->delay_us); } } EXPORT_SYMBOL(_remote_mutex_lock); void _remote_mutex_unlock(_remote_mutex_t *lock) { _remote_spin_unlock(&(lock->r_spinlock)); } EXPORT_SYMBOL(_remote_mutex_unlock); int _remote_mutex_trylock(_remote_mutex_t *lock) { return _remote_spin_trylock(&(lock->r_spinlock)); } EXPORT_SYMBOL(_remote_mutex_trylock); /* end remote mutex implementation ------------------------------------------ */
include/linux/msm_remote_spinlock.h +0 −33 Original line number Diff line number Diff line Loading @@ -62,37 +62,4 @@ static inline int _remote_spin_owner(_remote_spinlock_t *lock) return -ENODEV; } #endif /* Remote mutex definitions. */ typedef struct { _remote_spinlock_t r_spinlock; uint32_t delay_us; } _remote_mutex_t; struct remote_mutex_id { remote_spinlock_id_t r_spinlock_id; uint32_t delay_us; }; #ifdef CONFIG_REMOTE_SPINLOCK_MSM int _remote_mutex_init(struct remote_mutex_id *id, _remote_mutex_t *lock); void _remote_mutex_lock(_remote_mutex_t *lock); void _remote_mutex_unlock(_remote_mutex_t *lock); int _remote_mutex_trylock(_remote_mutex_t *lock); #else static inline int _remote_mutex_init(struct remote_mutex_id *id, _remote_mutex_t *lock) { return -EINVAL; } static inline void _remote_mutex_lock(_remote_mutex_t *lock) {} static inline void _remote_mutex_unlock(_remote_mutex_t *lock) {} static inline int _remote_mutex_trylock(_remote_mutex_t *lock) { return 0; } #endif #endif /* __ASM__ARCH_QC_REMOTE_SPINLOCK_H */
include/linux/remote_spinlock.h +0 −31 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ #define __LINUX_REMOTE_SPINLOCK_H #include <linux/spinlock.h> #include <linux/mutex.h> #include <linux/msm_remote_spinlock.h> /* Grabbing a local spin lock before going for a remote lock has several Loading Loading @@ -91,34 +90,4 @@ typedef struct { #define remote_spin_owner(lock) \ _remote_spin_owner(&((lock)->remote)) typedef struct { struct mutex local; _remote_mutex_t remote; } remote_mutex_t; #define remote_mutex_init(lock, id) \ ({ \ mutex_init(&((lock)->local)); \ _remote_mutex_init(id, &((lock)->remote)); \ }) #define remote_mutex_lock(lock) \ do { \ mutex_lock(&((lock)->local)); \ _remote_mutex_lock(&((lock)->remote)); \ } while (0) #define remote_mutex_trylock(lock) \ ({ \ mutex_trylock(&((lock)->local)) \ ? _remote_mutex_trylock(&((lock)->remote)) \ ? 1 \ : ({mutex_unlock(&((lock)->local)); 0; }) \ : 0; \ }) #define remote_mutex_unlock(lock) \ do { \ _remote_mutex_unlock(&((lock)->remote)); \ mutex_unlock(&((lock)->local)); \ } while (0) #endif