From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z89oi-00039F-De for qemu-devel@nongnu.org; Thu, 25 Jun 2015 12:15:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z89oe-0002WP-Py for qemu-devel@nongnu.org; Thu, 25 Jun 2015 12:15:56 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56441 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z89oe-0002W5-F0 for qemu-devel@nongnu.org; Thu, 25 Jun 2015 12:15:52 -0400 Message-ID: <558C2936.9090004@suse.de> Date: Thu, 25 Jun 2015 18:15:50 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1434648295-30584-1-git-send-email-crosthwaite.peter@gmail.com> <1434648295-30584-9-git-send-email-crosthwaite.peter@gmail.com> <558AE9A1.3020005@suse.de> In-Reply-To: <558AE9A1.3020005@suse.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 8/8] cpu-exec: Purge all uses of ENV_GET_CPU() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , Peter Crosthwaite Cc: Aurelien Jarno , Peter Crosthwaite , "qemu-devel@nongnu.org Developers" , Eduardo Habkost , Richard Henderson Am 24.06.2015 um 19:32 schrieb Andreas F=C3=A4rber: > Am 24.06.2015 um 04:10 schrieb Peter Crosthwaite: >> On Thu, Jun 18, 2015 at 10:24 AM, Peter Crosthwaite >> wrote: >>> diff --git a/bsd-user/main.c b/bsd-user/main.c >>> index 45a1436..7196285 100644 >>> --- a/bsd-user/main.c >>> +++ b/bsd-user/main.c >>> @@ -166,6 +166,7 @@ static void set_idt(int n, unsigned int dpl) >>> >>> void cpu_loop(CPUX86State *env) >>> { >>> + CPUState *cs =3D CPU(x86_env_get_cpu(env)); >=20 > An (unwritten?) convention has been to avoid double-casts by having an > explicit X86CPU *cpu variable. diff --git a/bsd-user/main.c b/bsd-user/main.c index 7196285..f46728b 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -166,7 +166,8 @@ static void set_idt(int n, unsigned int dpl) void cpu_loop(CPUX86State *env) { - CPUState *cs =3D CPU(x86_env_get_cpu(env)); + X86CPU *cpu =3D x86_env_get_cpu(env); + CPUState *cs =3D CPU(cpu); int trapnr; abi_ulong pc; //target_siginfo_t info; And another nit while touching that line: diff --git a/linux-user/main.c b/linux-user/main.c index 8c4634a..6f07644 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -2655,7 +2655,7 @@ void cpu_loop(CPUOpenRISCState *env) for (;;) { cpu_exec_start(cs); - trapnr =3D cpu_exec(cs); + trapnr =3D cpu_openrisc_exec(cs); cpu_exec_end(cs); gdbsig =3D 0; uc32 is dancing out of line, too, but I actually like its naming better and renaming would be a separate patch either way. Regards, Andreas --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Felix Imend=C3=B6rffer, Jane Smithard, Dilip Upmanyu, Graham Norton; = HRB 21284 (AG N=C3=BCrnberg)