diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2010-05-14 16:29:10 +0900 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-05-15 15:45:17 +0000 |
commit | 70166477269d6cb9978a60ede1d570656987d15c (patch) | |
tree | 02caa3787bbfcf548327db977a2f757cd516579a /hw | |
parent | 8e78eb28c6bc532f103857ca485ea4976b3514da (diff) | |
download | qemu-70166477269d6cb9978a60ede1d570656987d15c.zip qemu-70166477269d6cb9978a60ede1d570656987d15c.tar.gz qemu-70166477269d6cb9978a60ede1d570656987d15c.tar.bz2 |
pc: split out cpu initialization from pc_init1() into pc_cpus_init().
split out cpu initialization which is piix independent from pc_init1()
into pc_cpus_init(). Later it will be used.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/pc.c | 31 |
1 files changed, 19 insertions, 12 deletions
@@ -811,6 +811,24 @@ static CPUState *pc_new_cpu(const char *cpu_model) return env; } +static void pc_cpus_init(const char *cpu_model) +{ + int i; + + /* init CPUs */ + if (cpu_model == NULL) { +#ifdef TARGET_X86_64 + cpu_model = "qemu64"; +#else + cpu_model = "qemu32"; +#endif + } + + for(i = 0; i < smp_cpus; i++) { + pc_new_cpu(cpu_model); + } +} + static qemu_irq *pc_allocate_cpu_irq(void) { return qemu_allocate_irqs(pic_irq_request, NULL, 1); @@ -855,18 +873,7 @@ static void pc_init1(ram_addr_t ram_size, linux_boot = (kernel_filename != NULL); - /* init CPUs */ - if (cpu_model == NULL) { -#ifdef TARGET_X86_64 - cpu_model = "qemu64"; -#else - cpu_model = "qemu32"; -#endif - } - - for (i = 0; i < smp_cpus; i++) { - pc_new_cpu(cpu_model); - } + pc_cpus_init(cpu_model); vmport_init(); |