Revision c76bc480
b/include/exec/ioport.h | ||
---|---|---|
64 | 64 |
struct MemoryRegion **regions; |
65 | 65 |
void *opaque; |
66 | 66 |
const char *name; |
67 |
bool flush_coalesced_mmio; |
|
67 | 68 |
} PortioList; |
68 | 69 |
|
69 | 70 |
void portio_list_init(PortioList *piolist, Object *owner, |
70 | 71 |
const struct MemoryRegionPortio *callbacks, |
71 | 72 |
void *opaque, const char *name); |
73 |
void portio_list_set_flush_coalesced(PortioList *piolist); |
|
72 | 74 |
void portio_list_destroy(PortioList *piolist); |
73 | 75 |
void portio_list_add(PortioList *piolist, |
74 | 76 |
struct MemoryRegion *address_space, |
b/ioport.c | ||
---|---|---|
139 | 139 |
piolist->opaque = opaque; |
140 | 140 |
piolist->owner = owner; |
141 | 141 |
piolist->name = name; |
142 |
piolist->flush_coalesced_mmio = false; |
|
143 |
} |
|
144 |
|
|
145 |
void portio_list_set_flush_coalesced(PortioList *piolist) |
|
146 |
{ |
|
147 |
piolist->flush_coalesced_mmio = true; |
|
142 | 148 |
} |
143 | 149 |
|
144 | 150 |
void portio_list_destroy(PortioList *piolist) |
... | ... | |
231 | 237 |
*/ |
232 | 238 |
memory_region_init_io(&mrpio->mr, piolist->owner, &portio_ops, mrpio, |
233 | 239 |
piolist->name, off_high - off_low); |
240 |
if (piolist->flush_coalesced_mmio) { |
|
241 |
memory_region_set_flush_coalesced(&mrpio->mr); |
|
242 |
} |
|
234 | 243 |
memory_region_add_subregion(piolist->address_space, |
235 | 244 |
start + off_low, &mrpio->mr); |
236 | 245 |
piolist->regions[piolist->nr] = &mrpio->mr; |
Also available in: Unified diff