Commit 6bd3110c authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Dave Airlie

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: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 42532512
...@@ -57,15 +57,11 @@ static pgprot_t drm_io_prot(struct drm_local_map *map, ...@@ -57,15 +57,11 @@ static pgprot_t drm_io_prot(struct drm_local_map *map,
{ {
pgprot_t tmp = vm_get_page_prot(vma->vm_flags); pgprot_t tmp = vm_get_page_prot(vma->vm_flags);
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__)
if (map->type == _DRM_REGISTERS && !(map->flags & _DRM_WRITE_COMBINING)) if (map->type == _DRM_REGISTERS && !(map->flags & _DRM_WRITE_COMBINING))
tmp = pgprot_noncached(tmp); tmp = pgprot_noncached(tmp);
else else
tmp = pgprot_writecombine(tmp); tmp = pgprot_writecombine(tmp);
#elif defined(__powerpc__)
pgprot_val(tmp) |= _PAGE_NO_CACHE;
if (map->type == _DRM_REGISTERS)
pgprot_val(tmp) |= _PAGE_GUARDED;
#elif defined(__ia64__) #elif defined(__ia64__)
if (efi_range_is_wc(vma->vm_start, vma->vm_end - if (efi_range_is_wc(vma->vm_start, vma->vm_end -
vma->vm_start)) vma->vm_start))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment