From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 1C37967C3D for ; Wed, 6 Dec 2006 08:21:45 +1100 (EST) Subject: Re: [POWERPC] fix cell pmu initialisation From: Benjamin Herrenschmidt To: Arnd Bergmann In-Reply-To: <200612051434.07917.arnd@arndb.de> References: <20061205155414.4afdcc77.sfr@canb.auug.org.au> <200612051434.07917.arnd@arndb.de> Content-Type: text/plain Date: Wed, 06 Dec 2006 07:07:51 +1100 Message-Id: <1165349272.29784.69.camel@localhost.localdomain> Mime-Version: 1.0 Cc: Stephen Rothwell , paulus@samba.org, ppc-dev List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > 1. export a method from cbe_regs.c to find out whether the pmd > regs are available and test that in cbe_init_pm_irq(). > 2. take you patch as is, with a comment hinting to fix it up > when needed. > 3. change cbe_init_pm_irq to be called explicitly from cbe_regs_init(), > which already scans the device tree correctly. cbe_regs_init() is called from setup_arch(), which is _very_ early. cbe_init_pm_irq() must be called much later as it requests irqs. Right now, we should stick to the machine_is() solution. We'll look into doing something better eventually when the need occurs. Ben.