]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] m68knommu: fix find_next_zero_bit in bitops.h
authorGreg Ungerer <gerg@snapgear.com>
Tue, 10 Jan 2006 07:00:39 +0000 (17:00 +1000)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 10 Jan 2006 17:31:27 +0000 (09:31 -0800)
commit81dd0c40f5efaeea3ee519345b251557c4c4e54a
treebfd8766845324c6da4be7886907865c451addf26
parent8611627132656279e54457ec91e568fc6e7fbe6e
[PATCH] m68knommu: fix find_next_zero_bit in bitops.h

We're starting a number of big applications (memory footprint app.
1MByte) on our Arcturus uC5272.  Therefore memory fragmentation is a
real pain for us.  We've switched to uClinux-2.4.27-uc1 and found that
page_alloc2 fragments the memory heavily.

Digging into it we found a bug in the find_next_zero_bit function in the
m68knommu/bitops.h file.  if the size isn't a multiple of 32 than the
upper bits of the last word to be searched should be masked.  But the
functions masks the lower bits of the last word because it uses a right
shift instead of a left shift operator.

Patch submitted by Sascha Smejkal <s.smejkal@centersystems.at>

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-m68knommu/bitops.h