summaryrefslogtreecommitdiff
path: root/arch/powerpc/mm/init_64.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-24 04:41:48 (GMT)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-24 04:41:48 (GMT)
commit529b7307d804f649839b5b65b303442140266d26 (patch)
tree1fb7edf7770e27d1e596a1d0aa2a64c1b986938d /arch/powerpc/mm/init_64.c
parentb1515af2911c4339ed34865a0594f4ad3392921a (diff)
downloadlinux-fsl-qoriq-529b7307d804f649839b5b65b303442140266d26.tar.xz
powerpc: Make rwsem use "long" type
This makes the 64-bit kernel use 64-bit signed integers for the counter (effectively supporting 32-bit of active count in the semaphore), thus avoiding things like overflow of the mmap_sem if you use a really crazy number of threads Note: Ideally the type in the structure should be atomic_long_t rather than "long". However, there's some nasty issues with that. It needs to be initialized statically -and- lib/rwsem.c does things like sem->count = RWSEM_UNLOCKED_VALUE; Now, if you mix in the fact that atomic_* types are actually structures with one member and note typedefs of a scalar, it makes its really nasty. So I stuck to what we did before using a long and casts for now. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm/init_64.c')
0 files changed, 0 insertions, 0 deletions