[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequ
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence |
Date: |
Mon, 6 Aug 2012 10:31:53 +1000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Aug 03, 2012 at 05:13:48PM +0200, Andreas Färber wrote:
> Am 03.08.2012 04:31, schrieb David Gibson:
> > On Thu, Aug 02, 2012 at 05:44:49PM +0200, Andreas Färber wrote:
> >> Am 02.08.2012 04:10, schrieb David Gibson:
[snip]
> >>> -static void spapr_cpu_reset(void *opaque)
> >>> -{
> >>> - PowerPCCPU *cpu = opaque;
> >>> - CPUPPCState *env = &cpu->env;
> >>> + PowerPCCPU *cpu = container_of(env, PowerPCCPU, env);
> >>
> >> NACK. Please don't undo the cleanups I have applied! Functions should
> >> take a QOM PowerPCCPU, not its internal CPUPPCState. Fields are
> >> gradually being moved from CPUxxxState into CPUState.
> >
> > Um, ok. So how do I iterate the PowerPCCPUs instead of the CPUPPCStates?
>
> You can't, yet. The QOM CPUState part 4 series (that got stalled due to
> APIC modelling) moved quite some fields to CPUState but not enough to
> change the first_cpu type despite the really long (74?) series.
>
> So the solution here is to iterate the CPUPPCState, call
> ppc_env_get_cpu() on it and pass that as opaque as before.
So, move the container_of to the caller and use the wrapper for it (I
thought one might exist, but I hadn't spotted it). Ok, I can do that.
> I could add a cpu_foreach() function though if that helps in the
> meantime? Either way the idea is to limit the number of places to touch
> in the upcoming refactorings.
If you like, but I'm not planning to delay these patches to wait for
it.
--
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
- Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence, (continued)
- Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence, Benjamin Herrenschmidt, 2012/08/07
- Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence, Andreas Färber, 2012/08/07
- Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence, Anthony Liguori, 2012/08/07
- Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence, Peter Maydell, 2012/08/08
- Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence, David Gibson, 2012/08/08
- Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence, David Gibson, 2012/08/07
- Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence, Andreas Färber, 2012/08/08
- Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence, David Gibson, 2012/08/08
- Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence, David Gibson, 2012/08/02
- Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence, Andreas Färber, 2012/08/03
- Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence,
David Gibson <=
[Qemu-devel] [PATCH 1/2] Allow QEMUMachine to override reset sequencing, David Gibson, 2012/08/01
Re: [Qemu-devel] [PATCH 1/2] Allow QEMUMachine to override reset sequencing, David Gibson, 2012/08/02
Re: [Qemu-devel] [PATCH 1/2] Allow QEMUMachine to override reset sequencing, Lluís Vilanova, 2012/08/02