public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Valentine Barshak <vbarshak@ru•mvista.com>
To: Kumar Gala <galak@kernel•crashing.org>
Cc: linuxppc-dev@ozlabs•org, miltonm@bga•com, david@gibson•dropbear.id.au
Subject: Re: [PATCH] PowerPC: add setup_cpu for 44x for processor-specific init
Date: Thu, 20 Sep 2007 22:55:19 +0400	[thread overview]
Message-ID: <46F2C217.2000207@ru.mvista.com> (raw)
In-Reply-To: <3C1A509F-D243-4465-BDB1-25B6437CA04F@kernel.crashing.org>

Kumar Gala wrote:
> 
>> 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

OK,
thanks,
Valentine.

> 
> 
> 

  reply	other threads:[~2007-09-20 18:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-19 18:39 Sequoia kernel crash workaround Valentine Barshak
2007-09-19 19:12 ` Josh Boyer
2007-09-19 19:19 ` Stefan Roese
2007-09-19 19:30   ` Olof Johansson
2007-09-19 20:08     ` Josh Boyer
2007-09-20 16:56       ` Valentine Barshak
2007-09-20 17:25         ` Olof Johansson
2007-09-20 17:29           ` Josh Boyer
2007-09-23  8:21             ` Benjamin Herrenschmidt
2007-09-24 10:35               ` Valentine Barshak
2007-09-24 20:55                 ` Benjamin Herrenschmidt
2007-09-24 21:01                   ` Josh Boyer
2007-09-20 18:03           ` Olof Johansson
2007-09-20 17:32         ` Milton Miller
2007-09-20 17:55           ` [PATCH] PowerPC: add setup_cpu for 44x for processor-specific init Valentine Barshak
2007-09-20 18:13             ` Josh Boyer
2007-09-20 18:15               ` Valentine Barshak
2007-09-20 18:54             ` Kumar Gala
2007-09-20 18:55               ` Valentine Barshak [this message]
2007-09-21  1:34             ` Paul Mackerras
2007-09-20 18:02           ` Sequoia kernel crash workaround Josh Boyer
2007-09-20 18:13             ` Valentine Barshak

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=46F2C217.2000207@ru.mvista.com \
    --to=vbarshak@ru$(echo .)mvista.com \
    --cc=david@gibson$(echo .)dropbear.id.au \
    --cc=galak@kernel$(echo .)crashing.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=miltonm@bga$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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