From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Paul Brook <paul@codesourcery.com>
Subject: Re: [Qemu-devel] [PATCH qom-cpu/arm-devs] hw/cpu/a15mpcore: Use qemu_get_cpu() for generic timers
Date: Wed, 28 Aug 2013 17:19:44 +0200 [thread overview]
Message-ID: <521E1510.9090804@suse.de> (raw)
In-Reply-To: <1377103508-13496-1-git-send-email-afaerber@suse.de>
Am 21.08.2013 18:45, schrieb Andreas Färber:
> This simplifies the loop and aids with refactoring of CPU list.
>
> Requested-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> 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
>
> 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 = "arm_gic";
> int i;
> - CPUState *cpu;
>
> if (kvm_irqchip_in_kernel()) {
> gictype = "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 = 0, cpu = first_cpu; i < s->num_cpu; i++, cpu = cpu->next_cpu) {
> - DeviceState *cpudev = DEVICE(cpu);
> + for (i = 0; i < s->num_cpu; i++) {
> + DeviceState *cpudev = DEVICE(qemu_get_cpu(i));
> int ppibase = 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.
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-08-28 15:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 16:45 [Qemu-devel] [PATCH qom-cpu/arm-devs] hw/cpu/a15mpcore: Use qemu_get_cpu() for generic timers Andreas Färber
2013-08-28 15:19 ` Andreas Färber [this message]
2013-08-28 15:22 ` Peter Maydell
2013-08-28 15:35 ` Andreas Färber
2013-08-28 16:11 ` Peter Maydell
2013-08-28 16:16 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=521E1510.9090804@suse.de \
--to=afaerber@suse.de \
--cc=paul@codesourcery.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.