qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH 12/15] Support 1T segments on ppc


From: David Gibson
Subject: Re: [Qemu-devel] Re: [PATCH 12/15] Support 1T segments on ppc
Date: Sun, 13 Feb 2011 20:34:40 +1100
User-agent: Mutt/1.5.20 (2009-06-14)

On Sat, Feb 12, 2011 at 04:57:39PM +0100, Alexander Graf wrote:
> On 12.02.2011, at 15:54, David Gibson wrote:
[snip]
> > +    if (rb & (0x1000 - env->slb_nr))
> 
> Braces...

Oops, yeah.  These later patches in the series I haven't really
audited for coding style adequately yet.  I'll fix these before the
next version.

[snip]
> > +   return -1; /* 1T segment on MMU that doesn't support it */
> > + 
> > +    /* We stuff a copy of the B field into slb->esid to simplify
> > +     * lookup later */
> > +    slb->esid = (rb & (SLB_ESID_ESID | SLB_ESID_V)) |
> > +        (rs >> SLB_VSID_SSIZE_SHIFT);
> 
> Wouldn't it be easier to add another field?

Easier for what?  The reason I put these bits in here is that the rest
of the things slb_lookup() needs to scan for are all in the esid
field, so putting B in there means slb_lookup() needs only one
comparison per-slot, per segment size.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson



reply via email to

[Prev in Thread] Current Thread [Next in Thread]