diff options
| -rw-r--r-- | drivers/of/of_reserved_mem.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index ed01c0172e4a..ed7e681efcf0 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c | |||
| @@ -127,7 +127,10 @@ static int __init __reserved_mem_alloc_size(unsigned long node, | |||
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | /* Need adjust the alignment to satisfy the CMA requirement */ | 129 | /* Need adjust the alignment to satisfy the CMA requirement */ |
| 130 | if (IS_ENABLED(CONFIG_CMA) && of_flat_dt_is_compatible(node, "shared-dma-pool")) | 130 | if (IS_ENABLED(CONFIG_CMA) |
| 131 | && of_flat_dt_is_compatible(node, "shared-dma-pool") | ||
| 132 | && of_get_flat_dt_prop(node, "reusable", NULL) | ||
| 133 | && !of_get_flat_dt_prop(node, "no-map", NULL)) | ||
| 131 | align = max(align, (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order)); | 134 | align = max(align, (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order)); |
| 132 | 135 | ||
| 133 | prop = of_get_flat_dt_prop(node, "alloc-ranges", &len); | 136 | prop = of_get_flat_dt_prop(node, "alloc-ranges", &len); |
