diff options
author | Stefan Weil <sw@weilnetz.de> | 2014-04-07 20:28:23 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-04-27 13:04:18 +0400 |
commit | eb6282f230b75eca057dd3b3027f1bfa100bef9c (patch) | |
tree | 3e4760b4bcdd73841abf29638c4f3766ca478e60 /hw/intc/apic.c | |
parent | 411f491e0af173cf8f39347574941bd26fbae381 (diff) |
misc: Use cpu_physical_memory_read and cpu_physical_memory_write
These functions don't need type casts (as does cpu_physical_memory_rw)
and also make the code better readable.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/intc/apic.c')
-rw-r--r-- | hw/intc/apic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/intc/apic.c b/hw/intc/apic.c index b8c061bdaa..2f40cbad2d 100644 --- a/hw/intc/apic.c +++ b/hw/intc/apic.c @@ -98,8 +98,8 @@ static void apic_sync_vapic(APICCommonState *s, int sync_type) return; } if (sync_type & SYNC_FROM_VAPIC) { - cpu_physical_memory_rw(s->vapic_paddr, (void *)&vapic_state, - sizeof(vapic_state), 0); + cpu_physical_memory_read(s->vapic_paddr, &vapic_state, + sizeof(vapic_state)); s->tpr = vapic_state.tpr; } if (sync_type & (SYNC_TO_VAPIC | SYNC_ISR_IRR_TO_VAPIC)) { |