Commit 0a0582d8 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 3cb8f26c 3ca0b5ee
...@@ -28,7 +28,7 @@ ifdef CONFIG_SUN3 ...@@ -28,7 +28,7 @@ ifdef CONFIG_SUN3
LDFLAGS_vmlinux = -N LDFLAGS_vmlinux = -N
endif endif
CHECKFLAGS += -D__mc68000__ -I$(shell $(CC) -print-file-name=include) CHECKFLAGS += -D__mc68000__
# without -fno-strength-reduce the 53c7xx.c driver fails ;-( # without -fno-strength-reduce the 53c7xx.c driver fails ;-(
CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
......
...@@ -54,6 +54,8 @@ void free_fd_array(struct file **array, int num) ...@@ -54,6 +54,8 @@ void free_fd_array(struct file **array, int num)
*/ */
int expand_fd_array(struct files_struct *files, int nr) int expand_fd_array(struct files_struct *files, int nr)
__releases(files->file_lock)
__acquires(files->file_lock)
{ {
struct file **new_fds; struct file **new_fds;
int error, nfds; int error, nfds;
...@@ -157,6 +159,8 @@ void free_fdset(fd_set *array, int num) ...@@ -157,6 +159,8 @@ void free_fdset(fd_set *array, int num)
* held for write. * held for write.
*/ */
int expand_fdset(struct files_struct *files, int nr) int expand_fdset(struct files_struct *files, int nr)
__releases(file->file_lock)
__acquires(file->file_lock)
{ {
fd_set *new_openset = NULL, *new_execset = NULL; fd_set *new_openset = NULL, *new_execset = NULL;
int error, nfds = 0; int error, nfds = 0;
......
...@@ -235,36 +235,42 @@ typedef struct { ...@@ -235,36 +235,42 @@ typedef struct {
do { \ do { \
preempt_disable(); \ preempt_disable(); \
_raw_spin_lock(lock); \ _raw_spin_lock(lock); \
__acquire(lock); \
} while(0) } while(0)
#define _write_lock(lock) \ #define _write_lock(lock) \
do { \ do { \
preempt_disable(); \ preempt_disable(); \
_raw_write_lock(lock); \ _raw_write_lock(lock); \
__acquire(lock); \
} while(0) } while(0)
#define _read_lock(lock) \ #define _read_lock(lock) \
do { \ do { \
preempt_disable(); \ preempt_disable(); \
_raw_read_lock(lock); \ _raw_read_lock(lock); \
__acquire(lock); \
} while(0) } while(0)
#define _spin_unlock(lock) \ #define _spin_unlock(lock) \
do { \ do { \
_raw_spin_unlock(lock); \ _raw_spin_unlock(lock); \
preempt_enable(); \ preempt_enable(); \
__release(lock); \
} while (0) } while (0)
#define _write_unlock(lock) \ #define _write_unlock(lock) \
do { \ do { \
_raw_write_unlock(lock); \ _raw_write_unlock(lock); \
preempt_enable(); \ preempt_enable(); \
__release(lock); \
} while(0) } while(0)
#define _read_unlock(lock) \ #define _read_unlock(lock) \
do { \ do { \
_raw_read_unlock(lock); \ _raw_read_unlock(lock); \
preempt_enable(); \ preempt_enable(); \
__release(lock); \
} while(0) } while(0)
#define _spin_lock_irqsave(lock, flags) \ #define _spin_lock_irqsave(lock, flags) \
...@@ -272,6 +278,7 @@ do { \ ...@@ -272,6 +278,7 @@ do { \
local_irq_save(flags); \ local_irq_save(flags); \
preempt_disable(); \ preempt_disable(); \
_raw_spin_lock(lock); \ _raw_spin_lock(lock); \
__acquire(lock); \
} while (0) } while (0)
#define _spin_lock_irq(lock) \ #define _spin_lock_irq(lock) \
...@@ -279,6 +286,7 @@ do { \ ...@@ -279,6 +286,7 @@ do { \
local_irq_disable(); \ local_irq_disable(); \
preempt_disable(); \ preempt_disable(); \
_raw_spin_lock(lock); \ _raw_spin_lock(lock); \
__acquire(lock); \
} while (0) } while (0)
#define _spin_lock_bh(lock) \ #define _spin_lock_bh(lock) \
...@@ -286,6 +294,7 @@ do { \ ...@@ -286,6 +294,7 @@ do { \
local_bh_disable(); \ local_bh_disable(); \
preempt_disable(); \ preempt_disable(); \
_raw_spin_lock(lock); \ _raw_spin_lock(lock); \
__acquire(lock); \
} while (0) } while (0)
#define _read_lock_irqsave(lock, flags) \ #define _read_lock_irqsave(lock, flags) \
...@@ -293,6 +302,7 @@ do { \ ...@@ -293,6 +302,7 @@ do { \
local_irq_save(flags); \ local_irq_save(flags); \
preempt_disable(); \ preempt_disable(); \
_raw_read_lock(lock); \ _raw_read_lock(lock); \
__acquire(lock); \
} while (0) } while (0)
#define _read_lock_irq(lock) \ #define _read_lock_irq(lock) \
...@@ -300,6 +310,7 @@ do { \ ...@@ -300,6 +310,7 @@ do { \
local_irq_disable(); \ local_irq_disable(); \
preempt_disable(); \ preempt_disable(); \
_raw_read_lock(lock); \ _raw_read_lock(lock); \
__acquire(lock); \
} while (0) } while (0)
#define _read_lock_bh(lock) \ #define _read_lock_bh(lock) \
...@@ -307,6 +318,7 @@ do { \ ...@@ -307,6 +318,7 @@ do { \
local_bh_disable(); \ local_bh_disable(); \
preempt_disable(); \ preempt_disable(); \
_raw_read_lock(lock); \ _raw_read_lock(lock); \
__acquire(lock); \
} while (0) } while (0)
#define _write_lock_irqsave(lock, flags) \ #define _write_lock_irqsave(lock, flags) \
...@@ -314,6 +326,7 @@ do { \ ...@@ -314,6 +326,7 @@ do { \
local_irq_save(flags); \ local_irq_save(flags); \
preempt_disable(); \ preempt_disable(); \
_raw_write_lock(lock); \ _raw_write_lock(lock); \
__acquire(lock); \
} while (0) } while (0)
#define _write_lock_irq(lock) \ #define _write_lock_irq(lock) \
...@@ -321,6 +334,7 @@ do { \ ...@@ -321,6 +334,7 @@ do { \
local_irq_disable(); \ local_irq_disable(); \
preempt_disable(); \ preempt_disable(); \
_raw_write_lock(lock); \ _raw_write_lock(lock); \
__acquire(lock); \
} while (0) } while (0)
#define _write_lock_bh(lock) \ #define _write_lock_bh(lock) \
...@@ -328,6 +342,7 @@ do { \ ...@@ -328,6 +342,7 @@ do { \
local_bh_disable(); \ local_bh_disable(); \
preempt_disable(); \ preempt_disable(); \
_raw_write_lock(lock); \ _raw_write_lock(lock); \
__acquire(lock); \
} while (0) } while (0)
#define _spin_unlock_irqrestore(lock, flags) \ #define _spin_unlock_irqrestore(lock, flags) \
...@@ -335,12 +350,7 @@ do { \ ...@@ -335,12 +350,7 @@ do { \
_raw_spin_unlock(lock); \ _raw_spin_unlock(lock); \
local_irq_restore(flags); \ local_irq_restore(flags); \
preempt_enable(); \ preempt_enable(); \
} while (0) __release(lock); \
#define _raw_spin_unlock_irqrestore(lock, flags) \
do { \
_raw_spin_unlock(lock); \
local_irq_restore(flags); \
} while (0) } while (0)
#define _spin_unlock_irq(lock) \ #define _spin_unlock_irq(lock) \
...@@ -348,6 +358,7 @@ do { \ ...@@ -348,6 +358,7 @@ do { \
_raw_spin_unlock(lock); \ _raw_spin_unlock(lock); \
local_irq_enable(); \ local_irq_enable(); \
preempt_enable(); \ preempt_enable(); \
__release(lock); \
} while (0) } while (0)
#define _spin_unlock_bh(lock) \ #define _spin_unlock_bh(lock) \
...@@ -355,6 +366,7 @@ do { \ ...@@ -355,6 +366,7 @@ do { \
_raw_spin_unlock(lock); \ _raw_spin_unlock(lock); \
preempt_enable(); \ preempt_enable(); \
local_bh_enable(); \ local_bh_enable(); \
__release(lock); \
} while (0) } while (0)
#define _write_unlock_bh(lock) \ #define _write_unlock_bh(lock) \
...@@ -362,6 +374,7 @@ do { \ ...@@ -362,6 +374,7 @@ do { \
_raw_write_unlock(lock); \ _raw_write_unlock(lock); \
preempt_enable(); \ preempt_enable(); \
local_bh_enable(); \ local_bh_enable(); \
__release(lock); \
} while (0) } while (0)
#define _read_unlock_irqrestore(lock, flags) \ #define _read_unlock_irqrestore(lock, flags) \
...@@ -369,6 +382,7 @@ do { \ ...@@ -369,6 +382,7 @@ do { \
_raw_read_unlock(lock); \ _raw_read_unlock(lock); \
local_irq_restore(flags); \ local_irq_restore(flags); \
preempt_enable(); \ preempt_enable(); \
__release(lock); \
} while (0) } while (0)
#define _write_unlock_irqrestore(lock, flags) \ #define _write_unlock_irqrestore(lock, flags) \
...@@ -376,6 +390,7 @@ do { \ ...@@ -376,6 +390,7 @@ do { \
_raw_write_unlock(lock); \ _raw_write_unlock(lock); \
local_irq_restore(flags); \ local_irq_restore(flags); \
preempt_enable(); \ preempt_enable(); \
__release(lock); \
} while (0) } while (0)
#define _read_unlock_irq(lock) \ #define _read_unlock_irq(lock) \
...@@ -383,6 +398,7 @@ do { \ ...@@ -383,6 +398,7 @@ do { \
_raw_read_unlock(lock); \ _raw_read_unlock(lock); \
local_irq_enable(); \ local_irq_enable(); \
preempt_enable(); \ preempt_enable(); \
__release(lock); \
} while (0) } while (0)
#define _read_unlock_bh(lock) \ #define _read_unlock_bh(lock) \
...@@ -390,6 +406,7 @@ do { \ ...@@ -390,6 +406,7 @@ do { \
_raw_read_unlock(lock); \ _raw_read_unlock(lock); \
local_bh_enable(); \ local_bh_enable(); \
preempt_enable(); \ preempt_enable(); \
__release(lock); \
} while (0) } while (0)
#define _write_unlock_irq(lock) \ #define _write_unlock_irq(lock) \
...@@ -397,6 +414,7 @@ do { \ ...@@ -397,6 +414,7 @@ do { \
_raw_write_unlock(lock); \ _raw_write_unlock(lock); \
local_irq_enable(); \ local_irq_enable(); \
preempt_enable(); \ preempt_enable(); \
__release(lock); \
} while (0) } while (0)
#endif /* !SMP */ #endif /* !SMP */
......
...@@ -441,6 +441,7 @@ static void __init smp_init(void) ...@@ -441,6 +441,7 @@ static void __init smp_init(void)
*/ */
static void noinline rest_init(void) static void noinline rest_init(void)
__releases(kernel_lock)
{ {
kernel_thread(init, NULL, CLONE_FS | CLONE_SIGHAND); kernel_thread(init, NULL, CLONE_FS | CLONE_SIGHAND);
numa_default_policy(); numa_default_policy();
......
...@@ -57,6 +57,7 @@ static void *r_next(struct seq_file *m, void *v, loff_t *pos) ...@@ -57,6 +57,7 @@ static void *r_next(struct seq_file *m, void *v, loff_t *pos)
} }
static void *r_start(struct seq_file *m, loff_t *pos) static void *r_start(struct seq_file *m, loff_t *pos)
__acquires(resource_lock)
{ {
struct resource *p = m->private; struct resource *p = m->private;
loff_t l = 0; loff_t l = 0;
...@@ -67,6 +68,7 @@ static void *r_start(struct seq_file *m, loff_t *pos) ...@@ -67,6 +68,7 @@ static void *r_start(struct seq_file *m, loff_t *pos)
} }
static void r_stop(struct seq_file *m, void *v) static void r_stop(struct seq_file *m, void *v)
__releases(resource_lock)
{ {
read_unlock(&resource_lock); read_unlock(&resource_lock);
} }
......
...@@ -304,6 +304,7 @@ static DEFINE_PER_CPU(struct runqueue, runqueues); ...@@ -304,6 +304,7 @@ static DEFINE_PER_CPU(struct runqueue, runqueues);
* explicitly disabling preemption. * explicitly disabling preemption.
*/ */
static runqueue_t *task_rq_lock(task_t *p, unsigned long *flags) static runqueue_t *task_rq_lock(task_t *p, unsigned long *flags)
__acquires(rq->lock)
{ {
struct runqueue *rq; struct runqueue *rq;
...@@ -319,6 +320,7 @@ static runqueue_t *task_rq_lock(task_t *p, unsigned long *flags) ...@@ -319,6 +320,7 @@ static runqueue_t *task_rq_lock(task_t *p, unsigned long *flags)
} }
static inline void task_rq_unlock(runqueue_t *rq, unsigned long *flags) static inline void task_rq_unlock(runqueue_t *rq, unsigned long *flags)
__releases(rq->lock)
{ {
spin_unlock_irqrestore(&rq->lock, *flags); spin_unlock_irqrestore(&rq->lock, *flags);
} }
...@@ -426,6 +428,7 @@ struct file_operations proc_schedstat_operations = { ...@@ -426,6 +428,7 @@ struct file_operations proc_schedstat_operations = {
* rq_lock - lock a given runqueue and disable interrupts. * rq_lock - lock a given runqueue and disable interrupts.
*/ */
static runqueue_t *this_rq_lock(void) static runqueue_t *this_rq_lock(void)
__acquires(rq->lock)
{ {
runqueue_t *rq; runqueue_t *rq;
...@@ -437,6 +440,7 @@ static runqueue_t *this_rq_lock(void) ...@@ -437,6 +440,7 @@ static runqueue_t *this_rq_lock(void)
} }
static inline void rq_unlock(runqueue_t *rq) static inline void rq_unlock(runqueue_t *rq)
__releases(rq->lock)
{ {
spin_unlock_irq(&rq->lock); spin_unlock_irq(&rq->lock);
} }
...@@ -1318,6 +1322,7 @@ void fastcall sched_exit(task_t * p) ...@@ -1318,6 +1322,7 @@ void fastcall sched_exit(task_t * p)
* details.) * details.)
*/ */
static void finish_task_switch(task_t *prev) static void finish_task_switch(task_t *prev)
__releases(rq->lock)
{ {
runqueue_t *rq = this_rq(); runqueue_t *rq = this_rq();
struct mm_struct *mm = rq->prev_mm; struct mm_struct *mm = rq->prev_mm;
...@@ -1349,6 +1354,7 @@ static void finish_task_switch(task_t *prev) ...@@ -1349,6 +1354,7 @@ static void finish_task_switch(task_t *prev)
* @prev: the thread we just switched away from. * @prev: the thread we just switched away from.
*/ */
asmlinkage void schedule_tail(task_t *prev) asmlinkage void schedule_tail(task_t *prev)
__releases(rq->lock)
{ {
finish_task_switch(prev); finish_task_switch(prev);
...@@ -1441,10 +1447,13 @@ unsigned long nr_iowait(void) ...@@ -1441,10 +1447,13 @@ unsigned long nr_iowait(void)
* you need to do so manually before calling. * you need to do so manually before calling.
*/ */
static void double_rq_lock(runqueue_t *rq1, runqueue_t *rq2) static void double_rq_lock(runqueue_t *rq1, runqueue_t *rq2)
__acquires(rq1->lock)
__acquires(rq2->lock)
{ {
if (rq1 == rq2) if (rq1 == rq2) {
spin_lock(&rq1->lock); spin_lock(&rq1->lock);
else { __acquire(rq2->lock); /* Fake it out ;) */
} else {
if (rq1 < rq2) { if (rq1 < rq2) {
spin_lock(&rq1->lock); spin_lock(&rq1->lock);
spin_lock(&rq2->lock); spin_lock(&rq2->lock);
...@@ -1462,16 +1471,23 @@ static void double_rq_lock(runqueue_t *rq1, runqueue_t *rq2) ...@@ -1462,16 +1471,23 @@ static void double_rq_lock(runqueue_t *rq1, runqueue_t *rq2)
* you need to do so manually after calling. * you need to do so manually after calling.
*/ */
static void double_rq_unlock(runqueue_t *rq1, runqueue_t *rq2) static void double_rq_unlock(runqueue_t *rq1, runqueue_t *rq2)
__releases(rq1->lock)
__releases(rq2->lock)
{ {
spin_unlock(&rq1->lock); spin_unlock(&rq1->lock);
if (rq1 != rq2) if (rq1 != rq2)
spin_unlock(&rq2->lock); spin_unlock(&rq2->lock);
else
__release(rq2->lock);
} }
/* /*
* double_lock_balance - lock the busiest runqueue, this_rq is locked already. * double_lock_balance - lock the busiest runqueue, this_rq is locked already.
*/ */
static void double_lock_balance(runqueue_t *this_rq, runqueue_t *busiest) static void double_lock_balance(runqueue_t *this_rq, runqueue_t *busiest)
__releases(this_rq->lock)
__acquires(busiest->lock)
__acquires(this_rq->lock)
{ {
if (unlikely(!spin_trylock(&busiest->lock))) { if (unlikely(!spin_trylock(&busiest->lock))) {
if (busiest < this_rq) { if (busiest < this_rq) {
...@@ -3411,6 +3427,7 @@ asmlinkage long sys_sched_yield(void) ...@@ -3411,6 +3427,7 @@ asmlinkage long sys_sched_yield(void)
* Since we are going to call schedule() anyway, there's * Since we are going to call schedule() anyway, there's
* no need to preempt or enable interrupts: * no need to preempt or enable interrupts:
*/ */
__release(rq->lock);
_raw_spin_unlock(&rq->lock); _raw_spin_unlock(&rq->lock);
preempt_enable_no_resched(); preempt_enable_no_resched();
......
...@@ -83,6 +83,7 @@ __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \ ...@@ -83,6 +83,7 @@ __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \
# Linus' kernel sanity checking tool # Linus' kernel sanity checking tool
ifneq ($(KBUILD_CHECKSRC),0) ifneq ($(KBUILD_CHECKSRC),0)
CHECKFLAGS += -I$(shell $(CC) -print-file-name=include)
ifeq ($(KBUILD_CHECKSRC),2) ifeq ($(KBUILD_CHECKSRC),2)
quiet_cmd_force_checksrc = CHECK $< quiet_cmd_force_checksrc = CHECK $<
cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment