mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Lundell <jlundell@pobox.com>
To: corbet-lk@lwn.net (Jonathan Corbet), linux-kernel@vger.kernel.org
Subject: Re: Question about ioremap and io_remap_page_range
Date: Thu, 27 Sep 2001 10:42:15 -0700	[thread overview]
Message-ID: <p0510031bb7d912c2c374@[207.213.214.37]> (raw)
In-Reply-To: <20010927143338.20730.qmail@eklektix.com>
In-Reply-To: <20010927143338.20730.qmail@eklektix.com>

At 8:33 AM -0600 2001-09-27, Jonathan Corbet wrote:
>  > >      VIRT_ADDR = ioremap(BUS_ADDR); to map a section of PCI memory, and
>>  >      X_ADDR = virt_to_phys(VIRT_ADDR);
>>
>>  i'd suggest to read Documentation/DMA-mapping.txt in any recent kernel
>>  source, the bus_to_virt()/virt_to_phys() interface is obsolete and has
>>  been replaced by the pci_alloc_*/pci_map_*/pci_free_*() dynamic
>>  DMA-mapping API.
>
>...or, of course, _Linux_Device_Drivers_, Second Edition, available online
>at http://www.xml.com/ldd/chapter/book/index.html.  The DMA chapter covers
>this API as well.

That chapter says, in small part,

>Based on this discussion, you might also want to map addresses 
>returned by ioremap to user space. This mapping is easily 
>accomplished because you can use remap_page_range directly, without 
>implementing methods for virtual memory areas. In other words, 
>remap_page_range is already usable for building new page tables that 
>map I/O memory to user space

Are you suggesting that ioremap() objects can be passed to 
remap_page_range()? How can that be valid?


Also, there's an html conversion error:

>      if (offset >= _&thinsp;_pa(high_memory) || (filp->f_flags & O_SYNC))

  Looks like &thinsp; got translated to &amp;thinsp;
-- 
/Jonathan Lundell.

      reply	other threads:[~2001-09-27 17:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-27  6:04 舒国强
2001-09-27  6:52 ` Ingo Molnar
2001-09-27  8:03   ` Armin Schindler
2001-09-27  8:16     ` Russell King
2001-09-27  8:14   ` David S. Miller
2001-09-27 14:33   ` Jonathan Corbet
2001-09-27 17:42     ` Jonathan Lundell [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='p0510031bb7d912c2c374@[207.213.214.37]' \
    --to=jlundell@pobox.com \
    --cc=corbet-lk@lwn.net \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®