From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEhXG-0006s5-La for qemu-devel@nongnu.org; Wed, 28 Aug 2013 11:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEhXA-0002jV-Mm for qemu-devel@nongnu.org; Wed, 28 Aug 2013 11:19:54 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48588 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEhXA-0002jL-GE for qemu-devel@nongnu.org; Wed, 28 Aug 2013 11:19:48 -0400 Message-ID: <521E1510.9090804@suse.de> Date: Wed, 28 Aug 2013 17:19:44 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1377103508-13496-1-git-send-email-afaerber@suse.de> In-Reply-To: <1377103508-13496-1-git-send-email-afaerber@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu/arm-devs] hw/cpu/a15mpcore: Use qemu_get_cpu() for generic timers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Paul Brook Am 21.08.2013 18:45, schrieb Andreas F=C3=A4rber: > This simplifies the loop and aids with refactoring of CPU list. >=20 > Requested-by: Peter Maydell > Signed-off-by: Andreas F=C3=A4rber > --- > hw/cpu/a15mpcore.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) Seeing no objection or pick-up from PMM I've applied this to qom-cpu now, to move forward with CPU list refactoring. https://github.com/afaerber/qemu-cpu/commits/qom-cpu Andreas >=20 > diff --git a/hw/cpu/a15mpcore.c b/hw/cpu/a15mpcore.c > index af182da..9abba67 100644 > --- a/hw/cpu/a15mpcore.c > +++ b/hw/cpu/a15mpcore.c > @@ -50,7 +50,6 @@ static int a15mp_priv_init(SysBusDevice *dev) > SysBusDevice *busdev; > const char *gictype =3D "arm_gic"; > int i; > - CPUState *cpu; > =20 > if (kvm_irqchip_in_kernel()) { > gictype =3D "kvm-arm-gic"; > @@ -72,8 +71,8 @@ static int a15mp_priv_init(SysBusDevice *dev) > /* Wire the outputs from each CPU's generic timer to the > * appropriate GIC PPI inputs > */ > - for (i =3D 0, cpu =3D first_cpu; i < s->num_cpu; i++, cpu =3D cpu-= >next_cpu) { > - DeviceState *cpudev =3D DEVICE(cpu); > + for (i =3D 0; i < s->num_cpu; i++) { > + DeviceState *cpudev =3D DEVICE(qemu_get_cpu(i)); > int ppibase =3D s->num_irq - 32 + i * 32; > /* physical timer; we wire it up to the non-secure timer's ID, > * since a real A15 always has TrustZone but QEMU doesn't. >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg