From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHjye-0006FL-KC for qemu-devel@nongnu.org; Mon, 27 Jun 2016 23:46:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHjya-0006sy-DL for qemu-devel@nongnu.org; Mon, 27 Jun 2016 23:46:19 -0400 Date: Tue, 28 Jun 2016 13:00:24 +1000 From: David Gibson Message-ID: <20160628030024.GW4242@voom.fritz.box> References: <1466704050-15108-1-git-send-email-nikunj@linux.vnet.ibm.com> <1466704050-15108-10-git-send-email-nikunj@linux.vnet.ibm.com> <20160627042630.GH4242@voom.fritz.box> <87k2hb43bz.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> <878txr3ps5.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="c7rykKtsZvepKFKR" Content-Disposition: inline In-Reply-To: <878txr3ps5.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> Subject: Re: [Qemu-devel] [PATCH v1 09/11] ppc/xics: Split ICS into ics-base and ics class List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikunj A Dadhania Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, clg@kaod.org, Benjamin Herrenschmidt --c7rykKtsZvepKFKR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 27, 2016 at 03:41:06PM +0530, Nikunj A Dadhania wrote: > Nikunj A Dadhania writes: >=20 > > David Gibson writes: > > > >> [ Unknown signature status ] > >> On Thu, Jun 23, 2016 at 11:17:28PM +0530, Nikunj A Dadhania wrote: > >>> From: Benjamin Herrenschmidt > >>>=20 > >>> The existing implementation remains same and ics-base is introduced. > >>>=20 > >>> This will allow different implementations for the source controllers > >>> such as the MSI support of PHB3 on Power8 which uses in-memory state > >>> tables for example. > >>>=20 > >>> Signed-off-by: Benjamin Herrenschmidt > >>> Signed-off-by: Nikunj A Dadhania > >>> --- > >>> hw/intc/xics.c | 101 +++++++++++++++++++++++++++++++++-------= ---------- > >>> hw/intc/xics_spapr.c | 36 ++++++++++-------- > >>> include/hw/ppc/xics.h | 11 +++++- > >>> 3 files changed, 97 insertions(+), 51 deletions(-) > >>>=20 > >>> diff --git a/hw/intc/xics.c b/hw/intc/xics.c > >>> index 326d21f..e2aa48d 100644 > >>> --- a/hw/intc/xics.c > >>> +++ b/hw/intc/xics.c > >>> @@ -220,9 +220,32 @@ static const TypeInfo xics_common_info =3D { > >>> #define XISR(ss) (((ss)->xirr) & XISR_MASK) > >>> #define CPPR(ss) (((ss)->xirr) >> 24) > >>> =20 > >>> -static void ics_reject(ICSState *ics, int nr); > >>> -static void ics_resend(ICSState *ics); > >>> -static void ics_eoi(ICSState *ics, int nr); > >>> +static void ics_base_reject(ICSState *ics, uint32_t nr) > >> > >> AFICT these will actually work for any of the derived classes, since > >> they call the function pointer. So I thin the original name was > >> better than ics_base_*(). > > > > Sure, will change. >=20 > I had a look at this again, we will need to use ics_base_*(), same file > has the implementation of ics_reject() for TYPE_ICS. No, the ics_reject() plain names still work best for the generic versions which call via the function pointers. Instead we should find a new name for the TYPE_ICE implementations. > BenH's patches had renamed the class implementation as ics_simple_*(). > Since we moved to using ICS_BASE, ICS and KVM_ICS, IMHO this seems to > the appropriate names. No. Using ics_base_*() for the generic versions is actively misleading. Using good names for those is more important than what would usually be consistent naming practice for the TYPE_ICS implementation. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --c7rykKtsZvepKFKR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXcehIAAoJEGw4ysog2bOSxuQQAMt6pUA2seSjrycSjkpgrJL7 Tx11engNAGgc0z1z4rV3W4Uocs+4ncO4jXJxvHSL+qsxt0NYLCL47ZsaXmKQ2bzd YBDfWN24wR6OgSPG5vhYVoJkBgNMU5O7LotdxhBN+jted9In2HBARlXGgCBXSrG/ 8OJxWz7Wd/LMWGYRXyox29X2BJqV/WIMTsaXSl7NE09GYXZnm6jRm0av/xWwnxFa aL+3LLWlINvvFr28ED4nJObqxX0l92x09qCYWyt67RswQpq2BVj7CwmwXebALOxe xLTNLI9IAG3Fj2k+VgtGmHbwYOOm1NREG6r1l9C0H2av9ws2WGLr8iK46Yf7/sZ3 Cv8vitPON3Qx8K1rQzpEnZdauW2npg+1XzSULEWFdSZeRjcCnyILXvunV7LpBaw+ /bV+jTlQkNWBblzTXCia3UaAMnpBltrHFsreyjUuyY2mRBFXvVMYvKJsFUbiMLxC n2TGwLoqbw2b8AWgixwoWOpKiOu0FgVAJdblpn9+MyQzcHT0pLtmxrdiYUehSlaF dYif6WgKt+oNv6VmBpPqhfULypIn/7LS+S89TdlrRIyOsvlGYoYtw/X2pwrMU1sT eywfNtBKIR4kbHopppXsqgqFhyLTgyT21/MpV+NP/zvi3f4Z2oABcSMSMBfpQaNu Gl2+mFWVj+IKbR2jYDk0 =LyOJ -----END PGP SIGNATURE----- --c7rykKtsZvepKFKR--