Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Andreas Färber
Am 10.05.2013 18:20, schrieb Peter Maydell: > On 10 May 2013 17:14, Andreas Färber wrote: >> Personally I wouldn't oppose dropping these checks for release builds as >> proposed by Paolo in his series; for me, the value of POWERPC_CPU() is >> being closer to an OO cast than any container_of()-styl

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Peter Maydell
On 10 May 2013 17:14, Andreas Färber wrote: > Personally I wouldn't oppose dropping these checks for release builds as > proposed by Paolo in his series; for me, the value of POWERPC_CPU() is > being closer to an OO cast than any container_of()-style expressions. > > But I can also see Anthony's p

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Andreas Färber
Am 10.05.2013 17:32, schrieb Alexander Graf: > > On 10.05.2013, at 17:23, Andreas Färber wrote: > >> Am 10.05.2013 17:06, schrieb Anthony Liguori: >>> Andreas Färber writes: >>> A transition from CPUPPCState to PowerPCCPU can be considered safe, just like PowerPCCPU::env access in the

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Andreas Färber
[resending after bounce] Am 10.05.2013 17:06, schrieb Anthony Liguori: > Andreas Färber writes: > >> 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. >> >>

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 17:06, Anthony Liguori ha scritto: > Andreas Färber writes: > >> 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. >> >> Reported-by: Anthony Li

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 16:47, Andreas Färber ha scritto: > Am 10.05.2013 16:42, schrieb Peter Maydell: >> On 10 May 2013 15:39, Andreas Färber wrote: >>> A transition from CPUPPCState to PowerPCCPU can be considered safe, >>> just like PowerPCCPU::env access in the opposite direction. >>> >>> This should s

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Anthony Liguori
Andreas Färber writes: > 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. > > Reported-by: Anthony Liguori > Signed-off-by: Andreas Färber Another option wou

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Anthony Liguori
Peter Maydell writes: > On 10 May 2013 15:39, Andreas Färber 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_

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Andreas Färber
Am 10.05.2013 16:42, schrieb Peter Maydell: > On 10 May 2013 15:39, Andreas Färber 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 in

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Peter Maydell
On 10 May 2013 15:39, Andreas Färber 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) >

[Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Andreas Färber
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. Reported-by: Anthony Liguori Signed-off-by: Andreas Färber --- target-ppc/cpu-qom.h | 2 +- 1 file changed, 1 inse