Subject: Re: [PATCH 2/5] [POWERPC] 8xx: generic 8xx code arch/powerpc port

From: Benjamin Herrenschmidt <[email-masked]>
Date: Fri, 17 Nov 2006 09:48:43 +1100

> But wha do you need this for anyway?  It's not used anywhere currently,
> and it's not 8xx-specific at all?
> 
> > +unsigned long va_to_phys(unsigned long address)
> > +{
> > +	pte_t *pte;
> > +
> > +	pte = va_to_pte(address);
> > +	if (pte)
> > +		return(((unsigned long)(pte_val(*pte)) & PAGE_MASK) | (address & ~(PAGE_MASK)));
> > +	return (0);
> > +}
> 
> Shouldn't you use virt_to_phys instead?
> 
> Also for the last two I'd prefer if you'd find a way to avoid adding
> them.

I think those 2 are used for cases where they either have a non-linear
mapping a-la Amiga/APUS or in cases where they try to get addresses of
things in the vmalloc area no ?.

Ben.