From: Michael Ellerman <michael@ellerman.id.au>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] powerpc: fixup lwsync at runtime
Date: Wed, 02 Jul 2008 19:34:08 +1000 [thread overview]
Message-ID: <1214991248.7436.5.camel@localhost> (raw)
In-Reply-To: <DBD7C7F7-1EBB-4D73-88A0-72D079E800DB@kernel.crashing.org>
[-- Attachment #1: Type: text/plain, Size: 2001 bytes --]
On Tue, 2008-07-01 at 09:48 -0500, Kumar Gala wrote:
> On Jul 1, 2008, at 1:29 AM, Michael Ellerman wrote:
> >> diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/
> >> setup_32.c
> >> index 9e83add..0109e7f 100644
> >> --- a/arch/powerpc/kernel/setup_32.c
> >> +++ b/arch/powerpc/kernel/setup_32.c
> >> @@ -101,6 +101,10 @@ unsigned long __init early_init(unsigned long
> >> dt_ptr)
> >> PTRRELOC(&__start___ftr_fixup),
> >> PTRRELOC(&__stop___ftr_fixup));
> >>
> >> + do_lwsync_fixups(spec->cpu_features,
> >> + PTRRELOC(&__start___lwsync_fixup),
> >> + PTRRELOC(&__stop___lwsync_fixup));
> >> +
> >
> > This could be changed to use cur_cpu_spec->cpu_features, and then all
> > the call sites would be passing that, which would mean
> > do_lwsync_fixups() could just check cur_cpu_spec->cpu_features
> > directly.
>
> cur_cpu_spec and spec at this point arent the same thing.
Aren't they? I must be missing something:
struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
{
struct cpu_spec *s = cpu_specs;
struct cpu_spec *t = &the_cpu_spec;
int i;
for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
if ((pvr & s->pvr_mask) == s->pvr_value) {
...
*t = *s;
*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
...
return s;
then:
unsigned long __init early_init(unsigned long dt_ptr)
{
...
spec = identify_cpu(offset, mfspr(SPRN_PVR));
do_feature_fixups(spec->cpu_features,
PTRRELOC(&__start___ftr_fixup),
PTRRELOC(&__stop___ftr_fixup));
}
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-07-02 9:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-01 5:32 [PATCH] powerpc: fixup lwsync at runtime Kumar Gala
2008-07-01 6:23 ` Benjamin Herrenschmidt
2008-07-01 7:15 ` Benjamin Herrenschmidt
2008-07-01 6:29 ` Michael Ellerman
2008-07-01 14:48 ` Kumar Gala
2008-07-02 9:34 ` Michael Ellerman [this message]
2008-07-02 15:57 ` Kumar Gala
2008-07-03 5:55 ` Michael Ellerman
-- strict thread matches above, loose matches on Subject: below --
2008-06-26 15:30 Kumar Gala
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=1214991248.7436.5.camel@localhost \
--to=michael@ellerman.id.au \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).