All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Li Yang-r58472" <LeoLi@freescale.com>
To: "Kumar Gala" <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Tabi Timur-B04825 <timur@freescale.com>
Subject: Discussion about iopa()
Date: Thu, 8 Feb 2007 17:22:10 +0800	[thread overview]
Message-ID: <989B956029373F45A0B8AF02970818900D444B@zch01exm26.fsl.freescale.net> (raw)
In-Reply-To: <82ABE776-0C94-4FAE-BD24-071988842EA9@kernel.crashing.org>

> >>>>> MURAM is a mmio region so it don't share the characteristic of
> > main
> >>>>> memory that phy_addr =3D virt_addr - PAGE_OFFSET.  While they =
can
> >>>>> both be
> >>>>> mapped through page table using iopa().
> >>>>
> >>>> Right, so when do you know if you'll be using MURAM or normal
> >>>> memory?  Why not just keep around a token that is the physical
> >>>> address at the point you make the decision of MURAM vs normal
> > memory.
> >>>
> >>> Yes, that can be a way.  But as the virt to phy mapping is only
used
> >>> once, it's nothing bad to do it this way.
> >>
> >> The problem as I stated before with using iopa() is that its not
> >> supported across platforms.
> >
> > Yes, it is only for PPC32.  But we don't have another API to do
> > it.  How
> > about make it more generic to add PPC64 version?
>=20
> Why do you need another API to do this, you already have the
> information you want, its just a matter of you keeping track of it.

Do you think we should remove iopa?

The information is often not so obvious.  The most case of using iopa is
that we allocate memory from MURAM using rheap, and then get the
physical address of it.  We can calculate phy_addr by using:  virt_addr
- virt_muram_base + phy_muram_base, but it is not as straightforward as
just using the page table, let alone we need to keep track of
virt_muram_base and phy_muram_base.

- Leo

  reply	other threads:[~2007-02-08  9:21 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-06 11:31 [PATCH 1/4] ucc_geth: Change private immrbar_virt_to_phys to generic iopa Li Yang
2007-02-06 14:26 ` Kumar Gala
2007-02-06 14:26   ` Kumar Gala
2007-02-07  9:34   ` Li Yang-r58472
2007-02-07  9:34     ` Li Yang-r58472
2007-02-07 16:36     ` Kumar Gala
2007-02-07 16:36       ` Kumar Gala
2007-02-07 16:43   ` Timur Tabi
2007-02-07 16:43     ` Timur Tabi
2007-02-07 16:49     ` Kumar Gala
2007-02-07 16:49       ` Kumar Gala
2007-02-07 17:03       ` Timur Tabi
2007-02-07 17:03         ` Timur Tabi
2007-02-08  5:52         ` Li Yang-r58472
2007-02-08  5:52           ` Li Yang-r58472
2007-02-08  5:57           ` Kumar Gala
2007-02-08  6:48             ` Li Yang-r58472
2007-02-08  6:48               ` Li Yang-r58472
2007-02-08  6:53               ` Kumar Gala
2007-02-08  6:53                 ` Kumar Gala
2007-02-08  7:06                 ` Li Yang-r58472
2007-02-08  7:06                   ` Li Yang-r58472
2007-02-08  7:16                   ` Kumar Gala
2007-02-08  7:16                     ` Kumar Gala
2007-02-08  7:36                     ` Li Yang-r58472
2007-02-08  7:36                       ` Li Yang-r58472
2007-02-08  7:41                       ` Kumar Gala
2007-02-08  7:41                         ` Kumar Gala
2007-02-08  9:22                         ` Li Yang-r58472 [this message]
2007-02-08 13:41                           ` Discussion about iopa() Timur Tabi
2007-02-09 17:08                             ` Dan Malek
2007-02-10  2:37                               ` Benjamin Herrenschmidt
2007-02-10 18:04                                 ` Dan Malek
2007-02-10 21:40                                   ` Benjamin Herrenschmidt
2007-02-10 22:27                                     ` Dan Malek
2007-02-10 22:42                                       ` Benjamin Herrenschmidt
2007-02-08 21:26                           ` Benjamin Herrenschmidt
2007-02-09 17:13                             ` Dan Malek
2007-02-09 22:06                               ` Benjamin Herrenschmidt
2007-02-09 22:46                                 ` Kumar Gala
2007-02-09 22:51                                   ` Timur Tabi
2007-02-09 23:06                                     ` Kumar Gala
2007-02-09 23:10                                       ` Timur Tabi
2007-02-09 23:19                                         ` Benjamin Herrenschmidt
2007-02-09 23:22                                         ` Kumar Gala
2007-02-09 23:33                                           ` Timur Tabi
2007-02-09 23:43                                             ` Kumar Gala
2007-02-09 17:06                           ` Dan Malek
2007-02-08 13:35                 ` [PATCH 1/4] ucc_geth: Change private immrbar_virt_to_phys to generic iopa Timur Tabi
2007-02-08 13:35                   ` Timur Tabi
2007-02-09 17:22                   ` Dan Malek
2007-02-09 17:26                     ` Timur Tabi
2007-02-09 17:26                       ` Timur Tabi
2007-02-08 13:27           ` Timur Tabi
2007-02-07  0:19 ` Jeff Garzik

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=989B956029373F45A0B8AF02970818900D444B@zch01exm26.fsl.freescale.net \
    --to=leoli@freescale.com \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=timur@freescale.com \
    /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.