mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST
Now that all of the Property arrays are counted, we can remove the terminator object from each array. Update the assertions in device_class_set_props to match. With struct Property being 88 bytes, this was a rather large form of terminator. Saves 30k from qemu-system-aarch64. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-21-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ebe9685f12
commit
5fcabe628b
556 changed files with 7 additions and 624 deletions
|
@ -375,7 +375,6 @@ static const VMStateDescription vmstate_a9_gtimer = {
|
|||
|
||||
static const Property a9_gtimer_properties[] = {
|
||||
DEFINE_PROP_UINT32("num-cpu", A9GTimerState, num_cpu, 0),
|
||||
DEFINE_PROP_END_OF_LIST()
|
||||
};
|
||||
|
||||
static void a9_gtimer_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -193,7 +193,6 @@ static const Property a10_pit_properties[] = {
|
|||
DEFINE_PROP_UINT32("clk1-freq", AwA10PITState, clk_freq[1], 0),
|
||||
DEFINE_PROP_UINT32("clk2-freq", AwA10PITState, clk_freq[2], 0),
|
||||
DEFINE_PROP_UINT32("clk3-freq", AwA10PITState, clk_freq[3], 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_a10_pit = {
|
||||
|
|
|
@ -302,7 +302,6 @@ static const VMStateDescription vmstate_arm_mptimer = {
|
|||
|
||||
static const Property arm_mptimer_properties[] = {
|
||||
DEFINE_PROP_UINT32("num-cpu", ARMMPTimerState, num_cpu, 0),
|
||||
DEFINE_PROP_END_OF_LIST()
|
||||
};
|
||||
|
||||
static void arm_mptimer_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -390,7 +390,6 @@ static const TypeInfo icp_pit_info = {
|
|||
static const Property sp804_properties[] = {
|
||||
DEFINE_PROP_UINT32("freq0", SP804State, freq0, 1000000),
|
||||
DEFINE_PROP_UINT32("freq1", SP804State, freq1, 1000000),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void sp804_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -677,7 +677,6 @@ static const VMStateDescription vmstate_aspeed_timer_state = {
|
|||
static const Property aspeed_timer_properties[] = {
|
||||
DEFINE_PROP_LINK("scu", AspeedTimerCtrlState, scu, TYPE_ASPEED_SCU,
|
||||
AspeedSCUState *),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void timer_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -546,7 +546,6 @@ static const Property avr_timer16_properties[] = {
|
|||
DEFINE_PROP_UINT8("id", struct AVRTimer16State, id, 0),
|
||||
DEFINE_PROP_UINT64("cpu-frequency-hz", struct AVRTimer16State,
|
||||
cpu_freq_hz, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void avr_timer16_pr(void *opaque, int irq, int level)
|
||||
|
|
|
@ -407,7 +407,6 @@ static const Property grlib_gptimer_properties[] = {
|
|||
DEFINE_PROP_UINT32("frequency", GPTimerUnit, freq_hz, 40000000),
|
||||
DEFINE_PROP_UINT32("irq-line", GPTimerUnit, irq_line, 8),
|
||||
DEFINE_PROP_UINT32("nr-timers", GPTimerUnit, nr_timers, 2),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void grlib_gptimer_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -750,7 +750,6 @@ static const Property hpet_device_properties[] = {
|
|||
DEFINE_PROP_BIT("msi", HPETState, flags, HPET_MSI_SUPPORT, false),
|
||||
DEFINE_PROP_UINT32(HPET_INTCAP, HPETState, intcap, 0),
|
||||
DEFINE_PROP_BOOL("hpet-offset-saved", HPETState, hpet_offset_saved, true),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void hpet_device_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -240,7 +240,6 @@ static const VMStateDescription vmstate_pit_common = {
|
|||
|
||||
static const Property pit_common_properties[] = {
|
||||
DEFINE_PROP_UINT32("iobase", PITCommonState, iobase, -1),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void pit_common_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -265,7 +265,6 @@ static const VMStateDescription vmstate_ibex_timer = {
|
|||
|
||||
static const Property ibex_timer_properties[] = {
|
||||
DEFINE_PROP_UINT32("timebase-freq", IbexTimerState, timebase_freq, 10000),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void ibex_timer_init(Object *obj)
|
||||
|
|
|
@ -283,7 +283,6 @@ static const Property mss_timer_properties[] = {
|
|||
/* Libero GUI shows 100Mhz as default for clocks */
|
||||
DEFINE_PROP_UINT32("clock-frequency", MSSTimerState, freq_hz,
|
||||
100 * 1000000),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void mss_timer_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -381,7 +381,6 @@ static const VMStateDescription vmstate_nrf51_timer = {
|
|||
|
||||
static const Property nrf51_timer_properties[] = {
|
||||
DEFINE_PROP_UINT8("id", NRF51TimerState, id, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void nrf51_timer_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -553,7 +553,6 @@ static const Property pxa25x_timer_dev_properties[] = {
|
|||
DEFINE_PROP_UINT32("freq", PXA2xxTimerInfo, freq, PXA25X_FREQ),
|
||||
DEFINE_PROP_BIT("tm4", PXA2xxTimerInfo, flags,
|
||||
PXA2XX_TIMER_HAVE_TM4, false),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void pxa25x_timer_dev_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -255,7 +255,6 @@ static const VMStateDescription vmstate_rcmt = {
|
|||
|
||||
static const Property rcmt_properties[] = {
|
||||
DEFINE_PROP_UINT64("input-freq", RCMTState, input_freq, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void rcmt_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -465,7 +465,6 @@ static const VMStateDescription vmstate_rtmr = {
|
|||
|
||||
static const Property rtmr_properties[] = {
|
||||
DEFINE_PROP_UINT64("input-freq", RTMRState, input_freq, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void rtmr_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -408,7 +408,6 @@ static const Property sifive_pwm_properties[] = {
|
|||
/* 0.5Ghz per spec after FSBL */
|
||||
DEFINE_PROP_UINT64("clock-frequency", struct SiFivePwmState,
|
||||
freq_hz, 500000000ULL),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void sifive_pwm_init(Object *obj)
|
||||
|
|
|
@ -422,7 +422,6 @@ static void slavio_timer_init(Object *obj)
|
|||
|
||||
static const Property slavio_timer_properties[] = {
|
||||
DEFINE_PROP_UINT32("num_cpus", SLAVIO_TIMERState, num_cpus, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void slavio_timer_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -442,7 +442,6 @@ static const VMStateDescription sse_timer_vmstate = {
|
|||
|
||||
static const Property sse_timer_properties[] = {
|
||||
DEFINE_PROP_LINK("counter", SSETimer, counter, TYPE_SSE_COUNTER, SSECounter *),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void sse_timer_class_init(ObjectClass *klass, void *data)
|
||||
|
|
|
@ -301,7 +301,6 @@ static const VMStateDescription vmstate_stm32f2xx_timer = {
|
|||
static const Property stm32f2xx_timer_properties[] = {
|
||||
DEFINE_PROP_UINT64("clock-frequency", struct STM32F2XXTimerState,
|
||||
freq_hz, 1000000000),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void stm32f2xx_timer_init(Object *obj)
|
||||
|
|
|
@ -245,7 +245,6 @@ static void xilinx_timer_init(Object *obj)
|
|||
static const Property xilinx_timer_properties[] = {
|
||||
DEFINE_PROP_UINT32("clock-frequency", XpsTimerState, freq_hz, 62 * 1000000),
|
||||
DEFINE_PROP_UINT8("one-timer-only", XpsTimerState, one_timer_only, 0),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void xilinx_timer_class_init(ObjectClass *klass, void *data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue