aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_module.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-12-20 11:15:22 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2022-01-14 13:30:56 +0100
commit016017a195b86d9761e91cb052438bf71207a12f (patch)
treef9a0965941d1f91345b7dcace24d3b2b330343cc /drivers/gpu/drm/ttm/ttm_module.c
parentdma-buf: cma_heap: Fix mutex locking section (diff)
downloadlinux-dev-016017a195b86d9761e91cb052438bf71207a12f.tar.xz
linux-dev-016017a195b86d9761e91cb052438bf71207a12f.zip
drm/ttm: fix compilation on ARCH=um
Even if it's probably not really useful, it can get selected by e.g. randconfig builds, and then failing to compile is an annoyance. Unfortunately, it's hard to fix in Kconfig, since DRM_TTM is selected by many things that don't really depend on any specific architecture, and just depend on PCI (which is indeed now available in ARCH=um via simulation/emulation). Fix this in the code instead by just ifdef'ing the relevant two lines that depend on "real X86". Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20211220111519.a4c8c6eff702.Ie4cf4e68698f6a9f546b83379bc52c266504424f@changeid
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_module.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_module.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_module.c b/drivers/gpu/drm/ttm/ttm_module.c
index 0037eefe3239..a3ad7c9736ec 100644
--- a/drivers/gpu/drm/ttm/ttm_module.c
+++ b/drivers/gpu/drm/ttm/ttm_module.c
@@ -68,9 +68,11 @@ pgprot_t ttm_prot_from_caching(enum ttm_caching caching, pgprot_t tmp)
#if defined(__i386__) || defined(__x86_64__)
if (caching == ttm_write_combined)
tmp = pgprot_writecombine(tmp);
+#ifndef CONFIG_UML
else if (boot_cpu_data.x86 > 3)
tmp = pgprot_noncached(tmp);
-#endif
+#endif /* CONFIG_UML */
+#endif /* __i386__ || __x86_64__ */
#if defined(__ia64__) || defined(__arm__) || defined(__aarch64__) || \
defined(__powerpc__) || defined(__mips__)
if (caching == ttm_write_combined)