|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 10/18] vtd: Use pci_sbdf_t in acpi_parse_dev_scope()
On 29.06.2026 19:21, Teddy Astie wrote:
> Use a dedicated pci_sbdf_t struct that we update instead of recreating
> one each time we need it.
>
> Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
albeit preferably with ...
> @@ -1195,8 +1177,9 @@ int cf_check intel_iommu_get_reserved_device_memory(
> static int __init cf_check parse_rmrr_param(const char *str)
> {
> const char *s = str, *cur, *stmp;
> - unsigned int seg, bus, dev, func, dev_count;
> + unsigned int dev_count;
> unsigned long start, end;
> + pci_sbdf_t sbdf;
... this new variable moved to ...
> @@ -1233,7 +1216,7 @@ static int __init cf_check parse_rmrr_param(const char
> *str)
> do {
> bool def_seg = false;
>
> - stmp = parse_pci_seg(s + 1, &seg, &bus, &dev, &func, &def_seg);
> + stmp = parse_pci_seg(s + 1, &sbdf, &def_seg);
> if ( !stmp )
> return -EINVAL;
>
> @@ -1242,12 +1225,11 @@ static int __init cf_check parse_rmrr_param(const
> char *str)
> * Segment will be replaced with one from first device.
> */
> if ( user_rmrrs[nr_rmrr].dev_count && def_seg )
> - seg = PCI_SEG(user_rmrrs[nr_rmrr].sbdf[0]);
> + sbdf.seg = PCI_SEG(user_rmrrs[nr_rmrr].sbdf[0]);
>
> /* Keep sbdf's even if they differ and later report an error. */
> dev_count = user_rmrrs[nr_rmrr].dev_count;
> - user_rmrrs[nr_rmrr].sbdf[dev_count] =
> - PCI_SBDF(seg, bus, dev, func).sbdf;
> + user_rmrrs[nr_rmrr].sbdf[dev_count] = sbdf.sbdf;
>
> user_rmrrs[nr_rmrr].dev_count++;
> s = stmp;
... the narrow-most scope it's used in.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |