* Re: Build regressions/improvements in v5.16-rc6
[not found] <20211220084013.242754-1-geert@linux-m68k.org>
@ 2021-12-20 9:45 ` Geert Uytterhoeven
2021-12-20 10:15 ` [PATCH] drm/ttm: fix compilation on ARCH=um Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-12-20 9:45 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: linux-um, DRI Development
On Mon, Dec 20, 2021 at 10:25 AM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> JFYI, when comparing v5.16-rc6[1] to v5.16-rc5[3], the summaries are:
> - build errors: +1/-5
+ /kisskb/src/drivers/gpu/drm/ttm/ttm_module.c: error: 'struct
cpuinfo_um' has no member named 'x86': => 71:24
um-x86_64/um-allyesconfig
> [1] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/a7904a538933c525096ca2ccde1e60d0ee62c08e/ (all 90 configs)
> [3] http://kisskb.ellerman.id.au/kisskb/branch/linus/head/2585cf9dfaaddf00b069673f27bb3f8530e2039c/ (all 90 configs)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] drm/ttm: fix compilation on ARCH=um
2021-12-20 9:45 ` Build regressions/improvements in v5.16-rc6 Geert Uytterhoeven
@ 2021-12-20 10:15 ` Johannes Berg
2021-12-22 20:56 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2021-12-20 10:15 UTC (permalink / raw)
To: dri-devel; +Cc: linux-kernel, linux-um, Geert Uytterhoeven, Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
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>
---
drivers/gpu/drm/ttm/ttm_module.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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)
--
2.33.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/ttm: fix compilation on ARCH=um
2021-12-20 10:15 ` [PATCH] drm/ttm: fix compilation on ARCH=um Johannes Berg
@ 2021-12-22 20:56 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2021-12-22 20:56 UTC (permalink / raw)
To: Johannes Berg
Cc: dri-devel, Geert Uytterhoeven, linux-um, linux-kernel,
Johannes Berg
On Mon, Dec 20, 2021 at 11:15:22AM +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> 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>
Probably the last thing before I disappear until 2022 :-)
Merged into drm-misc-fixes, thanks for your patch.
-Daniel
> ---
> drivers/gpu/drm/ttm/ttm_module.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> 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)
> --
> 2.33.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-22 20:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20211220084013.242754-1-geert@linux-m68k.org>
2021-12-20 9:45 ` Build regressions/improvements in v5.16-rc6 Geert Uytterhoeven
2021-12-20 10:15 ` [PATCH] drm/ttm: fix compilation on ARCH=um Johannes Berg
2021-12-22 20:56 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox