[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1 of 5] fix cpu_physical_memory len
From: |
Andrea Arcangeli |
Subject: |
[Qemu-devel] [PATCH 1 of 5] fix cpu_physical_memory len |
Date: |
Fri, 12 Dec 2008 19:16:43 +0100 |
From: Andrea Arcangeli <address@hidden>
Be consistent and have length be size_t for all methods.
Signed-off-by: Andrea Arcangeli <address@hidden>
---
diff --git a/cpu-all.h b/cpu-all.h
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -911,14 +911,14 @@ CPUReadMemoryFunc **cpu_get_io_memory_re
CPUReadMemoryFunc **cpu_get_io_memory_read(int io_index);
void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
- int len, int is_write);
+ size_t len, int is_write);
static inline void cpu_physical_memory_read(target_phys_addr_t addr,
- uint8_t *buf, int len)
+ uint8_t *buf, size_t len)
{
cpu_physical_memory_rw(addr, buf, len, 0);
}
static inline void cpu_physical_memory_write(target_phys_addr_t addr,
- const uint8_t *buf, int len)
+ const uint8_t *buf, size_t len)
{
cpu_physical_memory_rw(addr, (uint8_t *)buf, len, 1);
}
@@ -936,7 +936,7 @@ void cpu_physical_memory_write_rom(targe
void cpu_physical_memory_write_rom(target_phys_addr_t addr,
const uint8_t *buf, int len);
int cpu_memory_rw_debug(CPUState *env, target_ulong addr,
- uint8_t *buf, int len, int is_write);
+ uint8_t *buf, size_t len, int is_write);
#define VGA_DIRTY_FLAG 0x01
#define CODE_DIRTY_FLAG 0x02
diff --git a/exec.c b/exec.c
--- a/exec.c
+++ b/exec.c
@@ -2839,7 +2839,7 @@ CPUReadMemoryFunc **cpu_get_io_memory_re
/* physical memory access (slow version, mainly for debug) */
#if defined(CONFIG_USER_ONLY)
void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
- int len, int is_write)
+ size_t len, int is_write)
{
int l, flags;
target_ulong page;
@@ -2880,7 +2880,7 @@ void cpu_physical_memory_rw(target_phys_
#else
void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
- int len, int is_write)
+ size_t len, int is_write)
{
int l, io_index;
uint8_t *ptr;
@@ -3232,7 +3232,7 @@ void stq_phys(target_phys_addr_t addr, u
/* virtual memory access for debug */
int cpu_memory_rw_debug(CPUState *env, target_ulong addr,
- uint8_t *buf, int len, int is_write)
+ uint8_t *buf, size_t len, int is_write)
{
int l;
target_phys_addr_t phys_addr;
- Re: [Qemu-devel] Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO, (continued)
- Re: [Qemu-devel] Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO, Ian Jackson, 2008/12/22
- Re: [Qemu-devel] Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO, Avi Kivity, 2008/12/22
- Re: [Qemu-devel] Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO, Avi Kivity, 2008/12/22
- Re: [Qemu-devel] Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO, Thiemo Seufer, 2008/12/22
- Re: [Qemu-devel] Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO, Andrea Arcangeli, 2008/12/22
- Re: [Qemu-devel] Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO, Avi Kivity, 2008/12/23
- [Qemu-devel] Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO, Anthony Liguori, 2008/12/13
- [Qemu-devel] Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO, Avi Kivity, 2008/12/14
[Qemu-devel] [PATCH 4 of 5] dma api, Andrea Arcangeli, 2008/12/12
[Qemu-devel] [PATCH 1 of 5] fix cpu_physical_memory len,
Andrea Arcangeli <=
[Qemu-devel] [PATCH 3 of 5] rename dma.c to isa_dma.c, Andrea Arcangeli, 2008/12/12