[PATCH] I/O port access routines

Mark Kettenis mark.kettenis at xs4all.nl
Tue Dec 8 11:22:08 PST 2009


> From: Adam Jackson <ajax at redhat.com>
> Date: Thu,  3 Dec 2009 15:27:19 -0500

I like this much better!

The lack of consistency with the config space access functions is a
bit of a pity, but your names are shorter, which is better in my
opinion.

I have one question though:

> --- a/src/pciaccess_private.h
> +++ b/src/pciaccess_private.h
> @@ -72,6 +87,12 @@ struct pci_device_mapping {
>      void *memory;
>  };
>  
> +struct pci_io_handle {
> +    pciaddr_t base;
> +    pciaddr_t size;
> +    int fd;
> +};
> +

The 'fd' member here is specific to your Linux implementation.  For
OpenBSD I'll have to add other members.  How do we want to handle
that?

1. Just accept that there will be members that are unused on some
   platforms?

2. Add #ifdef's?

3. Move the definition of this struct into a platform-specific header file?

Anyway, I'll see if I can write the necessary support bits for OpenBSD.

Thanks,

Mark





More information about the xorg-devel mailing list