unbreak GENERIC build on amd64; patch by anton@
authorstsp <stsp@openbsd.org>
Wed, 9 Nov 2022 06:32:58 +0000 (06:32 +0000)
committerstsp <stsp@openbsd.org>
Wed, 9 Nov 2022 06:32:58 +0000 (06:32 +0000)
vmm.c:900:3: error: implicit declaration of function 'x86_send_ipi' is
invalid in C99 [-Werror,-Wimplicit-function-declaration]

sys/arch/amd64/amd64/vmm.c

index d47918b..80256ed 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vmm.c,v 1.329 2022/11/08 19:38:34 dlg Exp $   */
+/*     $OpenBSD: vmm.c,v 1.330 2022/11/09 06:32:58 stsp Exp $  */
 /*
  * Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
  *
@@ -877,7 +877,9 @@ vm_intr_pending(struct vm_intr_params *vip)
 {
        struct vm *vm;
        struct vcpu *vcpu;
+#ifdef MULTIPROCESSOR
        struct cpu_info *ci;
+#endif
        int error, ret = 0;
 
        /* Find the desired VM */
@@ -894,10 +896,12 @@ vm_intr_pending(struct vm_intr_params *vip)
                goto out;
        }
 
+#ifdef MULTIPROCESSOR
        vcpu->vc_intr = vip->vip_intr;
        ci = READ_ONCE(vcpu->vc_curcpu);
        if (ci != NULL)
                x86_send_ipi(ci, X86_IPI_NOP);
+#endif
 
        refcnt_rele_wake(&vcpu->vc_refcnt);
 out: