From: SeokYeon Hwang Date: Tue, 10 Sep 2013 07:33:24 +0000 (+0900) Subject: Fix compilation errors on VIGS/YaGL sources X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~749^2~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f141b832a5a74cd3fc714c5223ee5877443fa218;p=sdk%2Femulator%2Fqemu.git Fix compilation errors on VIGS/YaGL sources Change-Id: Ib04d743fb8abc902a7b0d34fc2514ce6b2974939 Signed-off-by: SeokYeon Hwang --- diff --git a/hw/vigs_device.c b/hw/vigs_device.c index 28192febee..1ec0da8ec8 100644 --- a/hw/vigs_device.c +++ b/hw/vigs_device.c @@ -206,15 +206,15 @@ static int vigs_device_init(PCIDevice *dev) pci_config_set_interrupt_pin(dev->config, 1); - memory_region_init_ram(&s->vram_bar, + memory_region_init_ram(&s->vram_bar, OBJECT(s), TYPE_VIGS_DEVICE ".vram", s->vram_size); - memory_region_init_ram(&s->ram_bar, + memory_region_init_ram(&s->ram_bar, OBJECT(s), TYPE_VIGS_DEVICE ".ram", s->ram_size); - memory_region_init_io(&s->io_bar, + memory_region_init_io(&s->io_bar, OBJECT(s), &vigs_io_ops, s, TYPE_VIGS_DEVICE ".io", diff --git a/hw/yagl_device.c b/hw/yagl_device.c index 8bbb5aeff8..1d805a28cf 100644 --- a/hw/yagl_device.c +++ b/hw/yagl_device.c @@ -227,7 +227,7 @@ static int yagl_device_init(PCIDevice *dev) YAGL_LOG_FUNC_ENTER(yagl_device_init, NULL); - memory_region_init_io(&s->iomem, + memory_region_init_io(&s->iomem, OBJECT(s), &yagl_device_ops, s, TYPE_YAGL_DEVICE, diff --git a/hw/yagl_process.c b/hw/yagl_process.c index 6fc526ca5b..3e384288e7 100644 --- a/hw/yagl_process.c +++ b/hw/yagl_process.c @@ -17,8 +17,8 @@ struct yagl_process_state QLIST_INIT(&ps->threads); #ifdef CONFIG_KVM - cpu_synchronize_state(cpu_single_env); - memcpy(&ps->cr[0], &((CPUX86State*)cpu_single_env)->cr[0], sizeof(ps->cr)); + cpu_synchronize_state(current_cpu); + memcpy(&ps->cr[0], &((CPUX86State*)current_cpu)->cr[0], sizeof(ps->cr)); #endif return ps; diff --git a/hw/yagl_thread.c b/hw/yagl_thread.c index 2efb266fa6..b497ccdc93 100644 --- a/hw/yagl_thread.c +++ b/hw/yagl_thread.c @@ -15,7 +15,7 @@ YAGL_DEFINE_TLS(struct yagl_thread_state*, cur_ts); static __inline void yagl_cpu_synchronize_state(struct yagl_process_state *ps) { if (kvm_enabled()) { - memcpy(&((CPUX86State*)cpu_single_env)->cr[0], &ps->cr[0], sizeof(ps->cr)); + memcpy(&((CPUX86State*)current_cpu)->cr[0], &ps->cr[0], sizeof(ps->cr)); } } #else @@ -282,11 +282,11 @@ void yagl_thread_call(struct yagl_thread_state *ts, uint8_t *out_buff, uint8_t *in_buff) { - assert(cpu_single_env); + assert(current_cpu); ts->current_out_buff = out_buff; ts->current_in_buff = in_buff; - ts->current_env = cpu_single_env; + ts->current_env = current_cpu; yagl_cpu_synchronize_state(ts->ps);