Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
rtmutex: Add missing rcu_read_unlock() in debug_rt_mutex_print_deadlock()
lockdep: Comment all warnings
lib: atomic64: Change the type of local lock to raw_spinlock_t
locking, lib/atomic64: Annotate atomic64_lock::lock as raw
locking, x86, iommu: Annotate qi->q_lock as raw
locking, x86, iommu: Annotate irq_2_ir_lock as raw
locking, x86, iommu: Annotate iommu->register_lock as raw
locking, dma, ipu: Annotate bank_lock as raw
locking, ARM: Annotate low level hw locks as raw
locking, drivers/dca: Annotate dca_lock as raw
locking, powerpc: Annotate uic->lock as raw
locking, x86: mce: Annotate cmci_discover_lock as raw
locking, ACPI: Annotate c3_lock as raw
locking, oprofile: Annotate oprofilefs lock as raw
locking, video: Annotate vga console lock as raw
locking, latencytop: Annotate latency_lock as raw
locking, timer_stats: Annotate table_lock as raw
locking, rwsem: Annotate inner lock as raw
locking, semaphores: Annotate inner lock as raw
locking, sched: Annotate thread_group_cputimer as raw
...
Fix up conflicts in kernel/posix-cpu-timers.c manually: making
cputimer->cputime a raw lock conflicted with the ABBA fix in commit
bcd5cff721 ("cputimer: Cure lock inversion").
This commit is contained in:
@@ -42,7 +42,7 @@ extern struct fs_struct init_fs;
|
||||
.cputimer = { \
|
||||
.cputime = INIT_CPUTIME, \
|
||||
.running = 0, \
|
||||
.lock = __SPIN_LOCK_UNLOCKED(sig.cputimer.lock), \
|
||||
.lock = __RAW_SPIN_LOCK_UNLOCKED(sig.cputimer.lock), \
|
||||
}, \
|
||||
.cred_guard_mutex = \
|
||||
__MUTEX_INITIALIZER(sig.cred_guard_mutex), \
|
||||
|
||||
@@ -271,7 +271,7 @@ struct qi_desc {
|
||||
};
|
||||
|
||||
struct q_inval {
|
||||
spinlock_t q_lock;
|
||||
raw_spinlock_t q_lock;
|
||||
struct qi_desc *desc; /* invalidation queue */
|
||||
int *desc_status; /* desc status */
|
||||
int free_head; /* first free entry */
|
||||
@@ -311,7 +311,7 @@ struct intel_iommu {
|
||||
u64 cap;
|
||||
u64 ecap;
|
||||
u32 gcmd; /* Holds TE, EAFL. Don't need SRTP, SFL, WBF */
|
||||
spinlock_t register_lock; /* protect register handling */
|
||||
raw_spinlock_t register_lock; /* protect register handling */
|
||||
int seq_id; /* sequence id of the iommu */
|
||||
int agaw; /* agaw of this iommu */
|
||||
int msagaw; /* max sagaw of this iommu */
|
||||
|
||||
@@ -181,7 +181,7 @@ struct kretprobe {
|
||||
int nmissed;
|
||||
size_t data_size;
|
||||
struct hlist_head free_instances;
|
||||
spinlock_t lock;
|
||||
raw_spinlock_t lock;
|
||||
};
|
||||
|
||||
struct kretprobe_instance {
|
||||
|
||||
@@ -166,7 +166,7 @@ ssize_t oprofilefs_ulong_to_user(unsigned long val, char __user * buf, size_t co
|
||||
int oprofilefs_ulong_from_user(unsigned long * val, char const __user * buf, size_t count);
|
||||
|
||||
/** lock for read/write safety */
|
||||
extern spinlock_t oprofilefs_lock;
|
||||
extern raw_spinlock_t oprofilefs_lock;
|
||||
|
||||
/**
|
||||
* Add the contents of a circular buffer to the event buffer.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
struct percpu_counter {
|
||||
spinlock_t lock;
|
||||
raw_spinlock_t lock;
|
||||
s64 count;
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
struct list_head list; /* All percpu_counters are on a list */
|
||||
|
||||
@@ -58,7 +58,7 @@ struct prop_local_percpu {
|
||||
*/
|
||||
int shift;
|
||||
unsigned long period;
|
||||
spinlock_t lock; /* protect the snapshot state */
|
||||
raw_spinlock_t lock; /* protect the snapshot state */
|
||||
};
|
||||
|
||||
int prop_local_init_percpu(struct prop_local_percpu *pl);
|
||||
@@ -106,11 +106,11 @@ struct prop_local_single {
|
||||
*/
|
||||
unsigned long period;
|
||||
int shift;
|
||||
spinlock_t lock; /* protect the snapshot state */
|
||||
raw_spinlock_t lock; /* protect the snapshot state */
|
||||
};
|
||||
|
||||
#define INIT_PROP_LOCAL_SINGLE(name) \
|
||||
{ .lock = __SPIN_LOCK_UNLOCKED(name.lock), \
|
||||
{ .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
|
||||
}
|
||||
|
||||
int prop_local_init_single(struct prop_local_single *pl);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define DEFAULT_RATELIMIT_BURST 10
|
||||
|
||||
struct ratelimit_state {
|
||||
spinlock_t lock; /* protect the state */
|
||||
raw_spinlock_t lock; /* protect the state */
|
||||
|
||||
int interval;
|
||||
int burst;
|
||||
@@ -20,7 +20,7 @@ struct ratelimit_state {
|
||||
#define DEFINE_RATELIMIT_STATE(name, interval_init, burst_init) \
|
||||
\
|
||||
struct ratelimit_state name = { \
|
||||
.lock = __SPIN_LOCK_UNLOCKED(name.lock), \
|
||||
.lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
|
||||
.interval = interval_init, \
|
||||
.burst = burst_init, \
|
||||
}
|
||||
@@ -28,7 +28,7 @@ struct ratelimit_state {
|
||||
static inline void ratelimit_state_init(struct ratelimit_state *rs,
|
||||
int interval, int burst)
|
||||
{
|
||||
spin_lock_init(&rs->lock);
|
||||
raw_spin_lock_init(&rs->lock);
|
||||
rs->interval = interval;
|
||||
rs->burst = burst;
|
||||
rs->printed = 0;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
struct rw_semaphore {
|
||||
__s32 activity;
|
||||
spinlock_t wait_lock;
|
||||
raw_spinlock_t wait_lock;
|
||||
struct list_head wait_list;
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
struct lockdep_map dep_map;
|
||||
|
||||
@@ -25,7 +25,7 @@ struct rw_semaphore;
|
||||
/* All arch specific implementations share the same struct */
|
||||
struct rw_semaphore {
|
||||
long count;
|
||||
spinlock_t wait_lock;
|
||||
raw_spinlock_t wait_lock;
|
||||
struct list_head wait_list;
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
struct lockdep_map dep_map;
|
||||
@@ -56,9 +56,11 @@ static inline int rwsem_is_locked(struct rw_semaphore *sem)
|
||||
# define __RWSEM_DEP_MAP_INIT(lockname)
|
||||
#endif
|
||||
|
||||
#define __RWSEM_INITIALIZER(name) \
|
||||
{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED(name.wait_lock), \
|
||||
LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) }
|
||||
#define __RWSEM_INITIALIZER(name) \
|
||||
{ RWSEM_UNLOCKED_VALUE, \
|
||||
__RAW_SPIN_LOCK_UNLOCKED(name.wait_lock), \
|
||||
LIST_HEAD_INIT((name).wait_list) \
|
||||
__RWSEM_DEP_MAP_INIT(name) }
|
||||
|
||||
#define DECLARE_RWSEM(name) \
|
||||
struct rw_semaphore name = __RWSEM_INITIALIZER(name)
|
||||
|
||||
@@ -510,7 +510,7 @@ struct task_cputime {
|
||||
struct thread_group_cputimer {
|
||||
struct task_cputime cputime;
|
||||
int running;
|
||||
spinlock_t lock;
|
||||
raw_spinlock_t lock;
|
||||
};
|
||||
|
||||
#include <linux/rwsem.h>
|
||||
@@ -2566,7 +2566,7 @@ void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times);
|
||||
|
||||
static inline void thread_group_cputime_init(struct signal_struct *sig)
|
||||
{
|
||||
spin_lock_init(&sig->cputimer.lock);
|
||||
raw_spin_lock_init(&sig->cputimer.lock);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
|
||||
/* Please don't access any members of this structure directly */
|
||||
struct semaphore {
|
||||
spinlock_t lock;
|
||||
raw_spinlock_t lock;
|
||||
unsigned int count;
|
||||
struct list_head wait_list;
|
||||
};
|
||||
|
||||
#define __SEMAPHORE_INITIALIZER(name, n) \
|
||||
{ \
|
||||
.lock = __SPIN_LOCK_UNLOCKED((name).lock), \
|
||||
.lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \
|
||||
.count = n, \
|
||||
.wait_list = LIST_HEAD_INIT((name).wait_list), \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user