From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4PDy-0002ru-RA for qemu-devel@nongnu.org; Mon, 15 Jun 2015 03:54:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4PDt-0002sf-SJ for qemu-devel@nongnu.org; Mon, 15 Jun 2015 03:54:30 -0400 Date: Mon, 15 Jun 2015 16:55:54 +1000 From: David Gibson Message-ID: <20150615065554.GG13352@voom.redhat.com> References: <1433478358-993-1-git-send-email-bharata@linux.vnet.ibm.com> <1433478358-993-2-git-send-email-bharata@linux.vnet.ibm.com> <557133F0.1040703@ozlabs.ru> <20150605070758.GC25832@in.ibm.com> <55715771.2080103@ozlabs.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/i8j2F0k9BYX4qLc" Content-Disposition: inline In-Reply-To: <55715771.2080103@ozlabs.ru> Subject: Re: [Qemu-devel] [PATCH v4 1/8] spapr: Consider max_cpus during xics initialization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: thuth@redhat.com, mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, tyreld@linux.vnet.ibm.com, bharata@linux.vnet.ibm.com, nfont@linux.vnet.ibm.com --/i8j2F0k9BYX4qLc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 05, 2015 at 06:01:53PM +1000, Alexey Kardashevskiy wrote: > On 06/05/2015 05:07 PM, Bharata B Rao wrote: > >On Fri, Jun 05, 2015 at 03:30:24PM +1000, Alexey Kardashevskiy wrote: > >>On 06/05/2015 02:25 PM, Bharata B Rao wrote: > >>>Use max_cpus instead of smp_cpus when intializating xics system. Also > >>>report max_cpus in ibm,interrupt-server-ranges device tree property of > >>>interrupt controller node. > >>> > >>>Signed-off-by: Bharata B Rao > >>>--- > >>> hw/ppc/spapr.c | 7 +++---- > >>> 1 file changed, 3 insertions(+), 4 deletions(-) > >>> > >>>diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > >>>index acc7233..9270234 100644 > >>>--- a/hw/ppc/spapr.c > >>>+++ b/hw/ppc/spapr.c > >>>@@ -308,7 +308,7 @@ static void *spapr_create_fdt_skel(hwaddr initrd_b= ase, > >>> GString *hypertas =3D g_string_sized_new(256); > >>> GString *qemu_hypertas =3D g_string_sized_new(256); > >>> uint32_t refpoints[] =3D {cpu_to_be32(0x4), cpu_to_be32(0x4)}; > >>>- uint32_t interrupt_server_ranges_prop[] =3D {0, cpu_to_be32(smp_c= pus)}; > >>>+ uint32_t interrupt_server_ranges_prop[] =3D {0, cpu_to_be32(max_c= pus)}; > >>> int smt =3D kvmppc_smt_threads(); > >>> unsigned char vec5[] =3D {0x0, 0x0, 0x0, 0x0, 0x0, 0x80}; > >>> QemuOpts *opts =3D qemu_opts_find(qemu_find_opts("smp-opts"), NU= LL); > >>>@@ -1454,9 +1454,8 @@ static void ppc_spapr_init(MachineState *machine) > >>> > >>> /* Set up Interrupt Controller before we create the VCPUs */ > >>> spapr->icp =3D xics_system_init(machine, > >>>- DIV_ROUND_UP(smp_cpus * kvmppc_smt_= threads(), > >>>- smp_threads), > >>>- XICS_IRQS); > >>>+ DIV_ROUND_UP(max_cpus * kvmppc_smt_= threads(), > >>>+ smp_threads), XICS_IRQ= S); > >> > >> > >>Please do not change the formatting of "XICS_IRQS);". > > > >Hmmm why ? I thought I saved a line! >=20 >=20 > Looks weird. There were 3 parameters, aligned. Now there are two and third > one hides behind DIV_ROUND_UP. And we can afford an extra line ;) >=20 > And this change is not related to what the patch does, the patch does > s/smp_cpus/max_cpus/ and when I see another unrelated change - this confu= ses > me. >=20 >=20 > >Again checkpatch.pl doesn't complain. >=20 > Well, you can ignore me - after all I am not the one to takes these patch= es > further :) I don't think it's that important, but there are a couple of other small things to fix in the series, so you might as well revert the formatting as Alexey suggests at the same time. --=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 --/i8j2F0k9BYX4qLc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVfnb6AAoJEGw4ysog2bOSyacP/3yQxJMQP8s0ZGXPjz/4qfx0 zRT+PgUrOG7NpccyyEwcc9Dz91eig042+zl41k9MV6vJVN29caBHIHO61D+CWWNr 11ZgVJxgDk2fRlwomst1hvfXFzkVXp9q6SRCjEy9pKgTbovfTx2QezdqyFcGFtAg qUeAiYeBsOzki6kLnqunfoxAj4D60vPWzzOhuQFYSf9SBIDZP+MpizlAEq/gsE2p 7Uz/XH4LDHjLI3aj1SPWv0iiMD8T4YVBv+wsOnfYa1kMLT2TsCW0WwFZnxxEoDhx eqzCg62dnkWLNKXtNw2al7iJdG2Eld/HS1haA2qJ4yHZZyfk7dTp6EVLVNPe015c Im6QrYJ4tKGpE1VNJmTuCof/AP2gnipcZjSy+SqplPsGloFgtI3dQ+lOZRz21c2L XnJ2WMz0c3buKzk3cUIm9AHsk5TI4bGF525w90DQnWYSSXdGEROlduIPdqYxc7Wo HXx1xiB0URZVUt06VKiL4xEsHbG1mY6iA1kXwLEN5rmFCCU0uGAG0JaC6UBNKCpo LbRzFTgrDUmRV+YIAesu0raTPVLmLice8dzVzJxcoFtoINpI9ioUe4fynM6A1Qrt AoA9ndfGPdbA21wT4ZlOQ6+zD346Golui8AvimCqvaPyhs6inEh3KiZkxGUowvWF AZ8UKQzWGUQ5mZFvcr/0 =Gst7 -----END PGP SIGNATURE----- --/i8j2F0k9BYX4qLc--