[PATCH] ppc: ioremap() on PPC44x platforms now accepts 64bit addresses

Stefan Roese sr at denx.de
Tue Jan 30 00:26:57 EST 2007


Hi Sergei,

On Monday 29 January 2007 13:45, Sergei Shtylyov wrote:
> > diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c
> > index 354a940..2f9a311 100644
> > --- a/arch/ppc/mm/pgtable.c
> > +++ b/arch/ppc/mm/pgtable.c
> > @@ -156,9 +156,19 @@ ioremap64(unsigned long long addr, unsigned long
> > size) void __iomem *
> >  ioremap(phys_addr_t addr, unsigned long size)
> >  {
> > -	phys_addr_t addr64 = fixup_bigphys_addr(addr, size);
> > -
> > -	return ioremap64(addr64, size);
> > +	/*
> > +	 * On systems that supply a real 64bit address
> > +	 * (with CONFIG_RESOURCES_64BIT enabled), don't use the
> > +	 * fixup function.
> > +	 * This allows us to use the fixup function when no ERPN
> > +	 * is specified and use the 64 bit address when the ERPN
> > +	 * is suppied.
> > +	 */
> > +	if ((unsigned long long)addr & 0xffffffff00000000ULL)
> > +		return ioremap64(addr, size);
>
>     I'm sorry but is this actually needed? From looking at the
> arch/ppc/syslib/ibm44x_common.c and include/asm-ppc/ibm44x.h I got an
> impression that fixup_bigphys_addr() returns addresses >= 4GB intact anyway

Hmmm. It seems that you are correct here (again). I was in a hurry since I did 
this stuff right before going on vacation. So please forget about this patch 
once and for all.

Sorry about the noise.

Best regards,
Stefan



More information about the Linuxppc-dev mailing list