All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Bertrand Marquis <Bertrand.Marquis@arm.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"Kevin Tian" <kevin.tian@intel.com>,
	"Paul Durrant" <paul@xen.org>, "Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Volodymyr Babchuk" <volodymyr_babchuk@epam.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH 7/8] PCI: replace stray uses of PCI_{DEVFN,BDF}2()
Date: Wed, 13 Apr 2022 15:55:08 +0200	[thread overview]
Message-ID: <00731823-a353-21e8-81ed-a8af74b8d1dc@suse.com> (raw)
In-Reply-To: <6F9FAAD4-59FF-4D52-B08D-13E3920B3925@arm.com>

On 13.04.2022 15:48, Bertrand Marquis wrote:
>> On 11 Apr 2022, at 10:40, Jan Beulich <jbeulich@suse.com> 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



  reply	other threads:[~2022-04-13 13:55 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11  9:34 [PATCH 0/8] IOMMU: assorted follow-on to XSA-400 Jan Beulich
2022-04-11  9:35 ` [PATCH 1/8] IOMMU/x86: drop locking from quarantine_init() hooks Jan Beulich
2022-04-11 10:01   ` Andrew Cooper
2022-04-11 10:18     ` Jan Beulich
2022-04-12 13:14     ` Jan Beulich
2022-04-12 11:05   ` Roger Pau Monné
2022-04-12 12:17     ` Jan Beulich
2022-04-12 12:54       ` Roger Pau Monné
2022-04-12 13:12         ` Jan Beulich
2022-04-20  6:22   ` Tian, Kevin
2022-04-11  9:36 ` [PATCH 2/8] VT-d: drop ROOT_ENTRY_NR Jan Beulich
2022-04-12  8:20   ` Roger Pau Monné
2022-04-20  6:22   ` Tian, Kevin
2022-04-11  9:36 ` [PATCH 3/8] VT-d: plug memory leaks in iommu_alloc() Jan Beulich
2022-04-12  8:29   ` Roger Pau Monné
2022-04-20  6:23   ` Tian, Kevin
2022-04-11  9:37 ` [PATCH 4/8] VT-d: refuse to use IOMMU with reserved CAP.ND value Jan Beulich
2022-04-12  9:22   ` Roger Pau Monné
2022-04-12 10:35     ` Jan Beulich
2022-04-20  6:23   ` Tian, Kevin
2022-04-11  9:37 ` [PATCH 5/8] AMD/IOMMU: replace a few PCI_BDF2() Jan Beulich
2022-04-12  9:37   ` Roger Pau Monné
2022-04-11  9:38 ` [PATCH 6/8] IOMMU: log appropriate SBDF Jan Beulich
2022-04-12 10:05   ` Roger Pau Monné
2022-04-12 10:39     ` Jan Beulich
2022-04-11  9:40 ` [PATCH 7/8] PCI: replace stray uses of PCI_{DEVFN,BDF}2() Jan Beulich
2022-04-12 10:07   ` Roger Pau Monné
2022-04-13 13:48   ` Bertrand Marquis
2022-04-13 13:55     ` Jan Beulich [this message]
2022-04-13 13:58     ` Roger Pau Monné
2022-04-13 14:13       ` Bertrand Marquis
2022-04-13 14:38         ` Jan Beulich
2022-04-20  6:29   ` Tian, Kevin
2022-04-11  9:42 ` [PATCH 8/8] PCI: replace "secondary" flavors of PCI_{DEVFN,BDF,SBDF}() Jan Beulich
2022-04-12 10:49   ` Roger Pau Monné
2022-04-20  6:37   ` Tian, Kevin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00731823-a353-21e8-81ed-a8af74b8d1dc@suse.com \
    --to=jbeulich@suse.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=julien@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=paul@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=volodymyr_babchuk@epam.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.