summaryrefslogtreecommitdiff
path: root/arch/arc/kernel/setup.c
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-02-21 12:07:06 (GMT)
committerVineet Gupta <vgupta@synopsys.com>2013-02-26 08:55:18 (GMT)
commiteab6a08c082b82dff884eb49a2229b0474d0b7e5 (patch)
tree4acffa75b89ecdef8d4f38558155b0afdd2fbe19 /arch/arc/kernel/setup.c
parentfc32781bfdb56dad883469b65e468e749ef35fe5 (diff)
downloadlinux-fsl-qoriq-eab6a08c082b82dff884eb49a2229b0474d0b7e5.tar.xz
ARC: make a copy of flat DT
The flat DT (currently embedded in vmlinux) is in .init section. The unflattened/binary tree doesn't copy strings through and references them from orig flat DT - which could cause catestrohpy if of_* APIs are called post init, say from a driver which is a loadable module. Reported-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/setup.c')
-rw-r--r--arch/arc/kernel/setup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
index e591c6a..dc0f968 100644
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -354,6 +354,8 @@ void __init setup_arch(char **cmdline_p)
setup_arch_memory();
+ /* copy flat DT out of .init and then unflatten it */
+ copy_devtree();
unflatten_device_tree();
/* Can be issue if someone passes cmd line arg "ro"