mm: cma: fix alignment requirements for contiguous regions

Contiguous Memory Allocator requires each of its regions to be aligned
in such a way that it is possible to change migration type for all
pageblocks holding it and then isolate page of largest possible order from
the buddy allocator (which is MAX_ORDER-1). This patch relaxes alignment
requirements by one order, because MAX_ORDER alignment is not really
needed.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
(cherry picked from commit 7ce9bf1f4785dab0598a19a7fcb0733a18193e4e)
drivers: dma-contiguous: refactor dma_alloc_from_contiguous()

The dma_alloc_from_contiguous() function returns either a valid pointer
to a page structure or NULL, the error code set when pageno >= cma->count
is not used at all and can be safely removed.

This commit also changes the function to avoid goto and have only one exit
path and one place where mutex is unlocked.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
[fixed compilation break caused by missing semicolon]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

(cherry picked from commit bdd43cb39f1b1e897c5d7992d05d0b9f0dd786d1)

Conflicts:
	drivers/base/dma-contiguous.c
cma: support region allocation by base

That's a shitty backport from upstream 5ea3b1b2f ("cma: add placement
specifier for "cma=" kernel parameter"), only supported are the exact
mappings (or fixed, memblock_alloc_range() is still not there, and it's a
long road to backport all the mm stuff).

So, only "1G@1G" or "1G@1G-2G" is supported, the "floating" one like
"1G@1G-3G" isn't supported, and you'll get a random base address.

Signed-off-by: Veaceslav Falico <vfalico@gmail.com>