forked from Minki/linux
54df2db36c
srmmu_nocache_bitmap is cleared by bit_map_init(). But bit_map_init() attempts to clear by memset(), so it can't clear the trailing edge of bitmap properly on big-endian architecture if the number of bits is not a multiple of BITS_PER_LONG. Actually, the number of bits in srmmu_nocache_bitmap is not always a multiple of BITS_PER_LONG. It is calculated as below: bitmap_bits = srmmu_nocache_size >> SRMMU_NOCACHE_BITMAP_SHIFT; srmmu_nocache_size is decided proportionally by the amount of system RAM and it is rounded to a multiple of PAGE_SIZE. SRMMU_NOCACHE_BITMAP_SHIFT is defined as (PAGE_SHIFT - 4). So it can only be said that bitmap_bits is a multiple of 16. This fixes the problem by using bitmap_clear() instead of memset() in bit_map_init() and this also uses BITS_TO_LONGS() to calculate correct size at bitmap allocation time. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: sparclinux@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net> |
||
---|---|---|
.. | ||
ashldi3.S | ||
ashrdi3.S | ||
atomic32.c | ||
atomic_64.S | ||
bitext.c | ||
bitops.S | ||
blockops.S | ||
bzero.S | ||
checksum_32.S | ||
checksum_64.S | ||
clear_page.S | ||
cmpdi2.c | ||
copy_in_user.S | ||
copy_page.S | ||
copy_user.S | ||
COPYING.LIB | ||
csum_copy_from_user.S | ||
csum_copy_to_user.S | ||
csum_copy.S | ||
divdi3.S | ||
ffs.S | ||
GENbzero.S | ||
GENcopy_from_user.S | ||
GENcopy_to_user.S | ||
GENmemcpy.S | ||
GENpage.S | ||
GENpatch.S | ||
hweight.S | ||
iomap.c | ||
ipcsum.S | ||
ksyms.c | ||
libgcc.h | ||
locks.S | ||
lshrdi3.S | ||
Makefile | ||
mcount.S | ||
memcmp.S | ||
memcpy.S | ||
memmove.S | ||
memscan_32.S | ||
memscan_64.S | ||
memset.S | ||
muldi3.S | ||
NG2copy_from_user.S | ||
NG2copy_to_user.S | ||
NG2memcpy.S | ||
NG2patch.S | ||
NG4clear_page.S | ||
NG4copy_from_user.S | ||
NG4copy_page.S | ||
NG4copy_to_user.S | ||
NG4memcpy.S | ||
NG4memset.S | ||
NG4patch.S | ||
NGbzero.S | ||
NGcopy_from_user.S | ||
NGcopy_to_user.S | ||
NGmemcpy.S | ||
NGpage.S | ||
NGpatch.S | ||
PeeCeeI.c | ||
strlen.S | ||
strncmp_32.S | ||
strncmp_64.S | ||
U1copy_from_user.S | ||
U1copy_to_user.S | ||
U1memcpy.S | ||
U3copy_from_user.S | ||
U3copy_to_user.S | ||
U3memcpy.S | ||
U3patch.S | ||
ucmpdi2.c | ||
udivdi3.S | ||
user_fixup.c | ||
usercopy.c | ||
VISsave.S | ||
xor.S |