Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753035AbXHNHvX (ORCPT ); Tue, 14 Aug 2007 03:51:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753211AbXHNHql (ORCPT ); Tue, 14 Aug 2007 03:46:41 -0400 Received: from canuck.infradead.org ([209.217.80.40]:55403 "EHLO canuck.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752769AbXHNHqS (ORCPT ); Tue, 14 Aug 2007 03:46:18 -0400 Date: Tue, 14 Aug 2007 00:29:12 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Benjamin Herrenschmidt , Paul Mackerras , Kumar Gala , Rutger Nijlunsing , Kim Phillips Subject: [patch 05/12] PPC: Revert "Dont complain if size-cells == 0 in prom_parse()" Message-ID: <20070814072912.GF15025@kroah.com> References: <20070814072244.882283903@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="ppc-revert-don-t-complain-if-size-cells-0-in-prom_parse.patch" In-Reply-To: <20070814072813.GA15025@kroah.com> User-Agent: Mutt/1.5.15 (2007-04-06) X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1703 Lines: 49 -stable review patch. If anyone has any objections, please let us know. ------------------ From: Paul Mackerras This reverts commit fd6e9d3945ee122eb513ada8b17296d243c1ce5e. Having #size-cells == 0 in a node indicates that things under the node aren't directly accessible, and therefore we shouldn't try to translate addresses for devices under the node into CPU physical addresses. Some drivers, such as the nvram driver for powermacs, rely on of_address_to_resource failing if they are called for a node representing a device whose resources aren't directly accessible by the CPU. These drivers were broken by commit fd6e9d39, resulting in the "Lombard" powerbook hanging early in the boot process. stable team, this patch is equivalent to commit 77926826f301fbd8ed96d3cd9ff17a5b59560dfb Signed-off-by: Paul Mackerras Cc: Kim Phillips Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/prom_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c @@ -24,7 +24,7 @@ /* Max address size we deal with */ #define OF_MAX_ADDR_CELLS 4 #define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \ - (ns) >= 0) + (ns) > 0) static struct of_bus *of_match_bus(struct device_node *np); static int __of_address_to_resource(struct device_node *dev, -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/