diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-12 06:54:05 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-12 06:54:05 +0300 |
commit | b4a237598aa740562f842db76d97465c44fb74c1 (patch) | |
tree | cadb4228d51a984360b4b3fdd7534731e2211f11 /drivers | |
parent | c970872e59e46774d508777291b2f90910ab695b (diff) | |
parent | b1d06b60e90cd5016798b9984f8e420e753f4846 (diff) | |
download | linux-b4a237598aa740562f842db76d97465c44fb74c1.tar.xz |
Merge tag 'devicetree-fixes-for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree fixes from Rob Herring:
- Add empty of_translate_address needed for HiSilicon network driver.
- Fix alignment requirements for CMA regions in DT.
- Fix booting on PPC systems which can't do WARN() early.
- Rename ak4554 binding doc from .c to .txt.
* tag 'devicetree-fixes-for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
of: Provide static inline function for of_translate_address if needed
drivers: of: of_reserved_mem: fixup the alignment with CMA setup
of: Print rather than WARN'ing when overlap check fails
dt-bindings: ak4554: extension should be .txt
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/of/of_reserved_mem.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 62f467b8ccae..be77e75c587d 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -124,6 +124,10 @@ static int __init __reserved_mem_alloc_size(unsigned long node, align = dt_mem_next_cell(dt_root_addr_cells, &prop); } + /* 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)); + prop = of_get_flat_dt_prop(node, "alloc-ranges", &len); if (prop) { @@ -226,10 +230,9 @@ static void __init __rmem_check_for_overlap(void) this_end = this->base + this->size; next_end = next->base + next->size; - WARN(1, - "Reserved memory: OVERLAP DETECTED!\n%s (%pa--%pa) overlaps with %s (%pa--%pa)\n", - this->name, &this->base, &this_end, - next->name, &next->base, &next_end); + pr_err("Reserved memory: OVERLAP DETECTED!\n%s (%pa--%pa) overlaps with %s (%pa--%pa)\n", + this->name, &this->base, &this_end, + next->name, &next->base, &next_end); } } } |