qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()
@ 2013-05-10 14:39 Andreas Färber
  2013-05-10 14:42 ` Peter Maydell
  2013-05-10 15:06 ` Anthony Liguori
  0 siblings, 2 replies; 11+ messages in thread
From: Andreas Färber @ 2013-05-10 14:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: aliguori, Alexander Graf, open list:PowerPC, pbonzini,
	Andreas Färber, aurelien

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 <aliguori@us.ibm.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 target-ppc/cpu-qom.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-ppc/cpu-qom.h b/target-ppc/cpu-qom.h
index eb03a00..f62181f 100644
--- a/target-ppc/cpu-qom.h
+++ b/target-ppc/cpu-qom.h
@@ -91,7 +91,7 @@ typedef struct PowerPCCPU {
 
 static inline PowerPCCPU *ppc_env_get_cpu(CPUPPCState *env)
 {
-    return POWERPC_CPU(container_of(env, PowerPCCPU, env));
+    return container_of(env, PowerPCCPU, env);
 }
 
 #define ENV_GET_CPU(e) CPU(ppc_env_get_cpu(e))
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-05-10 16:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-10 14:39 [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu() Andreas Färber
2013-05-10 14:42 ` Peter Maydell
2013-05-10 14:47   ` Andreas Färber
2013-05-10 15:07     ` Paolo Bonzini
2013-05-10 15:02   ` Anthony Liguori
2013-05-10 15:06 ` Anthony Liguori
2013-05-10 15:08   ` Paolo Bonzini
2013-05-10 15:54   ` Andreas Färber
     [not found]   ` <518D10E3.4080001@suse.de>
     [not found]     ` <14CF0363-E558-4387-A401-14C940131BDB@suse.de>
2013-05-10 16:14       ` Andreas Färber
2013-05-10 16:20         ` Peter Maydell
2013-05-10 16:40           ` Andreas Färber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).