The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Armin Schindler <mac@melware.de>
Cc: "Ingo Molnar" <mingo@elte.hu>,
	Êæ¹úÇ¿ <guoqiang@intec.iscas.ac.cn>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Question about ioremap and io_remap_page_range
Date: Thu, 27 Sep 2001 09:16:01 +0100	[thread overview]
Message-ID: <20010927091601.A6499@flint.arm.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.33.0109270847070.2745-100000@localhost.localdomain> <Pine.LNX.4.31.0109271001001.25611-100000@phoenix.one.melware.de>
In-Reply-To: <Pine.LNX.4.31.0109271001001.25611-100000@phoenix.one.melware.de>; from mac@melware.de on Thu, Sep 27, 2001 at 10:03:26AM +0200

On Thu, Sep 27, 2001 at 10:03:26AM +0200, Armin Schindler wrote:
> virt_to_phys() is obsolete ? What should be used if I need the phys address
> of a memory page ? (e.g. for mmap() remapping)

virt_to_phys is only valid on the kernel direct mapped RAM area - memory
returned from kmalloc and non-highmem memory returned from get_free_page.

Since vmalloc and ioremap do not return a pointer into the direct mapped
RAM area, but its own mapping, it is not valid to use virt_to_phys on
these returned values, even through it might be a virtual address.

--
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


  parent reply	other threads:[~2001-09-27  8:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-27  6:04 Question about ioremap and io_remap_page_range 舒国强
2001-09-27  6:52 ` Ingo Molnar
2001-09-27  8:03   ` Armin Schindler
2001-09-27  8:14     ` David S. Miller
2001-09-27  8:16     ` Russell King [this message]
2001-09-27 14:33   ` Jonathan Corbet
2001-09-27 17:42     ` Jonathan Lundell

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=20010927091601.A6499@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=guoqiang@intec.iscas.ac.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mac@melware.de \
    --cc=mingo@elte.hu \
    /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