Zubair Lutfullah Kakakhel 30fa0530ff MIPS: CMA: Do not reserve memory if not required
Even if CMA is disabled, the for_each_memblock macro expands
to run reserve_bootmem once. Hence, reserve_bootmem attempts to
reserve location 0 of size 0.

Add a check to avoid that.

Issue was highlighted during testing with EVA enabled.
resrve_bootmem used to exit gracefully when passed arguments to
reserve 0 size location at 0 without EVA.

But with EVA enabled, macros would point to different addresses
and the code would trigger a BUG.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Tested-by: Markos Chandras <markos.chandras@imgtec.com>
Tested-by: Huacai Chen <chenhc@lemote.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8231/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-10-29 02:59:25 +01:00
..
2013-02-01 10:00:22 +01:00
2013-02-01 10:00:22 +01:00
2013-02-01 10:00:22 +01:00
2013-02-01 10:00:22 +01:00
2013-02-01 10:00:22 +01:00
2014-05-24 00:07:01 +02:00
2014-05-24 00:07:01 +02:00
2014-05-24 00:07:01 +02:00
2011-12-07 22:03:45 +00:00
2014-05-24 00:07:01 +02:00
2013-02-01 10:00:22 +01:00
2013-02-01 10:00:22 +01:00
2013-02-01 10:00:22 +01:00
2014-08-26 13:45:51 -04:00
2014-05-30 21:01:09 +02:00
2014-05-24 00:07:01 +02:00
2014-05-24 00:07:01 +02:00
2013-02-01 10:00:22 +01:00
2014-05-02 16:39:10 +01:00
2014-08-02 00:06:37 +02:00
2013-02-01 10:00:22 +01:00
2014-01-22 20:19:02 +01:00
2014-10-27 03:37:42 +01:00
2014-10-27 03:37:42 +01:00
2014-10-27 03:37:42 +01:00
2014-10-27 03:37:42 +01:00
2014-08-06 13:04:30 +02:00
2014-08-06 13:04:30 +02:00
2014-08-06 13:04:30 +02:00
2014-08-26 13:45:51 -04:00
2014-05-24 00:07:01 +02:00
2014-05-24 00:07:01 +02:00
2009-06-24 18:34:40 +01:00
2012-03-23 16:58:42 -07:00
2014-05-24 00:07:01 +02:00