diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-09-04 03:46:45 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-09-23 00:35:53 -0400 |
commit | 6bd3110ce6e50fb15c975b26f068d606f4434431 (patch) | |
tree | 81e95a9fdd6e928f8631cdbeaa76f9bd3ecd9e05 /drivers/gpu/drm/drm_vm.c | |
parent | 42532512ee0eff90076fc7c49391e17b1d51d91b (diff) |
drm: powerpc can use a simpler drm_io_prot()
What the code does is equivalent to the x86 code, so let's use
it as well
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_vm.c')
-rw-r--r-- | drivers/gpu/drm/drm_vm.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 06cad0323699..b2b231cda139 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c | |||
@@ -57,15 +57,11 @@ static pgprot_t drm_io_prot(struct drm_local_map *map, | |||
57 | { | 57 | { |
58 | pgprot_t tmp = vm_get_page_prot(vma->vm_flags); | 58 | pgprot_t tmp = vm_get_page_prot(vma->vm_flags); |
59 | 59 | ||
60 | #if defined(__i386__) || defined(__x86_64__) | 60 | #if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) |
61 | if (map->type == _DRM_REGISTERS && !(map->flags & _DRM_WRITE_COMBINING)) | 61 | if (map->type == _DRM_REGISTERS && !(map->flags & _DRM_WRITE_COMBINING)) |
62 | tmp = pgprot_noncached(tmp); | 62 | tmp = pgprot_noncached(tmp); |
63 | else | 63 | else |
64 | tmp = pgprot_writecombine(tmp); | 64 | tmp = pgprot_writecombine(tmp); |
65 | #elif defined(__powerpc__) | ||
66 | pgprot_val(tmp) |= _PAGE_NO_CACHE; | ||
67 | if (map->type == _DRM_REGISTERS) | ||
68 | pgprot_val(tmp) |= _PAGE_GUARDED; | ||
69 | #elif defined(__ia64__) | 65 | #elif defined(__ia64__) |
70 | if (efi_range_is_wc(vma->vm_start, vma->vm_end - | 66 | if (efi_range_is_wc(vma->vm_start, vma->vm_end - |
71 | vma->vm_start)) | 67 | vma->vm_start)) |