Pull up the following revisions(s) (requested by riastradh in ticket #1713):

sys/arch/xen/x86/xen_ipi.c:	revision 1.41 via patch

xen/x86: Fix 'mach cpu N' in ddb by passing the right pointer to a
struct intrframe to IPI handlers.
This commit is contained in:
sborrill 2023-08-10 10:30:28 +00:00
parent 83fe2023fe
commit baccf6d6be
1 changed files with 6 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: xen_ipi.c,v 1.32 2019/02/02 12:32:55 cherry Exp $ */
/* $NetBSD: xen_ipi.c,v 1.32.4.1 2023/08/10 10:30:28 sborrill Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -33,10 +33,10 @@
/*
* Based on: x86/ipi.c
* __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.32 2019/02/02 12:32:55 cherry Exp $");
* __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.32.4.1 2023/08/10 10:30:28 sborrill Exp $");
*/
__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.32 2019/02/02 12:32:55 cherry Exp $");
__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.32.4.1 2023/08/10 10:30:28 sborrill Exp $");
#include "opt_ddb.h"
@ -87,16 +87,13 @@ static void (*ipifunc[XEN_NIPIS])(struct cpu_info *, struct intrframe *) =
};
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;
pending = atomic_swap_32(&ci->ci_ipis, 0);
KDASSERT((pending >> XEN_NIPIS) == 0);
@ -138,7 +135,8 @@ xen_ipi_init(void)
device_xname(ci->ci_dev));
if (xen_intr_establish_xname(-1, &xen_pic, evtchn, IST_LEVEL, IPL_HIGH,
xen_ipi_handler, ci, true, intr_xname) == NULL) {
(int (*)(void *))xen_ipi_handler, ci, true, intr_xname)
== NULL) {
panic("%s: unable to register ipi handler\n", __func__);
/* NOTREACHED */
}