aboutsummaryrefslogtreecommitdiff
path: root/kernel/audit.h
diff options
context:
space:
mode:
authorLinus Torvalds2006-12-16 09:53:50 -0800
committerLinus Torvalds2006-12-16 09:53:50 -0800
commita08727bae727fc2ca3a6ee9506d77786b71070b3 (patch)
treeb1b42acea520c7738fc2e62476221a049f195f87 /kernel/audit.h
parent2f77d107050abc14bc393b34bdb7b91cf670c250 (diff)
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 4594bf159f1962cec3b727954b7c598b07e2e737) 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>
Diffstat (limited to 'kernel/audit.h')
0 files changed, 0 insertions, 0 deletions