Seems you suggest to consider kiobuf references to memory as opaque
handles with kernel methods to get mapping according to use. But since we
cannot require all drivers to actually implement DMA, it must be possible
for a driver to get a kernel virtual mapping on need.
Basically, something as trivial as the following:
#define virt_from_stuff(k) (k)
#define bus_from_stuff(k) virt_to_bus(k)
Should fit the abstraction as seen from drivers given current
implementation.
Gérard.
PS:
BTW, requiring kiobuf references to memory to reference whole page (as I
read in some other posting) or to be page boundary aligned is not the way
to go, in my opinion.
-
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/