function calls from identify_cpu()
kevdig at hypersurf.com
Sat May 3 15:45:26 EST 2008
Benjamin Herrenschmidt wrote:
> On Fri, 2008-05-02 at 13:42 -0700, Kevin Diggs wrote:
>>int __init iDoNothingUseful(struct cpu_spec *s,struct cpu_spec *t)
>> return s-t;
>>right before the definition of identify_cpu() in cputable.c and:
>>// (void) (*PTRRELOC(&iDoNothingUseful))(s,t);
>> (void) iDoNothingUseful(s,t);
>>right before the return s; in the match block and it will not boot? Can
>>someone please explain what might be going on?
> Why are you trying to muck around with that code in the first
> place ? :-)
> What are you trying to achieve ?
The original intent was to find a way to add some of the PLL parameters
(min and max core frequencies, min and max bus ratios - FX 400 - 800, 2
- 20; GX 500 - 1000, 2 - 20). Initially it seemed like the place to put
them. To avoid kernel bloat I think I'll just put them in the init
routine of the driver. I'll have to redo the cpu detection (FX vs GX);
but I guess that is not that big of a deal.
But now it is about retaining what is left of my sanity. I took the
above code and added it to a GigE running the same installation (the
8600 installation was created by installing its disk in the GigE) and it
ran fine!?! ANY suggestions would be greatly appreciated. Something to
do with BootX? BootX is to old (1.2.4)? System needs an exorcism? I
screwed up something in the 750GX cpu_spec entry?
Both are running 2.6.24.
P.S.: I would still appreciate it if someone could explain why this line:
*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
*PTRRELOC((&cur_cpu_spec) = PTRRELOC(&the_cpu_spec);
Is the address &the_cpu_spec valid later in the kernel initialization?
Is it ... valid now?
More information about the Linuxppc-dev