Re: [PATCH v1.1 18/24] versatile_pci: convert to memory API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/11/2011 02:53 PM, Peter Maydell wrote:
On 11 August 2011 17:29, Avi Kivity<avi@xxxxxxxxxx>  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.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux