[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/4] xen/pci: convert pci_find_*cap* to pci_sbdf_t


  • To: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 23 Aug 2023 08:21:43 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DyiwMAJTlgMP6fFouvJQ5uXVFFxVGZmBdQArCVEfQ8A=; b=JCAjQ8VEoJf0n+AwLjN+Qq5g3LGZwQQXBFU6sqCFXfZ3QMIbWN+uysuLLAfgMGMj0Q65jM471qEcE8Cn/vNgXT9pioLAAL416+ZaAphyLqlrp+CNR/QSZwQZUREECNoAV7rhxAwgsLKrMosI2x15lr5Q1s/osQ/b5n0N4pN5yMKDyXe1PE2X8T+ObyzJsZam8I0s2nsjvSaaf5ehv5SWfYXHpX3+KGekQu/eCsqzDQi1ybFS/UVpkHY82vFImD84D1ep58tRStR54J87XPIYWeIYJsbJtlKu9wTIvhobzi3Zd+D2Ldj9JOSeqsD1ajOeyTIcKFuzSEmNrOGmEKO/Jw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dAVrEWrUWZsppHqnu+kfpd5ybnHTRAqrjU3LqJEW/ISlJwCs9M1FIsV7wYlElloTQmOkCrQ35sz85rXFfqyuIKBS7gJUD5oOFKSppbPnFd1TiBs5WNdj1jo5/681+FYofflLHt/mXL7Ep+R6s2fkwouVKmn7gLqiJgI7jqAMvk809hi8VGrHN+QoGrUu4tlIUj0VHTKGhJHCYq6GFjaknSe1gw7AD2hO7ik9jRV/trbK/TUyupSPsnimiNjLvy+FvOPBpgXQ0d1owdbXa2c82djA4njuCe/fH+7n/uux79fvodd94IpipWepcs6o2KJ3+xCR6CImAYW46DoC8EaJqw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 23 Aug 2023 06:21:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.08.2023 05:03, Stewart Hildebrand wrote:
> On 8/22/23 08:53, Jan Beulich wrote:
>> On 22.08.2023 03:29, Stewart Hildebrand wrote:
>>> --- a/xen/include/xen/pci.h
>>> +++ b/xen/include/xen/pci.h
>>> @@ -193,11 +193,10 @@ int pci_mmcfg_read(unsigned int seg, unsigned int bus,
>>>                     unsigned int devfn, int reg, int len, u32 *value);
>>>  int pci_mmcfg_write(unsigned int seg, unsigned int bus,
>>>                      unsigned int devfn, int reg, int len, u32 value);
>>> -int pci_find_cap_offset(u16 seg, u8 bus, u8 dev, u8 func, u8 cap);
>>> -int pci_find_next_cap(u16 seg, u8 bus, unsigned int devfn, u8 pos, int 
>>> cap);
>>> -int pci_find_ext_capability(int seg, int bus, int devfn, int cap);
>>> -int pci_find_next_ext_capability(int seg, int bus, int devfn, int start,
>>> -                                 int cap);
>>> +int pci_find_cap_offset(pci_sbdf_t sbdf, u8 cap);
>>> +int pci_find_next_cap(pci_sbdf_t sbdf, u8 pos, int cap);
>>> +int pci_find_ext_capability(pci_sbdf_t sbdf, int cap);
>>> +int pci_find_next_ext_capability(pci_sbdf_t sbdf, int start, int cap);
>>
>> The remaining types want converting, too: Neither fixed-width nor plain int
>> are appropriate here. (It's a few too many type adjustments to make, for me
>> to offer doing so while committing.)
> 
> Understood, I'm happy to make the change for v4. Is the following what you'd 
> expect it to look like?
> 
> unsigned int pci_find_cap_offset(pci_sbdf_t sbdf, unsigned int cap);
> unsigned int pci_find_next_cap(pci_sbdf_t sbdf, unsigned int pos,
>                                unsigned int cap);
> unsigned int pci_find_ext_capability(pci_sbdf_t sbdf, unsigned int cap);
> unsigned int pci_find_next_ext_capability(pci_sbdf_t sbdf, unsigned int start,
>                                           unsigned int cap);

Yes, this looks correct. Thanks.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.