linux/arch
Jeremy Kerr f5ed0eb6fe powerpc/spufs: Use state_mutex for switch_log locking, and prevent multiple openers
Currently, we use ctx->mapping_lock and ctx->switch_log->lock for the
context switch log. The mapping lock only prevents concurrent open()s,
so we require the switch_lock->lock for reads.

Since writes to the switch log buffer occur on context switches, we're
better off synchronising with the state_mutex, which is held during a
switch. Since we're serialised througout the buffer reads and writes,
we can use the state mutex to protect open and release too, and
can now kfree() the log buffer on release. This allows us to perform
the switch log notify without taking any extra locks.

Because the buffer is only present while the file is open, we can use
it to prevent multiple simultaneous openers.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2008-10-21 11:13:19 +11:00
..
alpha Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-10-13 17:13:56 +01:00
arm i2c/isp1301_omap: Convert to a new-style i2c driver, part 2 2008-10-14 17:30:02 +02:00
avr32 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-10-13 17:13:56 +01:00
blackfin Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6 2008-10-13 10:08:43 -07:00
cris Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-10-13 17:13:56 +01:00
frv FRV: Wire up new system calls 2008-08-01 13:03:49 -07:00
h8300 Remove asm/a.out.h files for all architectures without a.out support. 2008-09-06 19:30:24 +01:00
ia64 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-10-13 17:13:56 +01:00
m32r Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-10-13 17:13:56 +01:00
m68k arch/m68k/mm/kmap.c: introduce missing kfree 2008-10-14 10:23:27 -07:00
m68knommu Remove asm/a.out.h files for all architectures without a.out support. 2008-09-06 19:30:24 +01:00
mips MIPS: Kill unused <asm/debug.h> inclusions 2008-10-15 12:46:52 +01:00
mn10300 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-10-13 17:13:56 +01:00
parisc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-10-13 17:13:56 +01:00
powerpc powerpc/spufs: Use state_mutex for switch_log locking, and prevent multiple openers 2008-10-21 11:13:19 +11:00
s390 vfs: Use const for kernel parser table 2008-10-13 10:10:37 -07:00
sh kernel/cpu.c: create a CPU_STARTING cpu_chain notifier 2008-09-08 19:25:24 +02:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2008-10-13 10:07:53 -07:00
sparc64 chmc: Mark %ver register inline asm with __volatile__ 2008-10-12 23:56:12 -07:00
um Merge git://git.infradead.org/users/dwmw2/random-2.6 2008-10-13 09:59:14 -07:00
x86 x86: register a platform RTC device if PNP doesn't describe it 2008-10-14 16:30:14 -07:00
xtensa xtensa: remove dead CONFIG_BLK_DEV_IDE code 2008-10-13 21:39:34 +02:00
.gitignore
Kconfig Merge branch 'linus' into oprofile-v2 2008-10-13 11:05:51 +02:00