memblock: Make memblock functions handle overflowing range @size

Allow memblock users to specify range where @base + @size overflows
and automatically cap it at maximum.  This makes the interface more
robust and specifying till-the-end-of-memory easier.

Change-Id: Iad3e1ce69a11ac7d3e5490eec56baf8468bd134a
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Yinghai Lu <yinghai@kernel.org>
[ohaugan@codeaurora.org: Fix merge conflict in memblock_add_region]
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
1 file changed