On Thu, 2011-10-06 at 20:51:26 -0700, Jeremy Huddleston wrote:
> This allows platforms to hand back mmaps of the low 1M (ISA) address
> space on a per-domain basis.

> diff --git a/src/common_interface.c b/src/common_interface.c
> index 94a0d21..e4fb66e 100644
> --- a/src/common_interface.c
> +++ b/src/common_interface.c
[...]
> +int
> +pci_device_map_legacy(struct pci_device *dev, pciaddr_t base, pciaddr_t size,
> +                   unsigned map_flags, void **addr)
> +{
> +    if (base > 1048576 || base + size > 1048576)
> +     return EINVAL;

I'd find 0x100000 easier to read as 1MiB than 1048576.

> +int
> +pci_device_unmap_legacy(struct pci_device *dev, void *addr, pciaddr_t size)
> +{
> +    return pci_sys->methods->unmap_legacy(dev, addr, size);
> +}

Shouldn't this be protected for a NULL unmap_legacy member too?

regards,
guillem

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to