Messages in this thread | | | Date | Mon, 13 Dec 1999 02:38:27 -0600 (CST) | From | Jeff Garzik <> | Subject | Re: mm questions |
| |
On Sun, 12 Dec 1999, Terence Ripperda wrote: > I'm working on a loadable and had some questions about memory management. > > One of the things I'd like to be able to do is allocate DMA buffers in the > kernel and remap those to user space. remap_page_range looks like it > provides the functionality I need, but of course only works on non-RAM > memory addresses and "reserved" pages.
Check out Alan Cox's 2.3.18ac patch series. It includes a dmaram driver which does exactly what you describe here, if I'm not mistaken.
> Some code I've seen gets around this by twiddling with the "reserved" bit > in the pages, but this is of course a bad hack. I noticed that the bttv > driver calls mem_map_reserve() on the desired pages, and then has no > problem remapping the buffers into user space. > > Is this the "Right" and "acceptable" way to go about doing this, or just > less of a hack? > > I was also looking for a way to mark pages uncacheable. It didn't look > like there was any way to do this (nor other cache-related functionality, > such as flushing caches) on x86 architectures, but that there seemed to be > such things on other architectures (such as arm and m68k). > > I realize MTRR functionality exists for marking cache behavior for ranges > of physical memory, but recent Intel processors provide Page Allocation > Table bits to allow fine-grained control at a page level. Would such code > likely be accepted into the kernel, or are there reasons for avoiding such > functionality?
There is ioremap_nocache and io_remap_page_range, but I don't think those are applicable to your situation.
Regards,
Jeff
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |