diff options
author | James Hogan <james.hogan@imgtec.com> | 2013-02-20 13:59:13 +0000 |
---|---|---|
committer | James Hogan <james.hogan@imgtec.com> | 2013-03-02 20:11:17 +0000 |
commit | 2270e6d30bb6601ffd42e9d972442df0499ad547 (patch) | |
tree | c72e32a15d041cfe38560dca277f335da3f6e7cf /arch/metag/kernel/setup.c | |
parent | metag: cleanup metag_ksyms.c includes (diff) | |
download | linux-dev-2270e6d30bb6601ffd42e9d972442df0499ad547.tar.xz linux-dev-2270e6d30bb6601ffd42e9d972442df0499ad547.zip |
metag: copy devicetree to non-init memory
Make a copy of the device tree blob in non-init memory. It is required
when using built-in device tree files that the platform code copies the
blob to non-init memory prior to calling unflatten_device_tree(),
otherwise the strings that the device tree refer to will get poisoned
and potentially reused, breaking later reading of the device tree
post-init (such as compatible matching in modules, debugfs, and the
procfs interface).
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to '')
-rw-r--r-- | arch/metag/kernel/setup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/metag/kernel/setup.c b/arch/metag/kernel/setup.c index dd6c5ad73917..879246170aec 100644 --- a/arch/metag/kernel/setup.c +++ b/arch/metag/kernel/setup.c @@ -406,6 +406,8 @@ void __init setup_arch(char **cmdline_p) cpu_2_hwthread_id[smp_processor_id()] = hard_processor_id(); hwthread_id_2_cpu[hard_processor_id()] = smp_processor_id(); + /* Copy device tree blob into non-init memory before unflattening */ + copy_fdt(); unflatten_device_tree(); #ifdef CONFIG_SMP |