From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaoUW-0004W1-Mn for qemu-devel@nongnu.org; Fri, 10 May 2013 10:40:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaoUR-00019P-Th for qemu-devel@nongnu.org; Fri, 10 May 2013 10:40:12 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Fri, 10 May 2013 16:39:59 +0200 Message-Id: <1368196799-19982-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, Alexander Graf , "open list:PowerPC" , pbonzini@redhat.com, =?UTF-8?q?Andreas=20F=C3=A4rber?= , aurelien@aurel32.net 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=C3=A4rber --- 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 { =20 static inline PowerPCCPU *ppc_env_get_cpu(CPUPPCState *env) { - return POWERPC_CPU(container_of(env, PowerPCCPU, env)); + return container_of(env, PowerPCCPU, env); } =20 #define ENV_GET_CPU(e) CPU(ppc_env_get_cpu(e)) --=20 1.8.1.4