diff options
| author | Dmitry Shmidt <dimitrysh@google.com> | 2016-11-15 17:02:38 -0800 |
|---|---|---|
| committer | Dmitry Shmidt <dimitrysh@google.com> | 2016-11-15 17:02:38 -0800 |
| commit | 324e88de4aba3b6d4e0453fb2adb094e4a53754c (patch) | |
| tree | f961e8c1eb2bcdefec062e0b86d4b5f307caee1e /drivers/of | |
| parent | 93e3336909d88c3afca7ccdc8b009c435f37a70a (diff) | |
| parent | 4dab3e4df9944782cb3c229bd37f5ea8b5f52bac (diff) | |
Merge tag 'v4.4.32' into android-4.4.y
This is the 4.4.32 stable release
Change-Id: I5028402eadfcf055ac44a5e67abc6da75b2068b3
Diffstat (limited to 'drivers/of')
| -rw-r--r-- | drivers/of/of_reserved_mem.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index ed01c0172e4a..07dd81586c52 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -127,8 +127,12 @@ static int __init __reserved_mem_alloc_size(unsigned long node, } /* Need adjust the alignment to satisfy the CMA requirement */ - if (IS_ENABLED(CONFIG_CMA) && of_flat_dt_is_compatible(node, "shared-dma-pool")) - align = max(align, (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order)); + if (IS_ENABLED(CONFIG_CMA) && of_flat_dt_is_compatible(node, "shared-dma-pool")) { + unsigned long order = + max_t(unsigned long, MAX_ORDER - 1, pageblock_order); + + align = max(align, (phys_addr_t)PAGE_SIZE << order); + } prop = of_get_flat_dt_prop(node, "alloc-ranges", &len); if (prop) { |
