From: "Andreas Färber" <afaerber@suse.de>
To: Peter Crosthwaite <crosthwaitepeter@gmail.com>,
qemu-devel@nongnu.org, Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: rth@twiddle.net, ehabkost@redhat.com, aurelien@aurel32.net,
Peter Crosthwaite <crosthwaite.peter@gmail.com>
Subject: Re: [Qemu-devel] [PATCH v3 2/8] cpus: Convert cpu_index into a bitmap
Date: Thu, 02 Jul 2015 17:45:39 +0200 [thread overview]
Message-ID: <55955CA3.2080408@suse.de> (raw)
In-Reply-To: <1434648295-30584-3-git-send-email-crosthwaite.peter@gmail.com>
Am 18.06.2015 um 19:24 schrieb Peter Crosthwaite:
> diff --git a/exec.c b/exec.c
> index 015fa4a..549c209 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -509,21 +509,66 @@ void tcg_cpu_address_space_init(CPUState *cpu, AddressSpace *as)
> }
> #endif
>
> +#ifndef CONFIG_USER_ONLY
> +static DECLARE_BITMAP(cpu_index_map, MAX_CPUMASK_BITS);
> +
> +static int cpu_get_free_index(Error **errp)
> +{
> + int cpu = find_first_zero_bit(cpu_index_map, max_cpus);
> +
> + if (cpu >= max_cpus) {
> + error_setg(errp, "Trying to use more CPUs than allowed max of %d\n",
> + max_cpus);
error_setg() is without \n, fixing.
diff --git a/exec.c b/exec.c
index 53ffb18..e93041f 100644
--- a/exec.c
+++ b/exec.c
@@ -521,7 +521,7 @@ static int cpu_get_free_index(Error **errp)
int cpu = find_first_zero_bit(cpu_index_map, max_cpus);
if (cpu >= max_cpus) {
- error_setg(errp, "Trying to use more CPUs than allowed max of
%d\n",
+ error_setg(errp, "Trying to use more CPUs than allowed max of %d",
max_cpus);
return -1;
}
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-07-02 15:45 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 [this message]
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
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=55955CA3.2080408@suse.de \
--to=afaerber@suse.de \
--cc=aurelien@aurel32.net \
--cc=bharata@linux.vnet.ibm.com \
--cc=crosthwaite.peter@gmail.com \
--cc=crosthwaitepeter@gmail.com \
--cc=ehabkost@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.