Revision a8170e5e xen-mapcache.c

b/xen-mapcache.c
53 53
#define mapcache_unlock() ((void)0)
54 54

  
55 55
typedef struct MapCacheEntry {
56
    target_phys_addr_t paddr_index;
56
    hwaddr paddr_index;
57 57
    uint8_t *vaddr_base;
58 58
    unsigned long *valid_mapping;
59 59
    uint8_t lock;
60
    target_phys_addr_t size;
60
    hwaddr size;
61 61
    struct MapCacheEntry *next;
62 62
} MapCacheEntry;
63 63

  
64 64
typedef struct MapCacheRev {
65 65
    uint8_t *vaddr_req;
66
    target_phys_addr_t paddr_index;
67
    target_phys_addr_t size;
66
    hwaddr paddr_index;
67
    hwaddr size;
68 68
    QTAILQ_ENTRY(MapCacheRev) next;
69 69
} MapCacheRev;
70 70

  
......
74 74
    QTAILQ_HEAD(map_cache_head, MapCacheRev) locked_entries;
75 75

  
76 76
    /* For most cases (>99.9%), the page address is the same. */
77
    target_phys_addr_t last_address_index;
77
    hwaddr last_address_index;
78 78
    uint8_t *last_address_vaddr;
79 79
    unsigned long max_mcache_size;
80 80
    unsigned int mcache_bucket_shift;
......
142 142
}
143 143

  
144 144
static void xen_remap_bucket(MapCacheEntry *entry,
145
                             target_phys_addr_t size,
146
                             target_phys_addr_t address_index)
145
                             hwaddr size,
146
                             hwaddr address_index)
147 147
{
148 148
    uint8_t *vaddr_base;
149 149
    xen_pfn_t *pfns;
150 150
    int *err;
151 151
    unsigned int i;
152
    target_phys_addr_t nb_pfn = size >> XC_PAGE_SHIFT;
152
    hwaddr nb_pfn = size >> XC_PAGE_SHIFT;
153 153

  
154 154
    trace_xen_remap_bucket(address_index);
155 155

  
......
195 195
    g_free(err);
196 196
}
197 197

  
198
uint8_t *xen_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size,
198
uint8_t *xen_map_cache(hwaddr phys_addr, hwaddr size,
199 199
                       uint8_t lock)
200 200
{
201 201
    MapCacheEntry *entry, *pentry = NULL;
202
    target_phys_addr_t address_index;
203
    target_phys_addr_t address_offset;
204
    target_phys_addr_t __size = size;
202
    hwaddr address_index;
203
    hwaddr address_offset;
204
    hwaddr __size = size;
205 205
    bool translated = false;
206 206

  
207 207
tryagain:
......
278 278
{
279 279
    MapCacheEntry *entry = NULL;
280 280
    MapCacheRev *reventry;
281
    target_phys_addr_t paddr_index;
282
    target_phys_addr_t size;
281
    hwaddr paddr_index;
282
    hwaddr size;
283 283
    int found = 0;
284 284

  
285 285
    QTAILQ_FOREACH(reventry, &mapcache->locked_entries, next) {
......
316 316
{
317 317
    MapCacheEntry *entry = NULL, *pentry = NULL;
318 318
    MapCacheRev *reventry;
319
    target_phys_addr_t paddr_index;
320
    target_phys_addr_t size;
319
    hwaddr paddr_index;
320
    hwaddr size;
321 321
    int found = 0;
322 322

  
323 323
    QTAILQ_FOREACH(reventry, &mapcache->locked_entries, next) {

Also available in: Unified diff