summaryrefslogtreecommitdiffstats
path: root/drivers/of/fdt.c
diff options
context:
space:
mode:
authorAl Cooper <alcooperx@gmail.com>2014-08-06 22:30:04 +0200
committerGrant Likely <grant.likely@linaro.org>2014-08-16 10:02:52 +0200
commitb5f2a8c02697c3685ccbbb66495465742ffa0dc1 (patch)
tree4f9e991bbfc38faf4c4ae2afcd36582494309840 /drivers/of/fdt.c
parentMerge tag 'pm+acpi-3.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadlinux-b5f2a8c02697c3685ccbbb66495465742ffa0dc1.tar.xz
linux-b5f2a8c02697c3685ccbbb66495465742ffa0dc1.zip
of: Allow mem_reserve of memory with a base address of zero
__reserved_mem_reserve_reg() won't reserve memory if the base address is zero. This change removes the check for a base address of zero and allows it to be reserved. Allowing the first 4K of memory to be reserved will help solve a problem on some ARM systems where the the first 16K of memory is unused and becomes allocable memory. This will prevent this memory from being used for DMA by drivers like the USB OHCI driver which consider a physical address of zero to be illegal. Cc: stable@vger.kernel.org # 3.15+ Signed-off-by: Al Cooper <alcooperx@gmail.com> Signed-off-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r--drivers/of/fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index f46a24ffa3fe..79cb8313c7d8 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -453,7 +453,7 @@ static int __init __reserved_mem_reserve_reg(unsigned long node,
base = dt_mem_next_cell(dt_root_addr_cells, &prop);
size = dt_mem_next_cell(dt_root_size_cells, &prop);
- if (base && size &&
+ if (size &&
early_init_dt_reserve_memory_arch(base, size, nomap) == 0)
pr_debug("Reserved memory: reserved region for node '%s': base %pa, size %ld MiB\n",
uname, &base, (unsigned long)size / SZ_1M);