Revision c227f099 hw/msix.c
b/hw/msix.c | ||
---|---|---|
123 | 123 |
qemu_set_irq(dev->irq[0], 0); |
124 | 124 |
} |
125 | 125 |
|
126 |
static uint32_t msix_mmio_readl(void *opaque, a_target_phys_addr addr)
|
|
126 |
static uint32_t msix_mmio_readl(void *opaque, target_phys_addr_t addr)
|
|
127 | 127 |
{ |
128 | 128 |
PCIDevice *dev = opaque; |
129 | 129 |
unsigned int offset = addr & (dev->msix_page_size - 1); |
... | ... | |
135 | 135 |
return val; |
136 | 136 |
} |
137 | 137 |
|
138 |
static uint32_t msix_mmio_read_unallowed(void *opaque, a_target_phys_addr addr)
|
|
138 |
static uint32_t msix_mmio_read_unallowed(void *opaque, target_phys_addr_t addr)
|
|
139 | 139 |
{ |
140 | 140 |
fprintf(stderr, "MSI-X: only dword read is allowed!\n"); |
141 | 141 |
return 0; |
... | ... | |
172 | 172 |
return dev->msix_table_page[offset] & MSIX_VECTOR_MASK; |
173 | 173 |
} |
174 | 174 |
|
175 |
static void msix_mmio_writel(void *opaque, a_target_phys_addr addr,
|
|
175 |
static void msix_mmio_writel(void *opaque, target_phys_addr_t addr,
|
|
176 | 176 |
uint32_t val) |
177 | 177 |
{ |
178 | 178 |
PCIDevice *dev = opaque; |
... | ... | |
185 | 185 |
} |
186 | 186 |
} |
187 | 187 |
|
188 |
static void msix_mmio_write_unallowed(void *opaque, a_target_phys_addr addr,
|
|
188 |
static void msix_mmio_write_unallowed(void *opaque, target_phys_addr_t addr,
|
|
189 | 189 |
uint32_t val) |
190 | 190 |
{ |
191 | 191 |
fprintf(stderr, "MSI-X: only dword write is allowed!\n"); |
... | ... | |
221 | 221 |
/* Initialize the MSI-X structures. Note: if MSI-X is supported, BAR size is |
222 | 222 |
* modified, it should be retrieved with msix_bar_size. */ |
223 | 223 |
int msix_init(struct PCIDevice *dev, unsigned short nentries, |
224 |
unsigned bar_nr, unsigned bar_size, a_target_phys_addr page_size)
|
|
224 |
unsigned bar_nr, unsigned bar_size, target_phys_addr_t page_size)
|
|
225 | 225 |
{ |
226 | 226 |
int ret; |
227 | 227 |
/* Nothing to do if MSI is not supported by interrupt controller */ |
Also available in: Unified diff