From owner-svn-src-all@freebsd.org Thu Dec 22 17:21:09 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1BBFC8C4E5; Thu, 22 Dec 2016 17:21:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9965D1D0F; Thu, 22 Dec 2016 17:21:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id BE39010A745; Thu, 22 Dec 2016 12:21:00 -0500 (EST) From: John Baldwin To: Roger Pau =?ISO-8859-1?Q?Monn=E9?= 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 Date: Thu, 22 Dec 2016 09:20:52 -0800 Message-ID: <1571704.dT3ioqCDCL@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201612221609.uBMG9i3l019183@repo.freebsd.org> References: <201612221609.uBMG9i3l019183@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 22 Dec 2016 12:21:00 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2016 17:21:09 -0000 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