From: "Michael S. Tsirkin" <mst@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] posting patches in pull requests (was Re: [PATCH 08/29] cpu: Add qemu_for_each_cpu())
Date: Thu, 2 May 2013 16:51:43 +0300 [thread overview]
Message-ID: <20130502135143.GA1171@redhat.com> (raw)
Anthony, can we please make it a rule that
all patches in pull request are tagged specially?
As it is, patchwork is full of patches that were already reviewed and
merged, all my scripts that were filtering and sorting patches are also
useless, and I get to wade through each patch for the second time.
Maybe you could teach your scripts to ignore [PULL X/Y] where X>0?
This way people could tag all resent patches
as PULL.
Further,
PULL 0/2
PULL 1/2
PULL 2/2
aligns better than
PULL 0/2
PATCH 1/2
PATCH 2/2
On Thu, May 02, 2013 at 03:35:34PM +0200, Andreas Färber wrote:
> From: "Michael S. Tsirkin" <mst@redhat.com>
>
> Wrapper to avoid open-coded loops and to make CPUState iteration
> independent of CPUArchState.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> exec.c | 10 ++++++++++
> include/qom/cpu.h | 9 +++++++++
> 2 files changed, 19 insertions(+)
>
> diff --git a/exec.c b/exec.c
> index fa1e0c3..19725db 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -265,6 +265,16 @@ CPUState *qemu_get_cpu(int index)
> return env ? cpu : NULL;
> }
>
> +void qemu_for_each_cpu(void (*func)(CPUState *cpu, void *data), void *data)
> +{
> + CPUArchState *env = first_cpu;
> +
> + while (env) {
> + func(ENV_GET_CPU(env), data);
> + env = env->next_cpu;
> + }
> +}
> +
> void cpu_exec_init(CPUArchState *env)
> {
> CPUState *cpu = ENV_GET_CPU(env);
> diff --git a/include/qom/cpu.h b/include/qom/cpu.h
> index 1b4de17..a28e5ff 100644
> --- a/include/qom/cpu.h
> +++ b/include/qom/cpu.h
> @@ -216,6 +216,15 @@ bool cpu_is_stopped(CPUState *cpu);
> void run_on_cpu(CPUState *cpu, void (*func)(void *data), void *data);
>
> /**
> + * qemu_for_each_cpu:
> + * @func: The function to be executed.
> + * @data: Data to pass to the function.
> + *
> + * Executes @func for each CPU.
> + */
> +void qemu_for_each_cpu(void (*func)(CPUState *cpu, void *data), void *data);
> +
> +/**
> * qemu_get_cpu:
> * @index: The CPUState@cpu_index value of the CPU to obtain.
> *
> --
> 1.8.1.4
next reply other threads:[~2013-05-02 13:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 13:51 Michael S. Tsirkin [this message]
2013-05-02 14:09 ` [Qemu-devel] posting patches in pull requests (was Re: [PATCH 08/29] cpu: Add qemu_for_each_cpu()) Peter Maydell
2013-05-02 14:17 ` Michael S. Tsirkin
2013-05-02 14:21 ` Peter Maydell
2013-05-02 14:22 ` Michael S. Tsirkin
2013-05-02 14:46 ` Gerd Hoffmann
2013-05-02 14:57 ` Peter Maydell
2013-05-02 15:59 ` Andreas Färber
2013-05-02 16:08 ` Peter Maydell
2013-05-02 16:11 ` Michael S. Tsirkin
2013-05-02 17:09 ` Andreas Färber
2013-05-02 18:15 ` Anthony Liguori
2013-05-02 15:01 ` Stefan Hajnoczi
2013-05-02 15:30 ` Paolo Bonzini
2013-05-02 15:33 ` Peter Maydell
2013-05-02 15:52 ` Anthony Liguori
2013-05-02 15:55 ` Peter Maydell
2013-05-02 16:06 ` Michael S. Tsirkin
2013-05-02 16:59 ` Paolo Bonzini
2013-05-02 18:19 ` Anthony Liguori
2013-05-03 0:15 ` Peter Crosthwaite
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=20130502135143.GA1171@redhat.com \
--to=mst@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/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).