diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2014-12-18 23:07:01 -0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2015-02-25 15:00:07 -0300 |
commit | 15258d46baef5f8265ad5f1002905664cf58f051 (patch) | |
tree | b080ff025174a25580b5fbe3651afadfd882b96a /target-i386/cpu.h | |
parent | 644dba250a3ed04079792f0d6cc918fb1483e6a5 (diff) |
target-i386: Eliminate cpu_init() function
Instead of putting extra logic inside cpu.h, just do everything inside
cpu_x86_init_user().
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target-i386/cpu.h')
-rw-r--r-- | target-i386/cpu.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 41d7f0ac6e..d5bd74e16b 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -982,7 +982,6 @@ typedef struct CPUX86State { #include "cpu-qom.h" -X86CPU *cpu_x86_init_user(const char *cpu_model); X86CPU *cpu_x86_create(const char *cpu_model, DeviceState *icc_bridge, Error **errp); int cpu_x86_exec(CPUX86State *s); @@ -1171,14 +1170,9 @@ uint64_t cpu_get_tsc(CPUX86State *env); # define PHYS_ADDR_MASK 0xfffffffffLL # endif -static inline CPUX86State *cpu_init(const char *cpu_model) -{ - X86CPU *cpu = cpu_x86_init_user(cpu_model); - if (cpu == NULL) { - return NULL; - } - return &cpu->env; -} +/* CPU creation function for *-user */ +CPUX86State *cpu_x86_init_user(const char *cpu_model); +#define cpu_init cpu_x86_init_user #define cpu_exec cpu_x86_exec #define cpu_gen_code cpu_x86_gen_code |