]> git.baikalelectronics.ru Git - kernel.git/commit
lmb: Fix reserved region handling in lmb_enforce_memory_limit().
authorDavid S. Miller <davem@davemloft.net>
Sat, 16 Aug 2008 02:57:57 +0000 (19:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Aug 2008 02:57:57 +0000 (19:57 -0700)
commit5d5985b2c799d5421e33b84262a2bf16333e14b5
tree5c63654338f2caf0b9dc41281b7b6a7b39ea5577
parent1f2ee626e59e91995235a04b4a19279659cfa6e5
lmb: Fix reserved region handling in lmb_enforce_memory_limit().

The idea of the implementation of this fix is from Michael Ellerman.

This function has two loops, but they each interpret the memory_limit
value differently.  The first loop interprets it as a "size limit"
whereas the second loop interprets it as an "address limit".

Before the second loop runs, reset memory_limit to lmb_end_of_DRAM()
so that it all works out.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
lib/lmb.c