Received: from eggs.gnu.org ([140.186.70.92]:37778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R42s0-0005Nz-9Y for qemu-devel@nongnu.org; Wed, 14 Sep 2011 23:44:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R42rw-00059B-Sf for qemu-devel@nongnu.org; Wed, 14 Sep 2011 23:44:12 -0400 Date: Thu, 15 Sep 2011 13:19:32 +1000 From: David Gibson Message-ID: <20110915031932.GU9025@yookeroo.fritz.box> References: <1315989802-18753-1-git-send-email-agraf@suse.de> <1315989802-18753-29-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1315989802-18753-29-git-send-email-agraf@suse.de> Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 28/58] device tree: give dt more size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-ppc@nongnu.org, qemu-devel Developers On Wed, Sep 14, 2011 at 10:42:52AM +0200, Alexander Graf wrote: > We currently load a device tree blob and then just take its size x2 to > account for modifications we do inside. While this is nice and great, > it fails when we have a small device tree as blob and lots of nodes added > in machine init code. > > So for now, just make it 20k bigger than it was before. We maybe want to > be more clever about this later. In fact, one of the few things I can think of that might justify qemu's "abstraction" of the libfdt interface, is that the wrappers could be modified to detect -FDT_ERR_NOSPACE and realloc() appropriately. Otherwise the wrappers, which are limited and not notably simpler to use than the raw libfdt functions seem pretty pointless to me. Not that I'm biased as the author of libfdt or anything :). -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson