Module Name:    src
Committed By:   sborrill
Date:           Thu Aug 10 10:23:54 UTC 2023

Modified Files:
        src/sys/arch/xen/x86 [netbsd-10]: xen_ipi.c

Log Message:
Pull up the following revisions(s) (requested by riastradh in ticket #318):
        sys/arch/xen/x86/xen_ipi.c:     revision 1.41

xen/x86: Fix 'mach cpu N' in ddb by passing the right pointer to a
struct intrframe to IPI handlers.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.40.4.1 src/sys/arch/xen/x86/xen_ipi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/x86/xen_ipi.c
diff -u src/sys/arch/xen/x86/xen_ipi.c:1.40 src/sys/arch/xen/x86/xen_ipi.c:1.40.4.1
--- src/sys/arch/xen/x86/xen_ipi.c:1.40	Wed Jan  5 20:21:29 2022
+++ src/sys/arch/xen/x86/xen_ipi.c	Thu Aug 10 10:23:54 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_ipi.c,v 1.40 2022/01/05 20:21:29 christos Exp $ */
+/* $NetBSD: xen_ipi.c,v 1.40.4.1 2023/08/10 10:23:54 sborrill Exp $ */
 
 /*-
  * Copyright (c) 2011, 2019 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  * Based on: x86/ipi.c
  */
 
-__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.40 2022/01/05 20:21:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.40.4.1 2023/08/10 10:23:54 sborrill Exp $");
 
 #include "opt_ddb.h"
 
@@ -90,18 +90,15 @@ static void (*xen_ipifunc[XEN_NIPIS])(st
 };
 
 static int
-xen_ipi_handler(void *arg)
+xen_ipi_handler(void *arg, struct intrframe *regs)
 {
 	uint32_t pending;
 	int bit;
 	struct cpu_info *ci;
-	struct intrframe *regs;
 
 	ci = curcpu();
-	regs = arg;
 
 	KASSERT(ci == arg);
-	
 	pending = atomic_swap_32(&ci->ci_ipis, 0);
 
 	KDASSERT((pending >> XEN_NIPIS) == 0);
@@ -142,8 +139,9 @@ xen_ipi_init(void)
 	snprintf(intr_xname, sizeof(intr_xname), "%s ipi",
 	    device_xname(ci->ci_dev));
 
-	if (event_set_handler(evtchn, xen_ipi_handler, ci, IPL_HIGH, NULL,
-	    intr_xname, true, ci) == NULL) {
+	if (event_set_handler(evtchn,
+		__FPTRCAST(int (*)(void *), xen_ipi_handler), ci, IPL_HIGH,
+		NULL, intr_xname, true, ci) == NULL) {
 		panic("%s: unable to register ipi handler\n", __func__);
 		/* NOTREACHED */
 	}

Reply via email to