drm/linux: Add kmap_to_page()
authorFrançois Tigeot <ftigeot@wolfpond.org>
Fri, 14 Oct 2016 06:59:09 +0000 (08:59 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Fri, 14 Oct 2016 07:17:09 +0000 (09:17 +0200)
sys/dev/drm/include/linux/highmem.h

index e94e0d2..a0ca620 100644 (file)
 
 #include <asm/cacheflush.h>
 
+static inline struct vm_page *
+kmap_to_page(void *addr)
+{
+       return PHYS_TO_VM_PAGE(vtophys(addr));
+}
+
 static inline void *kmap(struct vm_page *pg)
 {
        return (void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pg));