From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4BNa-00081U-Lx for qemu-devel@nongnu.org; Tue, 30 Jul 2013 10:58:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4BNT-0004g8-CE for qemu-devel@nongnu.org; Tue, 30 Jul 2013 10:58:26 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43047 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4BNT-0004fw-6A for qemu-devel@nongnu.org; Tue, 30 Jul 2013 10:58:19 -0400 Message-ID: <51F7D487.5010501@suse.de> Date: Tue, 30 Jul 2013 16:58:15 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1370626087-840-1-git-send-email-jjherne@us.ibm.com> <1370626087-840-9-git-send-email-jjherne@us.ibm.com> <51B3D647.6090400@suse.de> <51F6C585.4070109@linux.vnet.ibm.com> <20130730092402.3c7d84f7@nial.usersys.redhat.com> <51F7CD4E.2050003@linux.vnet.ibm.com> <20130730165025.3ee37293@nial.usersys.redhat.com> In-Reply-To: <20130730165025.3ee37293@nial.usersys.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 8/8] [PATCH RFC v2] s390-qemu: cpu hotplug - Treat S390 cpus as devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: ehabkost@redhat.com, agraf@suse.de, qemu-devel@nongnu.org, borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, jjherne@linux.vnet.ibm.com, Cornelia Huck , "Jason J. Herne" Am 30.07.2013 16:50, schrieb Igor Mammedov: > On Tue, 30 Jul 2013 10:27:26 -0400 > "Jason J. Herne" wrote: >> On 07/30/2013 03:24 AM, Igor Mammedov wrote: >> Is there an easier way of getting the count besides this? >> >> int cpu_count =3D 0; >> for (cpu =3D first_cpu; cpu !=3D NULL; cpu =3D cpu->next_cpu) { >> cpu_count++; >> } >=20 > maybe qemu_for_each_cpu(), direct access to first_cpu & co is not encou= raged. Negative: qemu_for_each_cpu() is discouraged, first_cpu and next_cpu are okay. I need to send out my patch introducing CPU_FOREACH() macro based on QTAILQ_FOREACH(), preview on qom-cpu-12 branch. Markus wanted to rip out qemu_for_each_cpu() - also on that branch - but mst wanted both to coexist. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg