lkml.org 
[lkml]   [2002]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: virt_to_page(pci_alloc_consistent())
From
   From: Pete Zaitcev <zaitcev@redhat.com>
Date: Thu, 3 Oct 2002 02:38:14 -0400

I just noticed that sound drivers use the address from
pci_alloc_consistent() as the input to virt_to_page() all
over the place. I looked into the Documentation/DMA-mapping.txt,
and it says:

This routine will allocate RAM for that region, so it acts similarly to
__get_free_pages (but takes size instead of a page order).

I know for fact I got it wrong in sparc in whole 2.4, and it seems
RMK got it wrong in arm. I suggest other architecture maintainers
to look at it ASAP. May even be oopsabe, by indexing outside of
mem_map[] with a suitable sound driver.

I think we MUST allow architectures to do what SPARC and ARM
do, there is simply no other way to change the page protections
easily for these kinds of systems.

So please instead change the DMA-mapping.txt documentation and
propose pci_consistent_to_page(ptr) API additions. Next, inform
the subsytems trying to use virt_to_page() on this memory that
they need to use the new interface.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:2.099 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site