Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / drm_ioctl.c
index 266dcd6cdf3bf3ad1d487ad70110496b294e5491..0a957828b3bd3161d17b21b9e5f946307e2d17da 100644 (file)
@@ -36,9 +36,6 @@
 
 #include <linux/pci.h>
 #include <linux/export.h>
-#ifdef CONFIG_X86
-#include <asm/mtrr.h>
-#endif
 
 static int drm_version(struct drm_device *dev, void *data,
                       struct drm_file *file_priv);
@@ -197,16 +194,7 @@ static int drm_getmap(struct drm_device *dev, void *data,
        map->type = r_list->map->type;
        map->flags = r_list->map->flags;
        map->handle = (void *)(unsigned long) r_list->user_token;
-
-#ifdef CONFIG_X86
-       /*
-        * There appears to be exactly one user of the mtrr index: dritest.
-        * It's easy enough to keep it working on non-PAT systems.
-        */
-       map->mtrr = phys_wc_to_mtrr_index(r_list->map->mtrr);
-#else
-       map->mtrr = -1;
-#endif
+       map->mtrr = arch_phys_wc_index(r_list->map->mtrr);
 
        mutex_unlock(&dev->struct_mutex);