qemu-devel
[Top][All Lists]
Advanced

[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


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()
Date: Fri, 10 May 2013 10:02:02 -0500
User-agent: Notmuch/0.15.2+77~g661dcf8 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu)

Peter Maydell <address@hidden> writes:

> 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?

Ack.

Regards,

Anthony Liguori

>
> thanks
> -- PMM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]