pci rework not quite ready yet?
Jesse Barnes
jbarnes at virtuousgeek.org
Wed Aug 29 08:28:05 PDT 2007
On Wednesday, August 29, 2007 8:11:59 am Jesse Barnes wrote:
> Also, adding this new interface seems like a lot of churn for just dealing
> with cacheability attributes. Maybe it would be best to have a separate,
> madvise-like call to set the attributes instead? The user would be
> required to pass in a range or subrange already mapped by a previous
> mapping call. E.g.
>
> error_t pci_device_set_range_attributes(struct pci_device *dev,
> pciaddr_t offset, size_t size,
> unsigned flags)
>
> This has the added bonus of making error checking easy, e.g. if you try to
> set WC on a range and it fails, you'll still have the mapping but you can
> warn the user that it won't be very performant.
Oops, too much cut & paste. I meant that the API would take one of the
already mapped addresses, so rather than pciaddr_t it should just be a void
*base (using sparse to annotate address spaces would help avoid confusion
here). So:
error_t pci_device_set_range_attributes(struct pci_device *dev,
void *base, size_t size,
unsigned flags)
More information about the xorg
mailing list