[PATCH libpciaccess] Support for 32-bit domains

Eric Anholt eric at anholt.net
Thu Aug 11 19:03:30 UTC 2016


Michel Dänzer <michel at daenzer.net> writes:

> On 10/08/16 06:39 AM, Keith Busch wrote:
>> A pci "domain" is a purely software construct, and need not be limited
>> to the 16-bit ACPI defined segment. The Linux kernel currently supports
>> 32-bit domains, so this patch matches up with those capabilities to make
>> it usable on systems exporting such domains.
>> 
>> Reported-by: Pawel Baldysiak <pawel.baldysiak at intel.com>
>> Signed-off-by: Keith Busch <keith.busch at intel.com>
>> ---
>>  include/pciaccess.h | 2 +-
>>  src/linux_sysfs.c   | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/include/pciaccess.h b/include/pciaccess.h
>> index 1d7aa4b..93ed76f 100644
>> --- a/include/pciaccess.h
>> +++ b/include/pciaccess.h
>> @@ -321,7 +321,7 @@ struct pci_device {
>>       * the domain will always be zero.
>>       */
>>      /*@{*/
>> -    uint16_t    domain;
>> +    uint32_t    domain;
>
> This change breaks ABI, so as is it would require bumping the library
> SONAME (which is painful and thus generally discouraged from a
> downstream POV).

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.
-------------- 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/3ee21a9f/attachment.sig>


More information about the xorg-devel mailing list