|
From: | Avi Kivity |
Subject: | Re: [Qemu-devel] [PATCH v1.1 18/24] versatile_pci: convert to memory API |
Date: | Sun, 14 Aug 2011 11:31:16 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 |
On 08/11/2011 02:53 PM, Peter Maydell wrote:
On 11 August 2011 17:29, Avi Kivity<address@hidden> wrote: > -static uint32_t pci_vpb_config_readl (void *opaque, target_phys_addr_t addr) > +static uint64_t pci_vpb_config_read(void *opaque, target_phys_addr_t addr, > + unsigned size) > { > uint32_t val; > - val = pci_data_read(opaque, vpb_pci_config_addr (addr), 4); > + val = pci_data_read(opaque, vpb_pci_config_addr(addr), size); > return val; > } ...actually this looks a bit odd now, because the return type has become uint64_t but val is still uint32_t (though pci_data_read() still returns a uint32_t, so I suppose it's defensible).
I probably should have left 64-bit data width until later. Note the core will never ask a device for 64-bit data unless the device declares it supports it.
I'm not sure why the local is there anyway, so I'd be tempted to just return pci_data_read(...).
I'm making minimal, reviewable changes, not trying to improve things. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
[Prev in Thread] | Current Thread | [Next in Thread] |