From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaobJ-0001LU-Fg for qemu-devel@nongnu.org; Fri, 10 May 2013 10:47:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaobE-00036L-SU for qemu-devel@nongnu.org; Fri, 10 May 2013 10:47:13 -0400 Message-ID: <518D0869.9020009@suse.de> Date: Fri, 10 May 2013 16:47:05 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1368196799-19982-1-git-send-email-afaerber@suse.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [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: Peter Maydell Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, Alexander Graf , PowerPC , pbonzini@redhat.com, aurelien@aurel32.net Am 10.05.2013 16:42, schrieb Peter Maydell: > On 10 May 2013 15:39, Andreas F=C3=A4rber 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. >=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 > 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. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg