drm/linux: Fix vmap()
authorFrançois Tigeot <ftigeot@wolfpond.org>
Mon, 5 Nov 2018 21:15:18 +0000 (22:15 +0100)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Mon, 5 Nov 2018 21:15:18 +0000 (22:15 +0100)
Page protection information was not being used.

sys/dev/drm/linux_vmalloc.c

index 1e84c25..d4b7040 100644 (file)
@@ -57,6 +57,10 @@ vmap(struct page **pages, unsigned int count,
        if (off == 0)
                return (NULL);
 
+       for (int i = 0; i < count; i++) {
+               pmap_page_set_memattr((struct vm_page *)pages[i], prot);
+       }
+
        vmp->addr = (void *)off;
        vmp->npages = count;
        pmap_qenter(off, (struct vm_page **)pages, count);