From: "Andreas Färber" <afaerber@suse.de>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
Peter Crosthwaite <crosthwaitepeter@gmail.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
Eduardo Habkost <ehabkost@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v3 8/8] cpu-exec: Purge all uses of ENV_GET_CPU()
Date: Thu, 25 Jun 2015 18:15:50 +0200 [thread overview]
Message-ID: <558C2936.9090004@suse.de> (raw)
In-Reply-To: <558AE9A1.3020005@suse.de>
Am 24.06.2015 um 19:32 schrieb Andreas Färber:
> Am 24.06.2015 um 04:10 schrieb Peter Crosthwaite:
>> On Thu, Jun 18, 2015 at 10:24 AM, Peter Crosthwaite
>> <crosthwaitepeter@gmail.com> 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 = CPU(x86_env_get_cpu(env));
>
> 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 = CPU(x86_env_get_cpu(env));
+ X86CPU *cpu = x86_env_get_cpu(env);
+ CPUState *cs = 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 = cpu_exec(cs);
+ trapnr = cpu_openrisc_exec(cs);
cpu_exec_end(cs);
gdbsig = 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
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)
next prev parent reply other threads:[~2015-06-25 16:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-18 17:24 [Qemu-devel] [PATCH v3 0/8] More core code ENV_GET_CPU removals Peter Crosthwaite
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 1/8] cpus: Add Error argument to cpu_exec_init() Peter Crosthwaite
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 2/8] cpus: Convert cpu_index into a bitmap Peter Crosthwaite
2015-07-02 15:45 ` Andreas Färber
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 3/8] ppc: Move cpu_exec_init() call to realize function Peter Crosthwaite
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 4/8] translate-all: Change tb_flush() env argument to cpu Peter Crosthwaite
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 5/8] gdbserver: _fork: Change fn to accept cpu instead of env Peter Crosthwaite
2015-06-18 19:23 ` Eduardo Habkost
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 6/8] cpus: Change tcg_cpu_exec arg to cpu, not env Peter Crosthwaite
2015-06-18 19:30 ` Eduardo Habkost
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 7/8] cpus: Change exec_init() " Peter Crosthwaite
2015-06-18 19:35 ` Eduardo Habkost
2015-06-24 2:09 ` Peter Crosthwaite
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 8/8] cpu-exec: Purge all uses of ENV_GET_CPU() Peter Crosthwaite
2015-06-24 2:10 ` Peter Crosthwaite
2015-06-24 17:32 ` Andreas Färber
2015-06-24 17:50 ` Peter Crosthwaite
2015-06-25 16:15 ` Andreas Färber [this message]
2015-06-18 19:22 ` [Qemu-devel] [PATCH v3 0/8] More core code ENV_GET_CPU removals Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=558C2936.9090004@suse.de \
--to=afaerber@suse.de \
--cc=aurelien@aurel32.net \
--cc=crosthwaite.peter@gmail.com \
--cc=crosthwaitepeter@gmail.com \
--cc=ehabkost@redhat.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).