* [PATCH v2] drm/r128: fix build for UML
@ 2021-10-11 8:00 ` Randy Dunlap
0 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2021-10-11 8:00 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, David Airlie, Daniel Vetter, dri-devel, Jeff Dike,
Richard Weinberger, Anton Ivanov, linux-um, Sam Ravnborg
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: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
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
Cc: Sam Ravnborg <sam@ravnborg.org>
---
v2: update Fixes: tag (Johannes)
Use simple CONFIG_X86 instead of a more complicated expression. (Sam)
drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c
+++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c
@@ -215,7 +215,7 @@ int drm_ati_pcigart_init(struct drm_devi
}
ret = 0;
-#if defined(__i386__) || defined(__x86_64__)
+#ifdef CONFIG_X86
wbinvd();
#else
mb();
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2] drm/r128: fix build for UML
@ 2021-10-11 8:00 ` Randy Dunlap
0 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2021-10-11 8:00 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, David Airlie, Daniel Vetter, dri-devel, Jeff Dike,
Richard Weinberger, Anton Ivanov, linux-um, Sam Ravnborg
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: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
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
Cc: Sam Ravnborg <sam@ravnborg.org>
---
v2: update Fixes: tag (Johannes)
Use simple CONFIG_X86 instead of a more complicated expression. (Sam)
drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c
+++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c
@@ -215,7 +215,7 @@ int drm_ati_pcigart_init(struct drm_devi
}
ret = 0;
-#if defined(__i386__) || defined(__x86_64__)
+#ifdef CONFIG_X86
wbinvd();
#else
mb();
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] drm/r128: fix build for UML
2021-10-11 8:00 ` Randy Dunlap
@ 2021-10-11 8:02 ` Randy Dunlap
-1 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2021-10-11 8:02 UTC (permalink / raw)
To: linux-kernel
Cc: David Airlie, Daniel Vetter, dri-devel, Jeff Dike,
Richard Weinberger, Anton Ivanov, linux-um, Sam Ravnborg
On 10/11/21 1:00 AM, 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: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
> 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
> Cc: Sam Ravnborg <sam@ravnborg.org>
> ---
> v2: update Fixes: tag (Johannes)
> Use simple CONFIG_X86 instead of a more complicated expression. (Sam)
>
Oops, apparently I can't count and this is v3... :(
> drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c
> +++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c
> @@ -215,7 +215,7 @@ int drm_ati_pcigart_init(struct drm_devi
> }
> ret = 0;
>
> -#if defined(__i386__) || defined(__x86_64__)
> +#ifdef CONFIG_X86
> wbinvd();
> #else
> mb();
>
--
~Randy
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] drm/r128: fix build for UML
@ 2021-10-11 8:02 ` Randy Dunlap
0 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2021-10-11 8:02 UTC (permalink / raw)
To: linux-kernel
Cc: David Airlie, Daniel Vetter, dri-devel, Jeff Dike,
Richard Weinberger, Anton Ivanov, linux-um, Sam Ravnborg
On 10/11/21 1:00 AM, 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: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
> 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
> Cc: Sam Ravnborg <sam@ravnborg.org>
> ---
> v2: update Fixes: tag (Johannes)
> Use simple CONFIG_X86 instead of a more complicated expression. (Sam)
>
Oops, apparently I can't count and this is v3... :(
> drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c
> +++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c
> @@ -215,7 +215,7 @@ int drm_ati_pcigart_init(struct drm_devi
> }
> ret = 0;
>
> -#if defined(__i386__) || defined(__x86_64__)
> +#ifdef CONFIG_X86
> wbinvd();
> #else
> mb();
>
--
~Randy
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] drm/r128: fix build for UML
2021-10-11 8:00 ` Randy Dunlap
@ 2021-10-11 17:02 ` Sam Ravnborg
-1 siblings, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2021-10-11 17:02 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, David Airlie, Daniel Vetter, dri-devel, Jeff Dike,
Richard Weinberger, Anton Ivanov, linux-um
On Mon, Oct 11, 2021 at 01:00:06AM -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: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
> 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
> Cc: Sam Ravnborg <sam@ravnborg.org>
Applied to drm-misc-fixes. I was not sure if this was urgent enough for
fixes but since it fixes the UM build I ended up fast tracking it to
master.
Sam
> ---
> v2: update Fixes: tag (Johannes)
> Use simple CONFIG_X86 instead of a more complicated expression. (Sam)
>
> drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c
> +++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c
> @@ -215,7 +215,7 @@ int drm_ati_pcigart_init(struct drm_devi
> }
> ret = 0;
>
> -#if defined(__i386__) || defined(__x86_64__)
> +#ifdef CONFIG_X86
> wbinvd();
> #else
> mb();
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] drm/r128: fix build for UML
@ 2021-10-11 17:02 ` Sam Ravnborg
0 siblings, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2021-10-11 17:02 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, David Airlie, Daniel Vetter, dri-devel, Jeff Dike,
Richard Weinberger, Anton Ivanov, linux-um
On Mon, Oct 11, 2021 at 01:00:06AM -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: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
> 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
> Cc: Sam Ravnborg <sam@ravnborg.org>
Applied to drm-misc-fixes. I was not sure if this was urgent enough for
fixes but since it fixes the UM build I ended up fast tracking it to
master.
Sam
> ---
> v2: update Fixes: tag (Johannes)
> Use simple CONFIG_X86 instead of a more complicated expression. (Sam)
>
> drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c
> +++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c
> @@ -215,7 +215,7 @@ int drm_ati_pcigart_init(struct drm_devi
> }
> ret = 0;
>
> -#if defined(__i386__) || defined(__x86_64__)
> +#ifdef CONFIG_X86
> wbinvd();
> #else
> mb();
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] drm/r128: fix build for UML
2021-10-10 19:49 ` Sam Ravnborg
@ 2021-10-10 20:53 ` Randy Dunlap
-1 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2021-10-10 20:53 UTC (permalink / raw)
To: Sam Ravnborg
Cc: linux-kernel, David Airlie, Daniel Vetter, dri-devel, Jeff Dike,
Richard Weinberger, Anton Ivanov, linux-um
On 10/10/21 12:49 PM, Sam Ravnborg wrote:
> Hi Randy,
>
> On Sun, Oct 10, 2021 at 10:29:55AM -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: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
>> 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
>> ---
>> v2: update Fixes: tag (thanks, Johannes)
>>
>> drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c
>> +++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c
>> @@ -215,7 +215,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();
>
> If we look at drivers/video/fbdev/i810/i810_main.h
> then it looks like we can replace the above with a simple:
> #ifdef CONFIG_X86
> wbinvd();
> #else
> mb();
> #endif
>
> If you think this would work could you try it out.
> It would be nicer with the simpler variant.
Hi Sam,
Good idea, thanks.
OK, I tested it, it works fine.
Will resend the patch later...
> Note: I have no clue what wbinvd() does - seems like some x86 assembler
> specific thingy.
--
~Randy
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] drm/r128: fix build for UML
@ 2021-10-10 20:53 ` Randy Dunlap
0 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2021-10-10 20:53 UTC (permalink / raw)
To: Sam Ravnborg
Cc: linux-kernel, David Airlie, Daniel Vetter, dri-devel, Jeff Dike,
Richard Weinberger, Anton Ivanov, linux-um
On 10/10/21 12:49 PM, Sam Ravnborg wrote:
> Hi Randy,
>
> On Sun, Oct 10, 2021 at 10:29:55AM -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: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
>> 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
>> ---
>> v2: update Fixes: tag (thanks, Johannes)
>>
>> drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c
>> +++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c
>> @@ -215,7 +215,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();
>
> If we look at drivers/video/fbdev/i810/i810_main.h
> then it looks like we can replace the above with a simple:
> #ifdef CONFIG_X86
> wbinvd();
> #else
> mb();
> #endif
>
> If you think this would work could you try it out.
> It would be nicer with the simpler variant.
Hi Sam,
Good idea, thanks.
OK, I tested it, it works fine.
Will resend the patch later...
> Note: I have no clue what wbinvd() does - seems like some x86 assembler
> specific thingy.
--
~Randy
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] drm/r128: fix build for UML
2021-10-10 17:29 ` Randy Dunlap
@ 2021-10-10 19:49 ` Sam Ravnborg
-1 siblings, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2021-10-10 19:49 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, David Airlie, Daniel Vetter, dri-devel, Jeff Dike,
Richard Weinberger, Anton Ivanov, linux-um
Hi Randy,
On Sun, Oct 10, 2021 at 10:29:55AM -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: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
> 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
> ---
> v2: update Fixes: tag (thanks, Johannes)
>
> drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c
> +++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c
> @@ -215,7 +215,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();
If we look at drivers/video/fbdev/i810/i810_main.h
then it looks like we can replace the above with a simple:
#ifdef CONFIG_X86
wbinvd();
#else
mb();
#endif
If you think this would work could you try it out.
It would be nicer with the simpler variant.
Note: I have no clue what wbinvd() does - seems like some x86 assembler
specific thingy.
Sam
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] drm/r128: fix build for UML
@ 2021-10-10 19:49 ` Sam Ravnborg
0 siblings, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2021-10-10 19:49 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, David Airlie, Daniel Vetter, dri-devel, Jeff Dike,
Richard Weinberger, Anton Ivanov, linux-um
Hi Randy,
On Sun, Oct 10, 2021 at 10:29:55AM -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: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
> 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
> ---
> v2: update Fixes: tag (thanks, Johannes)
>
> drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c
> +++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c
> @@ -215,7 +215,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();
If we look at drivers/video/fbdev/i810/i810_main.h
then it looks like we can replace the above with a simple:
#ifdef CONFIG_X86
wbinvd();
#else
mb();
#endif
If you think this would work could you try it out.
It would be nicer with the simpler variant.
Note: I have no clue what wbinvd() does - seems like some x86 assembler
specific thingy.
Sam
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2] drm/r128: fix build for UML
@ 2021-10-10 17:29 ` Randy Dunlap
0 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2021-10-10 17:29 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: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
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
---
v2: update Fixes: tag (thanks, Johannes)
drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c
+++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c
@@ -215,7 +215,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] 12+ messages in thread
* [PATCH v2] drm/r128: fix build for UML
@ 2021-10-10 17:29 ` Randy Dunlap
0 siblings, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2021-10-10 17:29 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: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
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
---
v2: update Fixes: tag (thanks, Johannes)
drivers/gpu/drm/r128/ati_pcigart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c
+++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c
@@ -215,7 +215,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();
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-10-11 17:02 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 8:00 [PATCH v2] drm/r128: fix build for UML Randy Dunlap
2021-10-11 8:00 ` Randy Dunlap
2021-10-11 8:02 ` Randy Dunlap
2021-10-11 8:02 ` Randy Dunlap
2021-10-11 17:02 ` Sam Ravnborg
2021-10-11 17:02 ` Sam Ravnborg
-- strict thread matches above, loose matches on Subject: below --
2021-10-10 17:29 Randy Dunlap
2021-10-10 17:29 ` Randy Dunlap
2021-10-10 19:49 ` Sam Ravnborg
2021-10-10 19:49 ` Sam Ravnborg
2021-10-10 20:53 ` Randy Dunlap
2021-10-10 20:53 ` Randy Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.