linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/r128: fix build for UML
@ 2021-09-02  2:17 Randy Dunlap
  2021-09-02  7:10 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2021-09-02  2:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, David Airlie, Daniel Vetter, dri-devel, Jeff Dike,
	Richard Weinberger, Anton Ivanov, linux-um

Fix a build error on CONFIG_UML, which does not support (provide)
wbinvd(). UML can use the generic mb() instead.

../drivers/gpu/drm/r128/ati_pcigart.c: In function ‘drm_ati_pcigart_init’:
../drivers/gpu/drm/r128/ati_pcigart.c:218:2: error: implicit declaration of function ‘wbinvd’ [-Werror=implicit-function-declaration]
  wbinvd();
  ^~~~~~

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") # pre-git
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: linux-um@lists.infradead.org
---
 drivers/gpu/drm/r128/ati_pcigart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20210901.orig/drivers/gpu/drm/r128/ati_pcigart.c
+++ linux-next-20210901/drivers/gpu/drm/r128/ati_pcigart.c
@@ -214,7 +214,7 @@ int drm_ati_pcigart_init(struct drm_devi
 	}
 	ret = 0;
 
-#if defined(__i386__) || defined(__x86_64__)
+#if (defined(__i386__) || defined(__x86_64__)) && !defined(CONFIG_UML)
 	wbinvd();
 #else
 	mb();

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/r128: fix build for UML
  2021-09-02  2:17 [PATCH] drm/r128: fix build for UML Randy Dunlap
@ 2021-09-02  7:10 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2021-09-02  7:10 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: David Airlie, Daniel Vetter, dri-devel, Jeff Dike,
	Richard Weinberger, Anton Ivanov, linux-um

On Wed, 2021-09-01 at 19:17 -0700, Randy Dunlap wrote:
> Fix a build error on CONFIG_UML, which does not support (provide)
> wbinvd(). UML can use the generic mb() instead.
> 
> ../drivers/gpu/drm/r128/ati_pcigart.c: In function ‘drm_ati_pcigart_init’:
> ../drivers/gpu/drm/r128/ati_pcigart.c:218:2: error: implicit declaration of function ‘wbinvd’ [-Werror=implicit-function-declaration]
>   wbinvd();
>   ^~~~~~
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") # pre-git

Arguably, that could be

Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")

because prior to that, Kconfig options depending on PCI couldn't be
selected on ARCH=um.

johannes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-02  7:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-02  2:17 [PATCH] drm/r128: fix build for UML Randy Dunlap
2021-09-02  7:10 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).