[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 7/8] PCI: replace stray uses of PCI_{DEVFN,BDF}2()
- To: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 13 Apr 2022 15:55:08 +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=17rpDyXkFfWd1OjpghRAvtVU4eiNvVJPNBhED5n+AYc=; b=RFaghzKXQNMBPCBBkMbzKoalvc8lJcOFKEsS2go7fQIKfbPxGFo/X1EkM6jMOYP71Gj7kb6g2CpGHYtNQVkyhKdT4r1Y5gXPLzqCYp1FBXgGka4uXCJmZCAsFO+27gxjW7GHmm55P1E3CQWQKe+v4BXdNY3lUUnW64/o8QiFw5D8ExGxoCPyBAxEf8ayMOg0aXTrAQIgxxm4M95cE3O4zj1OMD3ECT/pnW6vW+UnmdNIK0g71O5MV+hkhIIUkwV9kgo5GXMC+hI2CHix/iT0aEHuTE1pw1tj8VUmaTcNIlbfxoCzINJ+KX2r5vRnYZ7C0ICAsRj4bDnVpeTlvV9Hcg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OJQUup1F/vEvClCRK3w2Y06pE7Go6eya4w4tNjKnljr4BnjgOnTflPZKnzp0mUrPL5rI4SgV9kX6CPDv/SLUttboQ/q6FH7ODgFPV2VVMk5vfLpvMTDjNJGztk1ZXO7q7flRF+sqz/Wi3d3b5+N/zUnSr7J/3lo7eGx09x+OP0Q2NLODaXSS8imLwWsxNLaMgtBOtcwLpKDpGHRFv57hYiefM5zgovnTysTzGY/OAoooy1AdYGucz7EWKws3usFjdbUtlB3LuiKmmKl1byAP0ETRX/EVlIlUq6cNqDk7yIKSZLj3emIu4r/b90Q7QJHMrz1ycSKXGL1PE215SrcepA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Wed, 13 Apr 2022 13:55:21 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 13.04.2022 15:48, Bertrand Marquis wrote:
>> On 11 Apr 2022, at 10:40, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>> --- a/xen/arch/arm/pci/ecam.c
>> +++ b/xen/arch/arm/pci/ecam.c
>> @@ -28,8 +28,7 @@ void __iomem *pci_ecam_map_bus(struct pc
>> container_of(bridge->ops, const struct pci_ecam_ops, pci_ops);
>> unsigned int devfn_shift = ops->bus_shift - 8;
>> void __iomem *base;
>> -
>> - unsigned int busn = PCI_BUS(sbdf.bdf);
>> + unsigned int busn = sbdf.bus;
>>
>> if ( busn < cfg->busn_start || busn > cfg->busn_end )
>> return NULL;
>> @@ -37,7 +36,7 @@ void __iomem *pci_ecam_map_bus(struct pc
>> busn -= cfg->busn_start;
>> base = cfg->win + (busn << ops->bus_shift);
>>
>> - return base + (PCI_DEVFN2(sbdf.bdf) << devfn_shift) + where;
>> + return base + (sbdf.df << devfn_shift) + where;
>
> I think this should be sbdf.bdf instead (typo you removed the b).
I don't think so, no - the transformation is to remove the PCI_DEVFN2(),
which was another way to drop the bus part of the coordinates. Patch
context also shows that the bus part if taken care of by other means.
Jan
|