From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: In-Reply-To: <20070920175558.GA3191@ru.mvista.com> References: <20070920175558.GA3191@ru.mvista.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <3C1A509F-D243-4465-BDB1-25B6437CA04F@kernel.crashing.org> From: Kumar Gala Subject: Re: [PATCH] PowerPC: add setup_cpu for 44x for processor-specific init Date: Thu, 20 Sep 2007 13:54:00 -0500 To: Valentine Barshak Cc: linuxppc-dev@ozlabs.org, miltonm@bga.com, david@gibson.dropbear.id.au List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > diff -ruN linux-2.6.orig/arch/powerpc/kernel/cputable.c linux-2.6/ > arch/powerpc/kernel/cputable.c > --- linux-2.6.orig/arch/powerpc/kernel/cputable.c 2007-09-20 > 19:30:47.000000000 +0400 > +++ linux-2.6/arch/powerpc/kernel/cputable.c 2007-09-20 > 21:27:35.000000000 +0400 [snip] > @@ -1318,18 +1327,14 @@ > > for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) > if ((pvr & s->pvr_mask) == s->pvr_value) { > + cpu_setup_t setup_func = PTRRELOC(s->cpu_setup); > + > *cur = cpu_specs + i; > -#ifdef CONFIG_PPC64 > - /* ppc64 expects identify_cpu to also call setup_cpu > - * for that processor. I will consolidate that at a > - * later time, for now, just use our friend #ifdef. > - * we also don't need to PTRRELOC the function pointer > - * on ppc64 as we are running at 0 in real mode. > + /* ppc expects identify_cpu to also call setup_cpu > + * for that processor. > */ > - if (s->cpu_setup) { > - s->cpu_setup(offset, s); > - } > -#endif /* CONFIG_PPC64 */ > + if (setup_func) > + setup_func(offset, s); > return s; > } This should just be something like: #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE) if (s->cpu_setup) ... #endif we know reloc_offset is always 0 in book-e, plus fixup the comment. - k