From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from az33egw01.freescale.net (az33egw01.freescale.net [192.88.158.102]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "az33egw01.freescale.net", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTP id 256DEDDE43 for ; Wed, 16 May 2007 03:49:54 +1000 (EST) Date: Tue, 15 May 2007 12:49:34 -0500 From: Scott Wood To: Paul Mackerras , "Mark A. Greer" , linuxppc-dev@ozlabs.org Subject: Re: Fix bug adding properties with flatdevtree.c's ft_set_prop() Message-ID: <20070515174934.GA22623@ld0162-tx32.am.freescale.net> References: <20070514031357.GM6517@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20070514031357.GM6517@localhost.localdomain> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, May 14, 2007 at 01:13:57PM +1000, David Gibson wrote: > ft_set_prop() from flatdevtree.c in the zImage wrapper will either > replace an existing property in the flat device tree, or add a new > property definiion if the given property isn't present. > > However, when adding properties, it adds the property definition > immediately before the node's END_NODE tag, potentially after any > subnode definitions for the node. This confuses the kernel flat tree > parser in prom.c which assumes that all property definitions for a > node come before all subnode definitions. > > This patch corrects ft_set_prop() so that it adds new properties > before the first subnode, instead of before the END_NODE tag. > > Signed-off-by: David Gibson Acked-by: Scott Wood -Scott