From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1iQI-0003rf-Vv for qemu-devel@nongnu.org; Tue, 23 Jul 2013 15:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1iQG-0004Bw-9Z for qemu-devel@nongnu.org; Tue, 23 Jul 2013 15:39:02 -0400 Date: Tue, 23 Jul 2013 14:38:48 -0500 From: Scott Wood References: <1374506897-41089-1-git-send-email-agraf@suse.de> In-Reply-To: <1374506897-41089-1-git-send-email-agraf@suse.de> (from agraf@suse.de on Mon Jul 22 10:28:17 2013) Message-ID: <1374608328.15592.36@snotra> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] PPC: E500: Generate device tree on reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: "qemu-ppc@nongnu.org list:PowerPC" , qemu-devel Developers On 07/22/2013 10:28:17 AM, Alexander Graf wrote: > Today we generate the device tree once on machine initialization and =20 > then > store the finalized blob in memory to reload it on reset. >=20 > This is bad for 2 reasons. First we potentially waste a bunch of RAM =20 > for no > good reason, as we have all information required to regenerate the =20 > device > tree available anyways. >=20 > The second reason is even more important. On machine init when we =20 > generate > the device tree for the first time, we don't have all of the devices =20 > fully > initialized yet. But the device tree needs to potentially walk =20 > devices to > put information about them into the device tree. If you can't produce the entire device tree at init time, how can you =20 calculate its size with a dry run? Device trees are generally pretty small; couldn't we just set a maximum =20 size and allocate that much space? -Scott=