<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Device Tree Corrupted after unflatten_device_tree()</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">I use a board</FONT> <FONT FACE="Calibri">with MPC866T and 2.6.28 Linux Kernel.</FONT> <FONT FACE="Calibri"></FONT> <FONT FACE="Calibri">Occa</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">s</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">ionally</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">, the unflattened</FONT></SPAN><SPAN LANG="en-us"> <FONT FACE="Calibri">device is corrupted after</FONT></SPAN><SPAN LANG="en-us"> <FONT FACE="Calibri">“</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">unflatten_device_tree</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">()</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">”</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri"> which causes crash of kernel when device tree is traversed</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri"> later on.</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">I</FONT> <FONT FACE="Calibri">looked at the fixes in</FONT></SPAN><SPAN LANG="en-us"> <FONT FACE="Calibri">lib/lmb.c,</FONT><FONT FACE="Calibri"> arch/powerpc/mm, arch/powerpc/kernel etc since 2.6.28 to 2.6.32</FONT><FONT FACE="Calibri">-r4 (the most recent version) and</FONT></SPAN><SPAN LANG="en-us"> <FONT FACE="Calibri">could not fix my problem</FONT></SPAN><SPAN LANG="en-us">.</SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">I have had a hard time trying to determine the cause.</FONT></SPAN><SPAN LANG="en-us"> </SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">arch/powerpc/kernel/</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">setup_32.c</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">void __init setup_arch(char **cmdline_p)</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">{</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"> <FONT FACE="Calibri">*cmdline_p = cmd_line;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"> <FONT FACE="Calibri">/* so udelay does something sensible, assume <= 1000 bogomips */</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"> <FONT FACE="Calibri">loops_per_jiffy = 500000000 / HZ;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"> <FONT FACE="Calibri">unflatten_device_tree();</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"> <FONT FACE="Calibri">/*</FONT> <FONT FACE="Calibri">UNFLATTENED</FONT> <FONT FACE="Calibri">DEVICE TREE IS C</FONT><FONT FACE="Calibri">ORRUPTED SOMETIMES HERE */</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"> <FONT FACE="Calibri">check_for_initrd();</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri"> </FONT></SPAN><SPAN LANG="en-us"> <FONT FACE="Calibri">…</FONT><FONT FACE="Calibri">…</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us">}</SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">Any ideas?</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">Thanks.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">Lixin Yao</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">Harris Startex Networks Inc.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">RTP</FONT><FONT FACE="Calibri">, NC, USA</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
</BODY>
</HTML>