linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Diggs <kevdig@hypersurf.com>
To: linuxppc-dev@ozlabs.org
Subject: Re: function calls from identify_cpu()
Date: Fri, 02 May 2008 22:45:26 -0700	[thread overview]
Message-ID: <481BFBF6.9060700@hypersurf.com> (raw)
In-Reply-To: <1209770980.26383.18.camel@pasglop>

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?

      reply	other threads:[~2008-05-03  4:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=481BFBF6.9060700@hypersurf.com \
    --to=kevdig@hypersurf.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).