All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylvain Munaut <tnt@246tNt.com>
To: DI BACCO ANTONIO - technolabs <Antonio.DiBacco@technolabs.it>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Dereferencing phys addr IMMAP works even if it is not a virtual address. Strange?
Date: Tue, 06 Mar 2007 15:54:35 +0100	[thread overview]
Message-ID: <45ED80AB.9010907@246tNt.com> (raw)
In-Reply-To: <F1F6EC0C8B75034F9E3A79FC85122E8E6C0B3A@aquib01a>

DI BACCO ANTONIO - technolabs wrote:
> Now I'm doing a ioremap_nocache of IMMAP and using the virtual pointer
> returned to access my 880 registers but also using the physical
> address it works, I can access the registers.
If the IMMAP base is high (like 0xf0000000 ) and therefore doesn't
collide with anything, it's quite common practice to map it statically
using a BAT somewhere in the setup code and often it's mapped such that
phys = virt ...

So a physical address in this zone is equal to a virtual addres ...

When that's the case, ioremap detects the BAT mapping and just does
nothing. But you should always use ioremap nonetheless ... because if at
some point some one decide to move the BAT mapping, if you didn't do
things properly your code will break.

Sylvain

      reply	other threads:[~2007-03-06 14:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06 14:00 Dereferencing phys addr IMMAP works even if it is not a virtual address. Strange? DI BACCO ANTONIO - technolabs
2007-03-06 14:54 ` Sylvain Munaut [this message]

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=45ED80AB.9010907@246tNt.com \
    --to=tnt@246tnt.com \
    --cc=Antonio.DiBacco@technolabs.it \
    --cc=linuxppc-embedded@ozlabs.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.