* function calls from identify_cpu()
@ 2008-05-02 20:42 Kevin Diggs
2008-05-02 23:29 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Diggs @ 2008-05-02 20:42 UTC (permalink / raw)
To: linuxppc-dev
I added:
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?
Thanks!
kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: function calls from identify_cpu()
2008-05-02 20:42 function calls from identify_cpu() Kevin Diggs
@ 2008-05-02 23:29 ` Benjamin Herrenschmidt
2008-05-03 5:45 ` Kevin Diggs
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2008-05-02 23:29 UTC (permalink / raw)
To: Kevin Diggs; +Cc: linuxppc-dev
On Fri, 2008-05-02 at 13:42 -0700, Kevin Diggs wrote:
> I added:
>
> 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 ?
Cheers,
Ben.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: function calls from identify_cpu()
2008-05-02 23:29 ` Benjamin Herrenschmidt
@ 2008-05-03 5:45 ` Kevin Diggs
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Diggs @ 2008-05-03 5:45 UTC (permalink / raw)
To: linuxppc-dev
Benjamin Herrenschmidt wrote:
> On Fri, 2008-05-02 at 13:42 -0700, Kevin Diggs wrote:
>
>>I added:
>>
>>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 ?
>
> Cheers,
> Ben.
>
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.
kevin
P.S.: I would still appreciate it if someone could explain why this line:
*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
isn't:
*PTRRELOC((&cur_cpu_spec) = PTRRELOC(&the_cpu_spec);
Is the address &the_cpu_spec valid later in the kernel initialization?
Is it ... valid now?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-03 4:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-02 20:42 function calls from identify_cpu() Kevin Diggs
2008-05-02 23:29 ` Benjamin Herrenschmidt
2008-05-03 5:45 ` Kevin Diggs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).