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/