Skip to content

Commit 016017a

Browse files
jmberg-inteldanvet
authored andcommitted
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 <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20211220111519.a4c8c6eff702.Ie4cf4e68698f6a9f546b83379bc52c266504424f@changeid
1 parent 54329e6 commit 016017a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/ttm/ttm_module.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ pgprot_t ttm_prot_from_caching(enum ttm_caching caching, pgprot_t tmp)
6868
#if defined(__i386__) || defined(__x86_64__)
6969
if (caching == ttm_write_combined)
7070
tmp = pgprot_writecombine(tmp);
71+
#ifndef CONFIG_UML
7172
else if (boot_cpu_data.x86 > 3)
7273
tmp = pgprot_noncached(tmp);
73-
#endif
74+
#endif /* CONFIG_UML */
75+
#endif /* __i386__ || __x86_64__ */
7476
#if defined(__ia64__) || defined(__arm__) || defined(__aarch64__) || \
7577
defined(__powerpc__) || defined(__mips__)
7678
if (caching == ttm_write_combined)

0 commit comments

Comments
 (0)