On Thursday, December 22, 2016 04:09:44 PM Roger Pau Monné wrote:
> Author: royger
> Date: Thu Dec 22 16:09:44 2016
> New Revision: 310418
> URL: https://svnweb.freebsd.org/changeset/base/310418
> 
> Log:
>   xen: fix IPI setup with EARLY_AP_STARTUP
>   
>   Current Xen IPI setup functions require that the caller provide a device in
>   order to obtain the name of the interrupt from it. With early AP startup 
> this
>   device is no longer available at the point where IPIs are bound, and a 
> KASSERT
>   would trigger:
>   
>   panic: NULL pcpu device_t
>   cpuid = 0
>   KDB: stack backtrace:
>   db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 
> 0xffffffff82233a20
>   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
>   
>   Fix this by no longer requiring the presence of a device in order to bind 
> IPIs,
>   and simply use the "cpuX" format where X is the CPU identifier in order to
>   describe the interrupt.

Thanks for fixing this!

> Modified: head/sys/xen/xen_intr.h
> ==============================================================================
> --- head/sys/xen/xen_intr.h   Thu Dec 22 15:48:54 2016        (r310417)
> +++ head/sys/xen/xen_intr.h   Thu Dec 22 16:09:44 2016        (r310418)
> @@ -143,7 +143,6 @@ int xen_intr_bind_virq(device_t dev, u_i
>   * interupts and, if successful, associate the port with the specified
>   * 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,
>       driver_filter_t filter, enum intr_type irqflags,
>       xen_intr_handle_t *handlep);
>  
> @@ -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,
>       driver_intr_t handler, void *arg, enum intr_type flags,
>       xen_intr_handle_t handle);

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

-- 
John Baldwin
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to