linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] x86/xen: fix 'nopvspin' build error
@ 2021-01-15 19:11 Randy Dunlap
  2021-01-18  5:50 ` Jürgen Groß
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2021-01-15 19:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Randy Dunlap, David Woodhouse, Juergen Gross

Fix build error in x86/xen/ when PARAVIRT_SPINLOCKS is not enabled.

Fixes this build error:

../arch/x86/xen/smp_hvm.c: In function ‘xen_hvm_smp_init’:
../arch/x86/xen/smp_hvm.c:77:3: error: ‘nopvspin’ undeclared (first use in this function)
   nopvspin = true;

Fixes: 3d7746bea925 ("x86/xen: Fix xen_hvm_smp_init() when vector callback not available")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Juergen Gross <jgross@suse.com>
---
I tried to use IS_ENABLED(CONFIG_PARAVIRT_SPINLOCKS) on the if line
and on the nopvspin assignment line but both of those failed for me--
using gcc 7.5.0.

 arch/x86/xen/smp_hvm.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-next-20210115.orig/arch/x86/xen/smp_hvm.c
+++ linux-next-20210115/arch/x86/xen/smp_hvm.c
@@ -74,7 +74,9 @@ void __init xen_hvm_smp_init(void)
 	smp_ops.cpu_die = xen_hvm_cpu_die;
 
 	if (!xen_have_vector_callback) {
+#ifdef CONFIG_PARAVIRT_SPINLOCKS
 		nopvspin = true;
+#endif
 		return;
 	}
 

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

* Re: [PATCH -next] x86/xen: fix 'nopvspin' build error
  2021-01-15 19:11 [PATCH -next] x86/xen: fix 'nopvspin' build error Randy Dunlap
@ 2021-01-18  5:50 ` Jürgen Groß
  0 siblings, 0 replies; 2+ messages in thread
From: Jürgen Groß @ 2021-01-18  5:50 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel; +Cc: David Woodhouse


[-- Attachment #1.1.1: Type: text/plain, Size: 631 bytes --]

On 15.01.21 20:11, Randy Dunlap wrote:
> Fix build error in x86/xen/ when PARAVIRT_SPINLOCKS is not enabled.
> 
> Fixes this build error:
> 
> ../arch/x86/xen/smp_hvm.c: In function ‘xen_hvm_smp_init’:
> ../arch/x86/xen/smp_hvm.c:77:3: error: ‘nopvspin’ undeclared (first use in this function)
>     nopvspin = true;
> 
> Fixes: 3d7746bea925 ("x86/xen: Fix xen_hvm_smp_init() when vector callback not available")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: David Woodhouse <dwmw@amazon.co.uk>
> Cc: Juergen Gross <jgross@suse.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen


[-- Attachment #1.1.2: OpenPGP_0xB0DE9DD628BF132F.asc --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

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

end of thread, other threads:[~2021-01-18  5:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 19:11 [PATCH -next] x86/xen: fix 'nopvspin' build error Randy Dunlap
2021-01-18  5:50 ` Jürgen Groß

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).