original_kernel/kernel
Linus Torvalds a08727bae7 Make workqueue bit operations work on "atomic_long_t"
On architectures where the atomicity of the bit operations is handled by
external means (ie a separate spinlock to protect concurrent accesses),
just doing a direct assignment on the workqueue data field (as done by
commit 4594bf159f) can cause the
assignment to be lost due to lack of serialization with the bitops on
the same word.

So we need to serialize the assignment with the locks on those
architectures (notably older ARM chips, PA-RISC and sparc32).

So rather than using an "unsigned long", let's use "atomic_long_t",
which already has a safe assignment operation (atomic_long_set()) on
such architectures.

This requires that the atomic operations use the same atomicity locks as
the bit operations do, but that is largely the case anyway.  Sparc32
will probably need fixing.

Architectures (including modern ARM with LL/SC) that implement sane
atomic operations for SMP won't see any of this matter.

Cc: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: David Howells <dhowells@redhat.com>
Cc: David Miller <davem@davemloft.com>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Linux Arch Maintainers <linux-arch@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-16 09:53:50 -08:00
..
irq
power Driver core: deprecate PM_LEGACY, default it to N 2006-12-13 15:38:46 -08:00
time [PATCH] clocksource: small cleanup 2006-12-10 09:57:22 -08:00
.gitignore
Kconfig.hz
Kconfig.preempt
Makefile Remove stack unwinder for now 2006-12-15 08:47:51 -08:00
acct.c
audit.c
audit.h
auditfilter.c
auditsc.c
capability.c
compat.c
configs.c
cpu.c
cpuset.c [PATCH] cpuset: rework cpuset_zone_allowed api 2006-12-13 09:05:49 -08:00
delayacct.c
dma.c
exec_domain.c
exit.c [PATCH] fdtable: Remove the free_files field 2006-12-10 09:57:22 -08:00
extable.c
fork.c [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
futex.c
futex_compat.c
hrtimer.c
itimer.c
kallsyms.c
kexec.c
kfifo.c
kmod.c
kprobes.c
ksysfs.c
kthread.c
latency.c
lockdep.c [PATCH] lockdep: fix possible races while disabling lock-debugging 2006-12-13 09:05:50 -08:00
lockdep_internals.h
lockdep_proc.c
module.c Driver core: show "initstate" of module 2006-12-13 15:38:45 -08:00
mutex-debug.c
mutex-debug.h
mutex.c
mutex.h
nsproxy.c [PATCH] Revert "[PATCH] identifier to nsproxy" 2006-12-13 09:05:47 -08:00
panic.c
params.c
pid.c
posix-cpu-timers.c
posix-timers.c
printk.c
profile.c
ptrace.c
rcupdate.c
rcutorture.c
relay.c [PATCH] Fix numerous kcalloc() calls, convert to kzalloc() 2006-12-13 09:05:52 -08:00
resource.c
rtmutex-debug.c
rtmutex-debug.h
rtmutex-tester.c
rtmutex.c
rtmutex.h
rtmutex_common.h
rwsem.c
sched.c [PATCH] lockdep: print irq-trace info on asserts 2006-12-13 09:05:50 -08:00
seccomp.c
signal.c [PATCH] PM: Fix freezing of stopped tasks 2006-12-13 09:05:49 -08:00
softirq.c
softlockup.c
spinlock.c
srcu.c
stacktrace.c
stop_machine.c
sys.c
sys_ni.c
sysctl.c [PATCH] debug: add sysrq_always_enabled boot option 2006-12-13 09:05:50 -08:00
taskstats.c
time.c
timer.c [PATCH] Optimize calc_load() 2006-12-13 09:05:55 -08:00
tsacct.c
uid16.c
user.c
utsname.c
wait.c
workqueue.c Make workqueue bit operations work on "atomic_long_t" 2006-12-16 09:53:50 -08:00