powerpc: Handle both new style and old style reserve maps
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 1 Jul 2013 22:13:52 +0000 (08:13 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 1 Jul 2013 22:20:49 +0000 (08:20 +1000)
commitc039e3a8ddd52139d0f81711ecd757772f868b22
tree4ea9107e32db9a648aa0c3b1750672355ad7eb87
parente2a800beaca1f580945773e57d1a0e7cd37b1056
powerpc: Handle both new style and old style reserve maps

When Jeremy introduced the new device-tree based reserve map, he made
the code in early_reserve_mem_dt() bail out if it found one, thus not
reserving the initrd nor processing the old style map.

I hit problems with variants of kexec that didn't put the initrd in
the new style map either. While these could/will be fixed, I believe
we should be safe here and rather reserve more than not enough.

We could have a firmware passing stuff via the new style map, and
in the middle, a kexec that knows nothing about it and adding other
things to the old style map.

I don't see a big issue with processing both and reserving everything
that needs to be. memblock_reserve() supports overlaps fine these days.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/prom.c