[PATCH libpciaccess] Support for 32-bit domains

Eric Anholt eric at anholt.net
Fri Aug 12 06:32:04 UTC 2016


Keith Busch <keith.busch at intel.com> writes:

> On Thu, Aug 11, 2016 at 12:03:30PM -0700, Eric Anholt wrote:
>> Given that libpciaccess allocates the struct, and the struct isn't
>> embedded in any other public structs, I think you could just tack a
>> "uint16_t domain_high;" at the end of the struct and fill that with the
>> high bits.
>
> Hmm, then we have to change every usage of domain to combine the two,
> and every usage thereafter must do the same.
>
> How about tacking 'uint32_t domain' to the end for the full domain,
> rename the existing 'uint16_t domain' to 'domain_low', and then just
> copy the lower bits from the full domain into there? That should satisfy
> legacy usage, and everywhere else will automatically use the full value.
>
> Does something like this look more reasonable?

That looks even better to me!  Let's give people a few days to comment,
but I like this solution.

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160811/5ef4da1f/attachment.sig>


More information about the xorg-devel mailing list