linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: Stefan Roese <sr@denx.de>
Cc: linuxppc-dev@ozlabs.org, linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH] ppc: ioremap() on PPC44x platforms now accepts 64bit addresses
Date: Fri, 19 Jan 2007 05:57:25 -0600	[thread overview]
Message-ID: <1169207845.28708.2.camel@crusty.rchland.ibm.com> (raw)
In-Reply-To: <200701190906.09112.sr@denx.de>

On Fri, 2007-01-19 at 09:05 +0100, Stefan Roese wrote:
> [PATCH] ppc: ioremap() on PPC44x platforms now accepts 64bit addresses
> 
> 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 supplied.

Good idea.



>  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);

Erm... don't you want:

addr & 0xffffffff00000000ULL

What you have now is a logical and that will likely result in it always
being true...

josh

  reply	other threads:[~2007-01-19 11:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-19  8:05 [PATCH] ppc: ioremap() on PPC44x platforms now accepts 64bit addresses Stefan Roese
2007-01-19 11:57 ` Josh Boyer [this message]
2007-01-28 21:00   ` Stefan Roese
2007-01-29  8:42   ` Stefan Roese
2007-01-29 12:45     ` Sergei Shtylyov
2007-01-29 13:26       ` Stefan Roese

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=1169207845.28708.2.camel@crusty.rchland.ibm.com \
    --to=jwboyer@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=sr@denx.de \
    /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).