summaryrefslogtreecommitdiffstats
path: root/hw/slavio_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/slavio_timer.c')
-rw-r--r--hw/slavio_timer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/slavio_timer.c b/hw/slavio_timer.c
index 5511313687..84449baa71 100644
--- a/hw/slavio_timer.c
+++ b/hw/slavio_timer.c
@@ -48,16 +48,16 @@ typedef struct CPUTimerState {
qemu_irq irq;
ptimer_state *timer;
uint32_t count, counthigh, reached;
- uint64_t limit;
- // processor only
+ /* processor only */
uint32_t running;
+ uint64_t limit;
} CPUTimerState;
typedef struct SLAVIO_TIMERState {
SysBusDevice busdev;
uint32_t num_cpus;
- CPUTimerState cputimer[MAX_CPUS + 1];
uint32_t cputimer_mode;
+ CPUTimerState cputimer[MAX_CPUS + 1];
} SLAVIO_TIMERState;
typedef struct TimerContext {
@@ -381,7 +381,7 @@ static int slavio_timer_init1(SysBusDevice *dev)
TimerContext *tc;
for (i = 0; i <= MAX_CPUS; i++) {
- tc = qemu_mallocz(sizeof(TimerContext));
+ tc = g_malloc0(sizeof(TimerContext));
tc->s = s;
tc->timer_index = i;