From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGKoA-0003Rh-VH for qemu-devel@nongnu.org; Fri, 24 Jun 2016 02:41:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGKo9-0000YW-8r for qemu-devel@nongnu.org; Fri, 24 Jun 2016 02:41:42 -0400 Date: Fri, 24 Jun 2016 16:12:03 +1000 From: David Gibson Message-ID: <20160624061203.GL15625@voom.fritz.box> References: <1466704050-15108-1-git-send-email-nikunj@linux.vnet.ibm.com> <1466704050-15108-3-git-send-email-nikunj@linux.vnet.ibm.com> <20160624051951.GI15625@voom.fritz.box> <87twgjb02h.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="4oF+6Ged69J0+4/e" Content-Disposition: inline In-Reply-To: <87twgjb02h.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> Subject: Re: [Qemu-devel] [PATCH v1 02/11] ppc/xics: Move SPAPR specific code to a separate file 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 --4oF+6Ged69J0+4/e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 24, 2016 at 11:27:58AM +0530, Nikunj A Dadhania wrote: > David Gibson writes: >=20 > > [ Unknown signature status ] > > On Thu, Jun 23, 2016 at 11:17:21PM +0530, Nikunj A Dadhania wrote: > >> From: Benjamin Herrenschmidt > >>=20 > >> Leave the core ICP/ICS logic in xics.c and move the top level > >> class wrapper, hypercall and RTAS handlers to xics_spapr.c > >>=20 > >> Signed-off-by: Benjamin Herrenschmidt > >> [add cpu.h in xics_spapr.c, move set_nr_irqs and set_nr_servers to > >> xics_spapr.c] > >> Signed-off-by: Nikunj A Dadhania > >> --- > >> default-configs/ppc64-softmmu.mak | 1 + > >> hw/intc/Makefile.objs | 1 + > >> hw/intc/xics.c | 418 +----------------------------= ------- > >> hw/intc/xics_spapr.c | 432 +++++++++++++++++++++++++++++= +++++++++ > >> include/hw/ppc/xics.h | 21 ++ > >> 5 files changed, 464 insertions(+), 409 deletions(-) > >> create mode 100644 hw/intc/xics_spapr.c > >>=20 > >> diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64= -softmmu.mak > >> index bb71b23..c4be59f 100644 > >> --- a/default-configs/ppc64-softmmu.mak > >> +++ b/default-configs/ppc64-softmmu.mak > >> @@ -49,6 +49,7 @@ CONFIG_ETSEC=3Dy > >> CONFIG_LIBDECNUMBER=3Dy > >> # For pSeries > >> CONFIG_XICS=3D$(CONFIG_PSERIES) > >> +CONFIG_XICS_SPAPR=3D$(CONFIG_PSERIES) > >> CONFIG_XICS_KVM=3D$(and $(CONFIG_PSERIES),$(CONFIG_KVM)) > >> # For PReP > >> CONFIG_MC146818RTC=3Dy > >> diff --git a/hw/intc/Makefile.objs b/hw/intc/Makefile.objs > >> index c7bbf88..530df2e 100644 > >> --- a/hw/intc/Makefile.objs > >> +++ b/hw/intc/Makefile.objs > >> @@ -30,6 +30,7 @@ obj-$(CONFIG_OPENPIC_KVM) +=3D openpic_kvm.o > >> obj-$(CONFIG_RASPI) +=3D bcm2835_ic.o bcm2836_control.o > >> obj-$(CONFIG_SH4) +=3D sh_intc.o > >> obj-$(CONFIG_XICS) +=3D xics.o > >> +obj-$(CONFIG_XICS_SPAPR) +=3D xics_spapr.o > >> obj-$(CONFIG_XICS_KVM) +=3D xics_kvm.o > >> obj-$(CONFIG_ALLWINNER_A10_PIC) +=3D allwinner-a10-pic.o > >> obj-$(CONFIG_S390_FLIC) +=3D s390_flic.o > >> diff --git a/hw/intc/xics.c b/hw/intc/xics.c > >> index a715532..6ca391f 100644 > >> --- a/hw/intc/xics.c > >> +++ b/hw/intc/xics.c > >> @@ -32,12 +32,11 @@ > >> #include "hw/hw.h" > >> #include "trace.h" > >> #include "qemu/timer.h" > >> -#include "hw/ppc/spapr.h" > >> #include "hw/ppc/xics.h" > >> #include "qemu/error-report.h" > >> #include "qapi/visitor.h" > >> =20 > >> -static int get_cpu_index_by_dt_id(int cpu_dt_id) > >> +int get_cpu_index_by_dt_id(int cpu_dt_id) > > > > If this is made public it needs xics_*() name the current one is too > > generic for a global symbol. >=20 > Sure. Should we also make icp_set_* as xics_icp_set_* then ? I'm happy enough to treat icp_() as sufficient namespacing on its own. >=20 > > > >> { > >> PowerPCCPU *cpu =3D ppc_get_vcpu_by_dt_id(cpu_dt_id); > >> =20 > >> @@ -242,7 +241,7 @@ static void icp_resend(XICSState *icp, int server) > >> ics_resend(icp->ics); > >> } > >> =20 > >> -static void icp_set_cppr(XICSState *icp, int server, uint8_t cppr) > >> +void icp_set_cppr(XICSState *icp, int server, uint8_t cppr) > >> { > >> ICPState *ss =3D icp->ss + server; > >> uint8_t old_cppr; > >> @@ -266,7 +265,7 @@ static void icp_set_cppr(XICSState *icp, int serve= r, uint8_t cppr) > >> } > >> } > >> =20 > >> -static void icp_set_mfrr(XICSState *icp, int server, uint8_t mfrr) > >> +void icp_set_mfrr(XICSState *icp, int server, uint8_t mfrr) > >> { > >> ICPState *ss =3D icp->ss + server; > >> =20 > >> @@ -276,7 +275,7 @@ static void icp_set_mfrr(XICSState *icp, int serve= r, uint8_t mfrr) > >> } > >> } > >> =20 > >> -static uint32_t icp_accept(ICPState *ss) > >> +uint32_t icp_accept(ICPState *ss) > >> { > >> uint32_t xirr =3D ss->xirr; > >> =20 > >> @@ -289,7 +288,7 @@ static uint32_t icp_accept(ICPState *ss) > >> return xirr; > >> } > >> =20 > >> -static void icp_eoi(XICSState *icp, int server, uint32_t xirr) > >> +void icp_eoi(XICSState *icp, int server, uint32_t xirr) > >> { > >> ICPState *ss =3D icp->ss + server; > >> =20 >=20 > Regards > Nikunj >=20 --=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 --4oF+6Ged69J0+4/e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXbM8zAAoJEGw4ysog2bOSwEYQAKXpuGIpMRqAOU7pKdTpTq8d h0H6IYY8DyceACQ5YP3Hwp3OK9LrAi3L+38pbKTHdRfYwLcVPO92YNeXojZEkwLd aL0qnaIGbSF+x/OcO7YC6xVa/eGHn+kpt6Wx4RHCJAjyua9+tYAoma5220f/cizh nyzyaqsoBX0/4F0+EpvC4nJSBGZF49WsMbvAl4MeCiUCSn4EjT/pY3GAOvQ/idpu PgyIvIRmQG/eVAIu0x5LxZ+xeT5shmOHjwKXqfyJ7c83vt8evT5zsr8p97TTx2tA DUNr8IeMxLzQ6exHxseVuBrEExoVOyOXXCO2y1ygVUUk4W3rv6jQGzZ5d6nKZDBI NtbQJ5rz5nvrfZE0fiA9MJiHcvdI5IAGLg6/02KJx31Fq2MyVfhxvUfXw3pUUaQ4 d7Tk/EX4abEmqO1H2uJ55oFWtwKcaDjMubhJ8iMElh8TR7893ztwx6hp8599SWgH tlFPZyltX3knswXJHlG8Xus0WoLvD3qozsUgNRWkYBYAh+Dx7nXeGxDSR9I/vtzM /v3CmYsr89D6LUen+nSC3yIzZbIIn0pWJYpYKJaHEM7ytye2B8j1GDhkW79YofhM pd5X/MNoHtH8zX74lni0gQbKVUileZCFvWl2d9j+OrDqSpASp0avf3gQ+r6RlFaM XJ6mO0X5igZocaZYTr8k =2Cdk -----END PGP SIGNATURE----- --4oF+6Ged69J0+4/e--