[Qemu-devel] [PATCH v2 3/4] ioapic: Cleanup for QOM'ify

2013-11-04 Thread xiaoqiang zhao
some cleanup: 1. ioapic_common.c: rename 'register_types' to 'ioapic_common_register_types' 2. change 'DEVICE(s)' to dev conversion by introducing local variable 'DeviceState *dev' --- hw/i386/kvm/ioapic.c|4 +++- hw/intc/ioapic.c|4 +++- hw/intc/ioapic_common.c |4 ++-- 3

[Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus

2013-11-04 Thread xiaoqiang zhao
changes includes: 1. use type constant for apic and kvm_apic 2. convert function 'init' to QOM's 'realize' for apic/kvm_apic 3. for consistency, also QOM'ify apic's parent bus 'icc_bus' --- hw/cpu/icc_bus.c| 14 ++ hw/i386/kvm/apic.c | 10 +++--- hw

[Qemu-devel] [PATCH v2 1/4] apic: Cleanup for QOM'ify

2013-11-04 Thread xiaoqiang zhao
do some cleanup, includes: 1. remove DO_UPCAST() for APICCommonState 2. Change DeviceState pointers from 'd' to 'dev', better to understand 3. rename 'register_types' to specifically 'apic_common_register_types' --- hw/i386/kvm/apic.c|8 +++ hw/intc/apic.c| 42 +++

[Qemu-devel] [PATCH v2 0/4] QOM'ify apic and ioapic

2013-11-04 Thread xiaoqiang zhao
s since v1: - separate cleanup patch from the rest - add & change some code comment - QOM'ify icc_bus for consistency xiaoqiang zhao (4): apic: Cleanup for QOM'ify apic: QOM'ify apic & icc_bus ioapic: Cleanup for QOM'ify ioapic: QOM'ify ioapic hw/cp

[Qemu-devel] [PATCH v2 4/4] ioapic: QOM'ify ioapic

2013-11-04 Thread xiaoqiang zhao
changes: 1. use type constant for kvm_ioapic and ioapic 2. convert 'init' to QOM's 'realize' for ioapic and kvm_ioapic For QOM'ify, I move variable 'ioapic_no' from static to global. Then we can drop the 'instance_no' argument. Now, it's child that increase 'ioapic_no' counter. --- hw/i386/kvm/ioa

[Qemu-devel] [PATCH v2 1/4] apic: Cleanup for QOM'ify

2013-11-05 Thread xiaoqiang zhao
do some cleanup, includes: 1. remove DO_UPCAST() for APICCommonState 2. Change DeviceState pointers from 'd' to 'dev', better to understand 3. rename 'register_types' to specifically 'apic_common_register_types' --- hw/i386/kvm/apic.c|8 +++ hw/intc/apic.c| 42 +++

[Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus

2013-11-05 Thread xiaoqiang zhao
changes includes: 1. use type constant for apic and kvm_apic 2. convert function 'init' to QOM's 'realize' for apic/kvm_apic 3. for consistency, also QOM'ify apic's parent bus 'icc_bus' --- hw/cpu/icc_bus.c| 14 ++ hw/i386/kvm/apic.c | 10 +++--- hw

[Qemu-devel] [PATCH v2 0/4] QOM'ify apic and ioapic

2013-11-05 Thread xiaoqiang zhao
s since v1: - separate cleanup patch from the rest - add & change some code comment - QOM'ify icc_bus for consistency xiaoqiang zhao (4): apic: Cleanup for QOM'ify apic: QOM'ify apic & icc_bus ioapic: Cleanup for QOM'ify ioapic: QOM'ify ioapic hw/cp

[Qemu-devel] [PATCH v2 3/4] ioapic: Cleanup for QOM'ify

2013-11-05 Thread xiaoqiang zhao
some cleanup: 1. ioapic_common.c: rename 'register_types' to 'ioapic_common_register_types' 2. change 'DEVICE(s)' to dev conversion by introducing local variable 'DeviceState *dev' --- hw/i386/kvm/ioapic.c|4 +++- hw/intc/ioapic.c|4 +++- hw/intc/ioapic_common.c |4 ++-- 3

[Qemu-devel] [PATCH v2 0/4] QOM'ify apic and ioapic

2013-11-05 Thread xiaoqiang zhao
s since v1: - separate cleanup patch from the rest - add & change some code comment - QOM'ify icc_bus for consistency xiaoqiang zhao (4): apic: Cleanup for QOM'ify apic: QOM'ify apic & icc_bus ioapic: Cleanup for QOM'ify ioapic: QOM'ify ioapic hw/cp

[Qemu-devel] [PATCH v2 1/4] apic: Cleanup for QOM'ify

2013-11-05 Thread xiaoqiang zhao
do some cleanup, includes: 1. remove DO_UPCAST() for APICCommonState 2. Change DeviceState pointers from 'd' to 'dev', better to understand 3. rename 'register_types' to specifically 'apic_common_register_types' Signed-off-by: xiaoqiang zhao --- hw/i3

[Qemu-devel] [PATCH v2 3/4] ioapic: Cleanup for QOM'ify

2013-11-05 Thread xiaoqiang zhao
some cleanup: 1. ioapic_common.c: rename 'register_types' to 'ioapic_common_register_types' 2. change 'DEVICE(s)' to dev conversion by introducing local variable 'DeviceState *dev' Signed-off-by: xiaoqiang zhao --- hw/i386/kvm/ioapic.c|4 +++-

[Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus

2013-11-05 Thread xiaoqiang zhao
changes includes: 1. use type constant for apic and kvm_apic 2. convert function 'init' to QOM's 'realize' for apic/kvm_apic 3. for consistency, also QOM'ify apic's parent bus 'icc_bus' Signed-off-by: xiaoqiang zhao --- hw/cpu/icc_bus.c

[Qemu-devel] [PATCH v2 4/4] ioapic: QOM'ify ioapic

2013-11-05 Thread xiaoqiang zhao
child that increase 'ioapic_no' counter. Signed-off-by: xiaoqiang zhao --- hw/i386/kvm/ioapic.c | 13 - hw/intc/ioapic.c | 19 +-- hw/intc/ioapic_common.c | 13 ++--- include/hw/i386/ioapic_internal.h |3 ++

[Qemu-devel] [PATCH v2 4/4] ioapic: QOM'ify ioapic

2013-11-05 Thread xiaoqiang zhao
changes: 1. use type constant for kvm_ioapic and ioapic 2. convert 'init' to QOM's 'realize' for ioapic and kvm_ioapic For QOM'ify, I move variable 'ioapic_no' from static to global. Then we can drop the 'instance_no' argument. Now, it's child that increase 'ioapic_no' counter. --- hw/i386/kvm/ioa

[Qemu-devel] [PATCH v3 3/4] ioapic: Cleanup for QOM'ify

2013-11-05 Thread xiaoqiang zhao
some cleanup: 1. ioapic_common.c: rename 'register_types' to 'ioapic_common_register_types' 2. change 'DEVICE(s)' to dev conversion by introducing local variable 'DeviceState *dev' Signed-off-by: xiaoqiang zhao --- hw/i386/kvm/ioapic.c|4 +++-

[Qemu-devel] [PATCH v3 1/4] apic: Cleanup for QOM'ify

2013-11-05 Thread xiaoqiang zhao
do some cleanup, includes: 1. remove DO_UPCAST() for APICCommonState 2. Change DeviceState pointers from 'd' to 'dev', better to understand 3. rename 'register_types' to specifically 'apic_common_register_types' Signed-off-by: xiaoqiang zhao --- hw/i3

[Qemu-devel] [PATCH v3 2/4] apic: QOM'ify apic & icc_bus

2013-11-05 Thread xiaoqiang zhao
changes includes: 1. use type constant for apic and kvm_apic 2. convert function 'init' to QOM's 'realize' for apic/kvm_apic 3. for consistency, also QOM'ify apic's parent bus 'icc_bus' Signed-off-by: xiaoqiang zhao --- hw/cpu/icc_bus.c

[Qemu-devel] [PATCH v3 4/4] ioapic: QOM'ify ioapic

2013-11-05 Thread xiaoqiang zhao
child that increase 'ioapic_no' counter. Signed-off-by: xiaoqiang zhao --- hw/i386/kvm/ioapic.c | 15 +-- hw/intc/ioapic.c | 19 +-- hw/intc/ioapic_common.c | 13 ++--- include/hw/i386/ioapic_internal.h |

[Qemu-devel] [PATCH v3 0/4] QOM'ify apic and ioapic

2013-11-05 Thread xiaoqiang zhao
nce v2: - fix code style check errors Changes since v1: - separate cleanup patch from the rest - add & change some code comment - QOM'ify icc_bus for consistency xiaoqiang zhao (4): apic: Cleanup for QOM'ify apic: QOM'ify apic & icc_bus ioapic: Cleanup fo

[Qemu-devel] [PATCH 03/14] hw/timmer: QOM'ify exynos4210_mct

2016-01-26 Thread xiaoqiang zhao
assign exynos4210_mct_init to exynos4210_mct_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_mct.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c

[Qemu-devel] [PATCH 04/14] hw/timmer: QOM'ify exynos4210_pwm

2016-01-26 Thread xiaoqiang zhao
assign exynos4210_pwm_init to exynos4210_pwm_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_pwm.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_pwm.c b/hw/timer/exynos4210_pwm.c

[Qemu-devel] [PATCH 02/14] hw/timmer: QOM'ify etraxfs_timer

2016-01-26 Thread xiaoqiang zhao
assign etraxfs_timer_init to etraxfs_timer_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/etraxfs_timer.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/timer/etraxfs_timer.c b/hw/timer/etraxfs_timer.c index

[Qemu-devel] [PATCH 09/14] hw/timmer: QOM'ify milkymist_sysctl

2016-01-26 Thread xiaoqiang zhao
* split milkymist_sysctl_init into milkymist_sysctl_info.instance_init and milkymist_sysctl_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/milkymist-sysctl.c | 19 --- 1 file changed, 12 insertions(+), 7

[Qemu-devel] [PATCH 10/14] hw/timmer: QOM'ify pl031

2016-01-26 Thread xiaoqiang zhao
assign pl031_init to pl031_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/pl031.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/timer/pl031.c b/hw/timer/pl031.c index 34d9b44..b3a2152 100644 --- a/hw/timer

[Qemu-devel] [PATCH 08/14] hw/timmer: QOM'ify m48txx_sysbus

2016-01-26 Thread xiaoqiang zhao
* split m48t59_init1 into m48txx_sysbus_type_info.instance_init and m48t59_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/m48t59.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff

[Qemu-devel] [PATCH 00/14] QOM'ify hw/timmer/*

2016-01-26 Thread xiaoqiang zhao
This patch series QOM'ify timmer code under hw/timmer directory. Main idea is to split the initfn's work, some to TypeInfo.instance_init and some is placed in DeviceClass::realize. We drop the use of SysBusDeviceClass::init if possible. xiaoqiang zhao (14): hw/timmer: QOM'ify

[Qemu-devel] [PATCH 01/14] hw/timmer: QOM'ify arm_timer

2016-01-26 Thread xiaoqiang zhao
* assign icp_pit_init to icp_pit_info.instance_init * split sp804_init into sp804_info.instance_init (sp804_init) and sp804_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/arm_timer.c | 38 +- 1

[Qemu-devel] [PATCH 05/14] hw/timmer: QOM'ify exynos4210_rtc

2016-01-26 Thread xiaoqiang zhao
assign exynos4210_rtc_init to exynos4210_rtc_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_rtc.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_rtc.c b/hw/timer/exynos4210_rtc.c

[Qemu-devel] [PATCH 07/14] hw/timmer: QOM'ify lm32_timer

2016-01-26 Thread xiaoqiang zhao
* split lm32_timer_init into lm32_timer_info.instance_init and lm32_timer_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/lm32_timer.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 06/14] hw/timmer: QOM'ify grlib_gptimer

2016-01-26 Thread xiaoqiang zhao
* split grlib_gptimer_init into grlib_gptimer_info.instance_init and grlib_gptimer_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/grlib_gptimer.c | 30 ++ 1 file changed, 18 insertions(+), 12

[Qemu-devel] [PATCH v2 02/14] hw/timer: QOM'ify etraxfs_timer

2016-01-26 Thread xiaoqiang zhao
assign etraxfs_timer_init to etraxfs_timer_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/etraxfs_timer.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/timer/etraxfs_timer.c b/hw/timer/etraxfs_timer.c index

[Qemu-devel] [PATCH v2 01/14] hw/timer: QOM'ify arm_timer

2016-01-26 Thread xiaoqiang zhao
* assign icp_pit_init to icp_pit_info.instance_init * split sp804_init into sp804_info.instance_init (sp804_init) and sp804_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/arm_timer.c | 38 +- 1

[Qemu-devel] [PATCH v2 00/14] QOM'ify hw/timer/*

2016-01-26 Thread xiaoqiang zhao
This patch series QOM'ify timer code under hw/timer directory. Main idea is to split the initfn's work, some to TypeInfo.instance_init and some is placed in DeviceClass::realize. Drop the use of SysBusDeviceClass::init if possible. changes since v1: fix a stupid typo (timmer->time

[Qemu-devel] [PATCH v2 08/14] hw/timer: QOM'ify m48txx_sysbus

2016-01-26 Thread xiaoqiang zhao
* split m48t59_init1 into m48txx_sysbus_type_info.instance_init and m48t59_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/m48t59.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff

[Qemu-devel] [PATCH v2 07/14] hw/timer: QOM'ify lm32_timer

2016-01-26 Thread xiaoqiang zhao
* split lm32_timer_init into lm32_timer_info.instance_init and lm32_timer_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/lm32_timer.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH v2 04/14] hw/timer: QOM'ify exynos4210_pwm

2016-01-26 Thread xiaoqiang zhao
assign exynos4210_pwm_init to exynos4210_pwm_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_pwm.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_pwm.c b/hw/timer/exynos4210_pwm.c

[Qemu-devel] [PATCH v2 03/14] hw/timer: QOM'ify exynos4210_mct

2016-01-26 Thread xiaoqiang zhao
assign exynos4210_mct_init to exynos4210_mct_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_mct.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c

[Qemu-devel] [PATCH v2 05/14] hw/timer: QOM'ify exynos4210_rtc

2016-01-26 Thread xiaoqiang zhao
assign exynos4210_rtc_init to exynos4210_rtc_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_rtc.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_rtc.c b/hw/timer/exynos4210_rtc.c

[Qemu-devel] [PATCH v2 09/14] hw/timer: QOM'ify milkymist_sysctl

2016-01-26 Thread xiaoqiang zhao
* split milkymist_sysctl_init into milkymist_sysctl_info.instance_init and milkymist_sysctl_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/milkymist-sysctl.c | 19 --- 1 file changed, 12 insertions(+), 7

[Qemu-devel] [PATCH v2 06/14] hw/timer: QOM'ify grlib_gptimer

2016-01-26 Thread xiaoqiang zhao
* split grlib_gptimer_init into grlib_gptimer_info.instance_init and grlib_gptimer_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/grlib_gptimer.c | 30 ++ 1 file changed, 18 insertions(+), 12

[Qemu-devel] [PATCH v2 10/14] hw/timer: QOM'ify pl031

2016-01-26 Thread xiaoqiang zhao
assign pl031_init to pl031_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/pl031.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/timer/pl031.c b/hw/timer/pl031.c index 34d9b44..b3a2152 100644 --- a/hw/timer

[Qemu-devel] [PATCH v2 13/14] hw/timer: QOM'ify slavio_timer

2016-01-26 Thread xiaoqiang zhao
rename slavio_timer_init1 to slavio_timer_init and assign it to slavio_timer_info.instance_init, then we drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/slavio_timer.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer

[Qemu-devel] [PATCH v2 12/14] hw/timer: QOM'ify pxa2xx_timer

2016-01-26 Thread xiaoqiang zhao
* split pxa2xx_timer_init into pxa2xx_timer_type_info.instance_init and pxa2xx_timer_realize * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/pxa2xx_timer.c | 36 +--- 1 file changed, 21 insertions(+), 15

[Qemu-devel] [PATCH v2 11/14] hw/timer: QOM'ify puv3_ost

2016-01-26 Thread xiaoqiang zhao
assign puv3_ost_init to puv3_ost_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/puv3_ost.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/timer/puv3_ost.c b/hw/timer/puv3_ost.c index fa9eefd..0926c06 100644

[Qemu-devel] [PATCH v2 14/14] hw/timer: QOM'ify tusb6010 and remove all tabs

2016-01-26 Thread xiaoqiang zhao
* assign tusb6010_init to tusb6010_info.instance_init and drop the SysBusDeviceClass::init * use spaces instead of tabs Signed-off-by: xiaoqiang zhao --- hw/timer/tusb6010.c | 323 ++-- 1 file changed, 161 insertions(+), 162 deletions(-) diff

[Qemu-devel] [PATCH v3 02/16] hw/timer: QOM'ify arm_timer (pass 2)

2016-02-16 Thread xiaoqiang zhao
assign DeviceClass::vmsd instead of using vmstate_register function Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/arm_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c index 5bd2d75..f1ede5f 100644

[Qemu-devel] [PATCH v3 11/16] hw/timer: QOM'ify milkymist_sysctl

2016-02-16 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/milkymist-sysctl.c | 21 + 1 file changed, 13

[Qemu-devel] [PATCH v3 01/16] hw/timer: QOM'ify arm_timer (pass 1)

2016-02-16 Thread xiaoqiang zhao
* assign icp_pit_init to icp_pit_info.instance_init * split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/arm_timer.c | 40

[Qemu-devel] [PATCH v3 04/16] hw/timer: QOM'ify exynos4210_mct

2016-02-16 Thread xiaoqiang zhao
assign exynos4210_mct_init to exynos4210_mct_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_mct.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/timer/exynos4210_mct.c

[Qemu-devel] [PATCH v3 07/16] hw/timer: QOM'ify grlib_gptimer

2016-02-16 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/grlib_gptimer.c | 30 ++ 1 file changed, 18

[Qemu-devel] [PATCH v3 03/16] hw/timer: QOM'ify etraxfs_timer

2016-02-16 Thread xiaoqiang zhao
assign etraxfs_timer_init to etraxfs_timer_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/etraxfs_timer.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/timer/etraxfs_timer.c b

[Qemu-devel] [PATCH v3 05/16] hw/timer: QOM'ify exynos4210_pwm

2016-02-16 Thread xiaoqiang zhao
assign exynos4210_pwm_init to exynos4210_pwm_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_pwm.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/timer/exynos4210_pwm.c

[Qemu-devel] [PATCH v3 12/16] hw/timer: QOM'ify pl031

2016-02-16 Thread xiaoqiang zhao
assign pl031_init to pl031_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/pl031.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/timer/pl031.c b/hw/timer/pl031.c index d99d18c

[Qemu-devel] [PATCH v3 00/16] QOM'ify hw/timer/*

2016-02-16 Thread xiaoqiang zhao
efine some commit message * use DeviceClass::vmsd instead of vmstate_register to register the VMState if possible changes in v2: fix a stupid typo (timmer->timer) xiaoqiang zhao (16): hw/timer: QOM'ify arm_timer (pass 1) hw/timer: QOM'ify arm_timer (pass 2) hw/timer: QOM'

[Qemu-devel] [PATCH v3 08/16] hw/timer: QOM'ify lm32_timer

2016-02-16 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/lm32_timer.c | 19 --- 1 file changed, 12 insertions

[Qemu-devel] [PATCH v3 13/16] hw/timer: QOM'ify puv3_ost

2016-02-16 Thread xiaoqiang zhao
assign puv3_ost_init to puv3_ost_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/puv3_ost.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/hw/timer/puv3_ost.c b/hw/timer

[Qemu-devel] [PATCH v3 14/16] hw/timer: QOM'ify pxa2xx_timer

2016-02-16 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/pxa2xx_timer.c | 36 +--- 1 file

[Qemu-devel] [PATCH v3 15/16] hw/timer: QOM'ify slavio_timer

2016-02-16 Thread xiaoqiang zhao
rename slavio_timer_init1 to slavio_timer_init and assign it to slavio_timer_info.instance_init, then we drop the SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/slavio_timer.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions

[Qemu-devel] [PATCH v3 09/16] hw/timer: QOM'ify m48txx_sysbus (pass 1)

2016-02-16 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/m48t59.c | 35 ++- 1 file changed, 18

[Qemu-devel] [PATCH v3 10/16] hw/timer: QOM'ify m48txx_sysbus (pass 2)

2016-02-16 Thread xiaoqiang zhao
assign DeviceClass::vmsd instead of using vmstate_register function Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/m48t59.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c index 3c683aa..b0cf79d 100644 --- a

[Qemu-devel] [PATCH v3 06/16] hw/timer: QOM'ify exynos4210_rtc

2016-02-16 Thread xiaoqiang zhao
assign exynos4210_rtc_init to exynos4210_rtc_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_rtc.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/timer/exynos4210_rtc.c

[Qemu-devel] [PATCH v3 16/16] hw/timer: QOM'ify tusb6010

2016-02-16 Thread xiaoqiang zhao
assign tusb6010_init to tusb6010_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/tusb6010.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/timer/tusb6010.c b/hw/timer/tusb6010.c

Re: [Qemu-devel] [PATCH v2 09/14] hw/timer: QOM'ify milkymist_sysctl

2016-02-17 Thread xiaoqiang zhao
I have sent the v3, which fix this problem. > 在 2016年2月16日,02:14,Peter Maydell 写道: > >> On 27 January 2016 at 02:54, xiaoqiang zhao wrote: >> * split milkymist_sysctl_init into milkymist_sysctl_info.instance_init and >> milkymist_sysctl_realize > > I think the &

Re: [Qemu-devel] [PATCH v3 16/16] hw/timer: QOM'ify tusb6010

2016-02-19 Thread xiaoqiang zhao
> 在 2016年2月19日,19:37,Peter Maydell 写道: > > Mmm, I thought this might be related to the MUSB code. > I think this device cannot be converted properly to current > QOM standards until the MUSB code which it relies on has > been converted first. Reasonable !

[Qemu-devel] [PATCH v4 3/9] hw/timer: QOM'ify lm32_timer

2016-02-21 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/lm32_timer.c | 19 --- 1 file changed, 12 insertions

[Qemu-devel] [PATCH v4 2/9] hw/timer: QOM'ify grlib_gptimer

2016-02-21 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/grlib_gptimer.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions

[Qemu-devel] [PATCH v4 9/9] hw/timer: QOM'ify tusb6010

2016-02-21 Thread xiaoqiang zhao
!= NULL) Signed-off-by: xiaoqiang zhao --- hw/timer/tusb6010.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/hw/timer/tusb6010.c b/hw/timer/tusb6010.c index 9f6af90..2d6bdd3 100644 --- a/hw/timer/tusb6010.c +++ b/hw/timer/tusb6010.c @@ -776,21

[Qemu-devel] [PATCH v4 6/9] hw/timer: QOM'ify milkymist_sysctl

2016-02-21 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/milkymist-sysctl.c | 21 + 1 file changed, 13

[Qemu-devel] [PATCH v4 7/9] hw/timer: QOM'ify puv3_ost

2016-02-21 Thread xiaoqiang zhao
assign puv3_ost_init to puv3_ost_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/puv3_ost.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/hw/timer/puv3_ost.c b/hw/timer/puv3_ost.c index 93650b7..72c87ba

[Qemu-devel] [PATCH v4 0/9] QOM'ify hw/timer/*

2016-02-21 Thread xiaoqiang zhao
OBJECT cast * refine some commit message * use DeviceClass::vmsd instead of vmstate_register to register the VMState if possible changes in v2: fix a stupid typo (timmer->timer) xiaoqiang zhao (9): hw/timer: QOM'ify etraxfs_timer hw/timer: QOM'ify grlib_gptimer hw/timer: QOM'ify lm

[Qemu-devel] [PATCH v4 4/9] hw/timer: QOM'ify m48txx_sysbus (pass 1)

2016-02-21 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/m48t59.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions

[Qemu-devel] [PATCH v4 8/9] hw/timer: QOM'ify slavio_timer

2016-02-21 Thread xiaoqiang zhao
rename slavio_timer_init1 to slavio_timer_init and assign it to slavio_timer_info.instance_init, then we drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/slavio_timer.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/timer

[Qemu-devel] [PATCH v4 1/9] hw/timer: QOM'ify etraxfs_timer

2016-02-21 Thread xiaoqiang zhao
assign etraxfs_timer_init to etraxfs_timer_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by: Edgar E. Iglesias Signed-off-by: xiaoqiang zhao --- hw/timer/etraxfs_timer.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/timer

[Qemu-devel] [PATCH v4 5/9] hw/timer: QOM'ify m48txx_sysbus (pass 2)

2016-02-22 Thread xiaoqiang zhao
assign DeviceClass::vmsd instead of using vmstate_register function Signed-off-by: xiaoqiang zhao --- hw/timer/m48t59.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c index 3c683aa..b0cf79d 100644 --- a/hw/timer/m48t59.c +++ b/hw

Re: [Qemu-devel] [PATCH v4 5/9] hw/timer: QOM'ify m48txx_sysbus (pass 2)

2016-02-22 Thread xiaoqiang zhao
>> 在 2016年2月22日,19:03,Peter Maydell 写道: >> >>> On 22 February 2016 at 10:28, hitmoon wrote: >>> 在 2016年02月22日 17:24, Peter Maydell 写道: >>> Just noticed this won't work as it is -- the vmstate >>> struct is for the M48t59State*, but the ISA and >>> Sysbus wrappers have their own structs which ar

Re: [Qemu-devel] [PATCH v4 5/9] hw/timer: QOM'ify m48txx_sysbus (pass 2)

2016-02-22 Thread xiaoqiang zhao
>> 在 2016年2月22日,19:03,Peter Maydell 写道: >> >>> On 22 February 2016 at 10:28, hitmoon wrote: >>> 在 2016年02月22日 17:24, Peter Maydell 写道: >>> Just noticed this won't work as it is -- the vmstate >>> struct is for the M48t59State*, but the ISA and >>> Sysbus wrappers have their own structs which ar

[Qemu-devel] [PATCH v5 1/8] hw/timer: QOM'ify etraxfs_timer

2016-02-25 Thread xiaoqiang zhao
assign etraxfs_timer_init to etraxfs_timer_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by: Edgar E. Iglesias Signed-off-by: xiaoqiang zhao --- hw/timer/etraxfs_timer.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/timer

[Qemu-devel] [PATCH v5 4/8] hw/timer: QOM'ify m48txx_sysbus (pass 2)

2016-02-25 Thread xiaoqiang zhao
assign DeviceClass::vmsd instead of using vmstate_register function Signed-off-by: xiaoqiang zhao --- hw/timer/m48t59.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c index 3c683aa..f5897d8 100644 --- a/hw

[Qemu-devel] [PATCH v5 5/8] hw/timer: QOM'ify milkymist_sysctl

2016-02-25 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/milkymist-sysctl.c | 21 + 1 file changed, 13

[Qemu-devel] [PATCH v5 3/8] hw/timer: QOM'ify m48txx_sysbus (pass 1)

2016-02-25 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/m48t59.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions

[Qemu-devel] [PATCH v5 8/8] hw/timer: QOM'ify grlib_gptimer

2016-02-25 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/grlib_gptimer.c | 32 +++- 1 file changed, 19 insertions(+), 13

[Qemu-devel] [PATCH v5 7/8] hw/timer: QOM'ify slavio_timer

2016-02-25 Thread xiaoqiang zhao
rename slavio_timer_init1 to slavio_timer_init and assign it to slavio_timer_info.instance_init, then we drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/slavio_timer.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/timer

[Qemu-devel] [PATCH v5 2/8] hw/timer: QOM'ify lm32_timer

2016-02-25 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Reviewed-by: Peter Maydell Signed-off-by: xiaoqiang zhao --- hw/timer/lm32_timer.c | 19 --- 1 file changed, 12 insertions

[Qemu-devel] [PATCH v5 6/8] hw/timer: QOM'ify puv3_ost

2016-02-25 Thread xiaoqiang zhao
assign puv3_ost_init to puv3_ost_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/puv3_ost.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/hw/timer/puv3_ost.c b/hw/timer/puv3_ost.c index 93650b7..72c87ba

[Qemu-devel] [PATCH v5 0/8] QOM'ify hw/timer/*

2016-02-25 Thread xiaoqiang zhao
register the VMState if possible changes in v2: fix a stupid typo (timmer->timer) xiaoqiang zhao (8): hw/timer: QOM'ify etraxfs_timer hw/timer: QOM'ify lm32_timer hw/timer: QOM'ify m48txx_sysbus (pass 1) hw/timer: QOM'ify m48txx_sysbus (pass 2) hw/ti

[Qemu-devel] [PATCH] doc/memory.txt: correct a logic error

2016-02-26 Thread xiaoqiang zhao
In the regions overlap example, region B has a higher priority thus should has a larger priority number than C. Signed-off-by: xiaoqiang zhao --- docs/memory.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/memory.txt b/docs/memory.txt index 8745f76..d0aca05

[Qemu-devel] [PATCH 2/2] ioapic use QOM style

2013-09-26 Thread xiaoqiang zhao
Change intc/ioapic kvm/ioapic to use QOM' realizefn. To achive this, I move variable 'ioapic_no' from static to global. Then, ioapic_realize and kvm_ioapic_realize can drop the 'instance_no' argument. Instead of parent, child increase ioapic_no now. Signed-off-by: xia

[Qemu-devel] [PATCH 1/2] kvm/apic: use QOM style

2013-09-26 Thread xiaoqiang zhao
From: "xiaoqiang.zhao" Change apic and kvm/apic to use QOM interface. Includes: 1. APICCommonState now use QOM realizefn 2. Remove DO_UPCAST() for APICCommonState 3. Use type constant 4. Change DeviceState pointers from 'd' to 'dev', sounds better? Signed-off-by

[Qemu-devel] [PATCH] hw/usb: whitespace fix in tusb6010.c

2016-03-02 Thread xiaoqiang zhao
use spaces instead of Tabs Signed-off-by: xiaoqiang zhao --- hw/usb/tusb6010.c | 318 +++--- 1 file changed, 159 insertions(+), 159 deletions(-) diff --git a/hw/usb/tusb6010.c b/hw/usb/tusb6010.c index 9f6af90..4daa3a5 100644 --- a/hw/usb

Re: [Qemu-devel] [PATCH] hw/usb: whitespace fix in tusb6010.c

2016-03-03 Thread xiaoqiang zhao
>> 在 2016年3月3日,21:23,Peter Maydell 写道: >> >> On 3 March 2016 at 06:19, xiaoqiang zhao wrote: >> use spaces instead of Tabs >> >> Signed-off-by: xiaoqiang zhao >> --- >> hw/usb/tusb6010.c | 318 >> +++---

[Qemu-devel] [PATCH 1/9] hw/arm: QOM'ify armv7m.c

2016-03-06 Thread xiaoqiang zhao
Drop the use of old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/arm/armv7m.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index ed7d97f..139247e 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm

[Qemu-devel] [PATCH 2/9] hw/arm: QOM'ify highbank.c

2016-03-06 Thread xiaoqiang zhao
Drop the use of old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/arm/highbank.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index e25cf5e..8f38dff 100644 --- a/hw/arm/highbank.c +++ b

[Qemu-devel] [PATCH 9/9] hw/arm: QOM'ify versatilepb.c

2016-03-06 Thread xiaoqiang zhao
Drop the use of old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/arm/versatilepb.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index d061f0f..a2411e3 100644 --- a/hw/arm

[Qemu-devel] [PATCH 0/9] some QOM'ify work under hw/arm

2016-03-06 Thread xiaoqiang zhao
This patch set trying to QOM'ify code under hw/arm directory. As previous patches to hw/timer/*, we use instance_init instead of the SysBus's init function. xiaoqiang zhao (9): hw/arm: QOM'ify armv7m.c hw/arm: QOM'ify highbank.c hw/arm: QOM'ify integratorcp.c

[Qemu-devel] [PATCH 5/9] hw/arm: QOM'ify pxa2xx_pic.c

2016-03-06 Thread xiaoqiang zhao
Remove the empty 'pxa2xx_pic_initfn' and it's setup code in the 'pxa2xx_pic_class_init' Signed-off-by: xiaoqiang zhao --- hw/arm/pxa2xx_pic.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/hw/arm/pxa2xx_pic.c b/hw/arm/pxa2xx_pic.c index 8a39b1c..9e

[Qemu-devel] [PATCH 4/9] hw/arm: QOM'ify pxa2xx.c

2016-03-06 Thread xiaoqiang zhao
Drop the use of old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/arm/pxa2xx.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index ff6ac7a..8bdffca 100644 --- a/hw/arm/pxa2xx.c

[Qemu-devel] [PATCH 3/9] hw/arm: QOM'ify integratorcp.c

2016-03-06 Thread xiaoqiang zhao
* Drop the use of old SysBus init function and use instance_init * Remove the empty 'icp_pic_class_init' from Typeinfo Signed-off-by: xiaoqiang zhao --- hw/arm/integratorcp.c | 32 1 file changed, 12 insertions(+), 20 deletions(-) diff --gi

[Qemu-devel] [PATCH 7/9] hw/arm: QOM'ify stellaris.c

2016-03-06 Thread xiaoqiang zhao
* Drop the use of old SysBus init function and use instance_init * Use DeviceClass::vmsd instead of 'vmstate_register' function Signed-off-by: xiaoqiang zhao --- hw/arm/stellaris.c | 48 1 file changed, 24 insertions(+), 24 deletion

[Qemu-devel] [PATCH 8/9] hw/arm: QOM'ify strongarm.c

2016-03-06 Thread xiaoqiang zhao
Drop the use of old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao --- hw/arm/strongarm.c | 66 +++--- 1 file changed, 28 insertions(+), 38 deletions(-) diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index 3b17a21

  1   2   3   4   >