]> err.no Git - linux-2.6/commit
[PATCH] powerpc: Don't allocate zero bytes in finish_device_tree()
authorMichael Ellerman <michael@ellerman.id.au>
Wed, 25 Jan 2006 08:31:25 +0000 (21:31 +1300)
committerPaul Mackerras <paulus@samba.org>
Tue, 7 Feb 2006 10:28:38 +0000 (21:28 +1100)
commitfa93895329b87112cb1fd784db969e60b5b46af6
treeed6d137b47ebcae1de85a21dc387b452fe728163
parent3ea4807de7b2c5c903380ba2c2e7150bee942f42
[PATCH] powerpc: Don't allocate zero bytes in finish_device_tree()

In prom.c we run finish_node() on allnodes twice. The first time we just
calculate how much memory we'll need, the second time we do the actual work.

If the calculation stage determines that we need 0 bytes, then we should skip
the lmb allocation. Although an alloc of zero will work, it has been seen to
lead to a BUG_ON() in reserve_bootmem() on at least one machine.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/prom.c