[PATCH 3/5] powerpc: Move plpar_wrappers.h into include/asm-powerpc

Michael Ellerman michael at ellerman.id.au
Mon Oct 24 21:09:00 EST 2005


On Mon, 24 Oct 2005 20:38, Arnd Bergmann wrote:
> On Maandag 24 Oktober 2005 07:40, Michael Ellerman wrote:
> > > Doesn't this belong in arch/powerpc/platforms/pseries instead?
> >
> > Not quite, arch/powerpc/kernel/process.c needs plpar_set_xdabr() and
> > plpar_set_dabr(). I also have a patch for machine_kexec.c that will need
> > something from here.
>
> For process.c, might it be better to have a ppc_md->set_dabr() function
> call instead?
> Maybe there is also a similar solution for the kexec problem.

I new some clever person would say that :D

We have:
int set_dabr(unsigned long dabr)
{
        int ret = 0;

#ifdef CONFIG_PPC64
        if (firmware_has_feature(FW_FEATURE_XDABR)) {
                /* We want to catch accesses from kernel and userspace */
                unsigned long flags = H_DABRX_KERNEL|H_DABRX_USER;
                ret = plpar_set_xdabr(dabr, flags);
        } else if (firmware_has_feature(FW_FEATURE_DABR)) {
                ret = plpar_set_dabr(dabr);
        } else
#endif
                set_dabr_spr(dabr);

	return ret;
}

It looks like those firmware features will only ever be true on pSeries, so we 
could make it a ppc_md, with everyone except pSeries having a null callback. 

I'm not sure how crazy we want to get with ppc_md though? It already has 52 
members for PPC64, 74 all up.

cheers

-- 
Michael Ellerman
IBM OzLabs

email: michael:ellerman.id.au
inmsg: mpe:jabber.org
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20051024/9a743a70/attachment.pgp 


More information about the Linuxppc64-dev mailing list