Am 15.01.2012 10:19, schrieb Avi Kivity:
> On 01/13/2012 05:09 AM, Andreas Färber wrote:
>> Convert to new-style read/write callbacks.
>>
>>
>> -static uint32_t PPC_PCIIO_readl (void *opaque, target_phys_addr_t addr)
>> +static uint64_t ppc_pci_io_read(void *opaque, target_phys_addr_t addr,
>> + unsigned int size)
>> {
>> PREPPCIState *s = opaque;
>> - uint32_t val;
>> - val = pci_data_read(s->bus, PPC_PCIIO_config(addr), 4);
>> - return val;
>> + switch (size) {
>> + case 1:
>> + case 2:
>> + case 4:
>> + return pci_data_read(s->bus, PPC_PCIIO_config(addr), size);
>> + default:
>> + abort();
>> + }
>> }
>
> Huh? just call pci_data_read() unconditionally.
Just so that I understand, is that because PReP is 32-bit ppc? In the
above mechanical conversion, size 8 would abort.
BTW did we agree on an indentation style for switch?
Andreas