lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 22 Dec 2021 21:56:06 +0100
From:   Daniel Vetter <daniel@...ll.ch>
To:     Johannes Berg <johannes@...solutions.net>
Cc:     dri-devel@...ts.freedesktop.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        linux-um@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Johannes Berg <johannes.berg@...el.com>
Subject: Re: [PATCH] drm/ttm: fix compilation on ARCH=um

On Mon, Dec 20, 2021 at 11:15:22AM +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@...el.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@...ux-m68k.org>
> Signed-off-by: Johannes Berg <johannes.berg@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ