Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Dec 2016 09:20:52 -0800
From:      John Baldwin <jhb@freebsd.org>
To:        Roger Pau =?ISO-8859-1?Q?Monn=E9?= <royger@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r310418 - in head/sys: dev/xen/evtchn x86/xen xen
Message-ID:  <1571704.dT3ioqCDCL@ralph.baldwin.cx>
In-Reply-To: <201612221609.uBMG9i3l019183@repo.freebsd.org>
References:  <201612221609.uBMG9i3l019183@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, December 22, 2016 04:09:44 PM Roger Pau Monn=E9 wrote:
> Author: royger
> Date: Thu Dec 22 16:09:44 2016
> New Revision: 310418
> URL: https://svnweb.freebsd.org/changeset/base/310418
>=20
> Log:
>   xen: fix IPI setup with EARLY_AP_STARTUP
>  =20
>   Current Xen IPI setup functions require that the caller provide a d=
evice in
>   order to obtain the name of the interrupt from it. With early AP st=
artup this
>   device is no longer available at the point where IPIs are bound, an=
d a KASSERT
>   would trigger:
>  =20
>   panic: NULL pcpu device_t
>   cpuid =3D 0
>   KDB: stack backtrace:
>   db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffff=
fff82233a20
>   vpanic() at vpanic+0x186/frame 0xffffffff82233aa0
>   kassert_panic() at kassert_panic+0x126/frame 0xffffffff82233b10
>   xen_setup_cpus() at xen_setup_cpus+0x5b/frame 0xffffffff82233b50
>   mi_startup() at mi_startup+0x118/frame 0xffffffff82233b70
>   btext() at btext+0x2c
>  =20
>   Fix this by no longer requiring the presence of a device in order t=
o bind IPIs,
>   and simply use the "cpuX" format where X is the CPU identifier in o=
rder to
>   describe the interrupt.

Thanks for fixing this!

> Modified: head/sys/xen/xen_intr.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
> --- head/sys/xen/xen_intr.h=09Thu Dec 22 15:48:54 2016=09(r310417)
> +++ head/sys/xen/xen_intr.h=09Thu Dec 22 16:09:44 2016=09(r310418)
> @@ -143,7 +143,6 @@ int xen_intr_bind_virq(device_t dev, u_i
>   * interupts and, if successful, associate the port with the specifi=
ed
>   * interrupt handler.
>   *
> - * \param dev       The device making this bind request.
>   * \param cpu       The cpu receiving the IPI.
>   * \param filter    The interrupt filter servicing this IPI.
>   * \param irqflags  Interrupt handler flags.  See sys/bus.h.
> @@ -152,7 +151,7 @@ int xen_intr_bind_virq(device_t dev, u_i
>   *
>   * \returns  0 on success, otherwise an errno.
>   */
> -int xen_intr_alloc_and_bind_ipi(device_t dev, u_int cpu,
> +int xen_intr_alloc_and_bind_ipi(u_int cpu,
>  =09driver_filter_t filter, enum intr_type irqflags,
>  =09xen_intr_handle_t *handlep);
> =20
> @@ -259,7 +258,7 @@ int xen_release_msi(int vector);
>   *
>   * \returns  0 on success, otherwise an errno.
>   */
> -int xen_intr_add_handler(device_t dev, driver_filter_t filter,
> +int xen_intr_add_handler(const char *name, driver_filter_t filter,
>  =09driver_intr_t handler, void *arg, enum intr_type flags,
>  =09xen_intr_handle_t handle);

Does the doxygen comment above this function need the name arg added?

--=20
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1571704.dT3ioqCDCL>