drm/linux: use pgprot_t
authorFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 16 Sep 2018 07:20:37 +0000 (09:20 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 16 Sep 2018 07:20:37 +0000 (09:20 +0200)
sys/dev/drm/include/asm/page.h
sys/dev/drm/include/linux/vmalloc.h
sys/dev/drm/linux_vmalloc.c
sys/dev/drm/ttm/ttm_bo_util.c

index 730816f..1a95309 100644 (file)
@@ -39,4 +39,6 @@ page_to_phys(struct page *page)
 
 #include <asm/memory_model.h>
 
+typedef unsigned long pgprot_t;
+
 #endif /* _ASM_PAGE_H_ */
index 75e813e..65bda04 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2017 François Tigeot <ftigeot@wolfpond.org>
+ * Copyright (c) 2015-2018 François Tigeot <ftigeot@wolfpond.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -34,7 +34,7 @@
 #include <linux/rbtree.h>
 
 void *vmap(struct page **pages, unsigned int count,
-          unsigned long flags, unsigned long prot);
+          unsigned long flags, pgprot_t prot);
 
 void vunmap(const void *addr);
 
index 2bf6c12..1e84c25 100644 (file)
@@ -43,7 +43,7 @@ SLIST_HEAD(vmap_list_head, vmap) vmap_list = SLIST_HEAD_INITIALIZER(vmap_list);
 /* vmap: map an array of pages into virtually contiguous space */
 void *
 vmap(struct page **pages, unsigned int count,
-       unsigned long flags, unsigned long prot)
+       unsigned long flags, pgprot_t prot)
 {
        struct vmap *vmp;
        vm_offset_t off;
index 2911e14..9c62784 100644 (file)
@@ -355,11 +355,11 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
        for (i = 0; i < new_mem->num_pages; ++i) {
                page = i * dir + add;
                if (old_iomap == NULL) {
-                       vm_memattr_t prot = ttm_io_prot(old_mem->placement);
+                       pgprot_t prot = ttm_io_prot(old_mem->placement);
                        ret = ttm_copy_ttm_io_page(ttm, new_iomap, page,
                                                   prot);
                } else if (new_iomap == NULL) {
-                       vm_memattr_t prot = ttm_io_prot(new_mem->placement);
+                       pgprot_t prot = ttm_io_prot(new_mem->placement);
                        ret = ttm_copy_io_ttm_page(ttm, old_iomap, page,
                                                   prot);
                } else