diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-22 10:43:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-22 10:43:47 -0700 |
commit | 8351fcfe4f496f5f10f8ac340ddd8914eb04be7e (patch) | |
tree | 1231246f66cadc9426391c752befe8736e5cc8f8 /drivers | |
parent | ee7075d45f57f90a42e61e016562ce8065668201 (diff) | |
parent | 9e40127526e857fa3f29d51e83277204fbdfc6ba (diff) |
Merge tag 'devicetree-fixes-for-3.11' of git://sources.calxeda.com/kernel/linux
Pull device tree fix from Rob Herring:
"For DT unflattening, add missing memory initialization.
This is needed for arches like PPC that use memblock_alloc. This
appears to have been an issue for some time, but is a somewhat limited
usecase of OF_DYNAMIC"
* tag 'devicetree-fixes-for-3.11' of git://sources.calxeda.com/kernel/linux:
of: fdt: fix memory initialization for expanded DT
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/of/fdt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 6bb7cf2de55..b10ba00cc3e 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -392,6 +392,8 @@ static void __unflatten_device_tree(struct boot_param_header *blob, mem = (unsigned long) dt_alloc(size + 4, __alignof__(struct device_node)); + memset((void *)mem, 0, size); + ((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef); pr_debug(" unflattening %lx...\n", mem); |