[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic c
Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()
Fri, 10 May 2013 16:47:05 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5
Am 10.05.2013 16:42, schrieb Peter Maydell:
> On 10 May 2013 15:39, Andreas Färber <address@hidden> wrote:
>> A transition from CPUPPCState to PowerPCCPU can be considered safe,
>> just like PowerPCCPU::env access in the opposite direction.
>> This should slightly improve interrupt performance.
>> static inline PowerPCCPU *ppc_env_get_cpu(CPUPPCState *env)
>> - return POWERPC_CPU(container_of(env, PowerPCCPU, env));
>> + return container_of(env, PowerPCCPU, env);
> So if this is worthwhile shouldn't we be doing it for
> all our CPUs?
I thought ppc were the exception, but you're right there's 15
occurrences remaining, i.e. all targets do it that way currently.
Don't have time right now for large cross-tree cleanups, so feel free to
profile with and without this patch.
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg