diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-06-14 15:20:08 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-06-14 15:20:08 +0000 |
commit | de6be07500ebc5f7a2cff7aadd34935cbce58476 (patch) | |
tree | 3fcd2b4b2af1e7901cb189209306f27707355bae /sys | |
parent | bb6203ff883c1767c2f2ecb4286cacadb09a45c7 (diff) |
rename our kunmap() to kunmap_va()
In linux kunmap() has a page struct * argument our kunmap() has a void *
argument which results in uncoverted uses building but doing the wrong
thing. Renaming will catch any codepaths that need to be changed at
compile time.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/drm_linux.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/gem/i915_gem_pages.c | 2 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/gt/intel_gtt.c | 2 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/i915_gem.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/i915_gem_fence_reg.c | 2 | ||||
-rw-r--r-- | sys/dev/pci/drm/include/linux/highmem.h | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/ttm/ttm_bo_util.c | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/pci/drm/drm_linux.c b/sys/dev/pci/drm/drm_linux.c index b68d2c98ef4..d46ef6a2503 100644 --- a/sys/dev/pci/drm/drm_linux.c +++ b/sys/dev/pci/drm/drm_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.c,v 1.59 2020/06/08 04:47:58 jsg Exp $ */ +/* $OpenBSD: drm_linux.c,v 1.60 2020/06/14 15:20:07 jsg Exp $ */ /* * Copyright (c) 2013 Jonathan Gray <jsg@openbsd.org> * Copyright (c) 2015, 2016 Mark Kettenis <kettenis@openbsd.org> @@ -548,7 +548,7 @@ kmap(struct vm_page *pg) } void -kunmap(void *addr) +kunmap_va(void *addr) { vaddr_t va = (vaddr_t)addr; diff --git a/sys/dev/pci/drm/i915/gem/i915_gem_pages.c b/sys/dev/pci/drm/i915/gem/i915_gem_pages.c index ac354fbbc22..6aac54cb326 100644 --- a/sys/dev/pci/drm/i915/gem/i915_gem_pages.c +++ b/sys/dev/pci/drm/i915/gem/i915_gem_pages.c @@ -163,7 +163,7 @@ static void unmap_object(struct drm_i915_gem_object *obj, void *ptr) if (is_vmalloc_addr(ptr)) vunmap(ptr, obj->base.size); else - kunmap(kmap_to_page(ptr)); + kunmap_va(ptr); } struct sg_table * diff --git a/sys/dev/pci/drm/i915/gt/intel_gtt.c b/sys/dev/pci/drm/i915/gt/intel_gtt.c index 0fec315c3f1..24080585259 100644 --- a/sys/dev/pci/drm/i915/gt/intel_gtt.c +++ b/sys/dev/pci/drm/i915/gt/intel_gtt.c @@ -336,7 +336,7 @@ static void poison_scratch_page(struct vm_page *page, unsigned long size) kunmap(page); #else poison_mem(vaddr, PAGE_SIZE); - kunmap(vaddr); + kunmap_va(vaddr); #endif page = pfn_to_page(page_to_pfn(page) + 1); diff --git a/sys/dev/pci/drm/i915/i915_gem.c b/sys/dev/pci/drm/i915/i915_gem.c index 351fbf3bc99..c71c984dff2 100644 --- a/sys/dev/pci/drm/i915/i915_gem.c +++ b/sys/dev/pci/drm/i915/i915_gem.c @@ -316,7 +316,7 @@ shmem_pread(struct vm_page *page, int offset, int len, char __user *user_data, ret = __copy_to_user(user_data, vaddr + offset, len); - kunmap(vaddr); + kunmap_va(vaddr); return ret ? -EFAULT : 0; } @@ -782,7 +782,7 @@ shmem_pwrite(struct vm_page *page, int offset, int len, char __user *user_data, if (!ret && needs_clflush_after) drm_clflush_virt_range(vaddr + offset, len); - kunmap(vaddr); + kunmap_va(vaddr); return ret ? -EFAULT : 0; } diff --git a/sys/dev/pci/drm/i915/i915_gem_fence_reg.c b/sys/dev/pci/drm/i915/i915_gem_fence_reg.c index f435aaf4d26..82be11b939e 100644 --- a/sys/dev/pci/drm/i915/i915_gem_fence_reg.c +++ b/sys/dev/pci/drm/i915/i915_gem_fence_reg.c @@ -760,7 +760,7 @@ static void i915_gem_swizzle_page(struct vm_page *page) memcpy(&vaddr[i + 64], temp, 64); } - kunmap(vaddr); + kunmap_va(vaddr); } /** diff --git a/sys/dev/pci/drm/include/linux/highmem.h b/sys/dev/pci/drm/include/linux/highmem.h index 36405597f9e..3ce510bfd7d 100644 --- a/sys/dev/pci/drm/include/linux/highmem.h +++ b/sys/dev/pci/drm/include/linux/highmem.h @@ -1,4 +1,4 @@ -/* $OpenBSD: highmem.h,v 1.2 2020/06/08 04:48:14 jsg Exp $ */ +/* $OpenBSD: highmem.h,v 1.3 2020/06/14 15:20:07 jsg Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * @@ -23,7 +23,7 @@ #include <linux/uaccess.h> void *kmap(struct vm_page *); -void kunmap(void *addr); +void kunmap_va(void *addr); #define kmap_to_page(ptr) (ptr) diff --git a/sys/dev/pci/drm/ttm/ttm_bo_util.c b/sys/dev/pci/drm/ttm/ttm_bo_util.c index 2ee63091994..26228cb9b4c 100644 --- a/sys/dev/pci/drm/ttm/ttm_bo_util.c +++ b/sys/dev/pci/drm/ttm/ttm_bo_util.c @@ -700,7 +700,7 @@ void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map) vunmap(map->virtual, bo->mem.bus.size); break; case ttm_bo_map_kmap: - kunmap(map->virtual); + kunmap_va(map->virtual); break; case ttm_bo_map_premapped: break; |