cpu: Add Error argument to cpu_exec_init()
commit5a790cc4b942e651fec7edc597c19b637fad5a76
authorBharata B Rao <bharata@linux.vnet.ibm.com>
Wed, 24 Jun 2015 02:31:12 +0000 (23 19:31 -0700)
committerAndreas Färber <afaerber@suse.de>
Thu, 9 Jul 2015 13:20:40 +0000 (9 15:20 +0200)
treecf9aa2f335e1dbbd9934acf31e88389ab8f286a4
parent291135b5da228e58900c120e12354cc0a23608e3
cpu: Add Error argument to cpu_exec_init()

Add an Error argument to cpu_exec_init() to let users collect the
error. This is in preparation to change the CPU enumeration logic
in cpu_exec_init(). With the new enumeration logic, cpu_exec_init()
can fail if cpu_index values corresponding to max_cpus have already
been handed out.

Since all current callers of cpu_exec_init() are from instance_init,
use error_abort Error argument to abort in case of an error.

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
19 files changed:
exec.c
include/exec/exec-all.h
target-alpha/cpu.c
target-arm/cpu.c
target-cris/cpu.c
target-i386/cpu.c
target-lm32/cpu.c
target-m68k/cpu.c
target-microblaze/cpu.c
target-mips/cpu.c
target-moxie/cpu.c
target-openrisc/cpu.c
target-ppc/translate_init.c
target-s390x/cpu.c
target-sh4/cpu.c
target-sparc/cpu.c
target-tricore/cpu.c
target-unicore32/cpu.c
target-xtensa/cpu.c