linux/include
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
..
acpi [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
asm-alpha [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-arm Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2006-12-13 15:58:32 -08:00
asm-arm26 [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-avr32 [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-cris [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-frv [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-generic Remove stack unwinder for now 2006-12-15 08:47:51 -08:00
asm-h8300 [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-i386 Remove stack unwinder for now 2006-12-15 08:47:51 -08:00
asm-ia64 Merge branch 'release' of master.kernel.org:/home/ftp/pub/scm/linux/kernel/git/aegl/linux-2.6 2006-12-13 15:57:58 -08:00
asm-m32r [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-m68k [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-m68knommu [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-mips [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-parisc [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-powerpc [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-ppc Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc 2006-12-11 16:31:42 +11:00
asm-s390 [S390] Fix reboot hang on LPARs 2006-12-15 17:18:22 +01:00
asm-sh [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-sh64 [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-sparc [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-sparc64 [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-um [PATCH] UML: add generic BUG support 2006-12-08 08:28:39 -08:00
asm-v850 [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
asm-x86_64 Remove stack unwinder for now 2006-12-15 08:47:51 -08:00
asm-xtensa [PATCH] Optimize D-cache alias handling on fork 2006-12-13 09:27:08 -08:00
crypto [CRYPTO] lib: table driven multiplications in GF(2^128) 2006-12-06 18:38:55 -08:00
keys
linux Make workqueue bit operations work on "atomic_long_t" 2006-12-16 09:53:50 -08:00
math-emu
media V4L/DVB (4935): Added the capability of selecting fm gain by tuner 2006-12-10 09:05:52 -02:00
mtd
net [IPV6]: Make fib6_node subtree depend on IPV6_SUBTREES 2006-12-13 16:48:31 -08:00
pcmcia [PATCH] pcmcia: multifunction card handling fixes 2006-12-04 20:09:15 -05:00
rdma [PATCH] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros 2006-12-13 19:47:13 -08:00
rxrpc
scsi [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
sound Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-12-05 17:01:28 +00:00
video [PATCH] sstfb: add sysfs interface 2006-12-13 09:05:55 -08:00
Kbuild