Add a compat kmap_atomic_prot_pfn to do quick kernel map / unmaps of
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Thu, 28 Feb 2008 12:47:15 +0000 (13:47 +0100)
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Thu, 28 Feb 2008 12:47:15 +0000 (13:47 +0100)
commit40c9e6a26dd251fe2bf207bb259ba7e4a7704fbe
treea1cb1e00d162d3c7dbf8ba02b8005dbd4fb20948
parent72983ff30183745cd96760aa07b857c44daebde7
Add a compat kmap_atomic_prot_pfn to do quick kernel map / unmaps of
PCI- or high memory.
This is substantially more efficient than drm_bo_kmap,
since the mapping only lives on a single processor.
Unmapping is done use kunmap_atomic(). Flushes only a single tlb() entry.

Add a support utility int drm_bo_pfn_prot() that returns the
pfn and desired page protection for a given bo offset.

This is all intended for relocations in bound TTMS or vram.
Mapping-accessing-unmapping must be atomic, either using preempt_xx() macros
or a spinlock.
linux-core/drm_bo_move.c
linux-core/drm_compat.c
linux-core/drm_compat.h
linux-core/drm_objects.h