[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180621192220.GA6635@bombadil.infradead.org>
Date: Thu, 21 Jun 2018 12:22:20 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Logan Gunthorpe <logang@...tatee.com>
Cc: linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
linux-doc@...r.kernel.org, Stephen Bates <sbates@...thlin.com>,
Christoph Hellwig <hch@....de>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jonathan Corbet <corbet@....net>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Marc Zyngier <marc.zyngier@....com>,
Kai-Heng Feng <kai.heng.feng@...onical.com>,
Frederic Weisbecker <frederic@...nel.org>,
Dan Williams <dan.j.williams@...el.com>,
Jérôme Glisse <jglisse@...hat.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Alex Williamson <alex.williamson@...hat.com>,
Christian König <christian.koenig@....com>
Subject: Re: [PATCH v3 2/3] PCI: Allow specifying devices using a base bus
and path of devfns
On Mon, Jun 18, 2018 at 01:36:35PM -0600, Logan Gunthorpe wrote:
> @@ -3000,14 +3000,18 @@
> or a set of devices (<pci_dev>). These are
> specified in one of the following formats:
>
> - [<domain>:]<bus>:<slot>.<func>
> + [<domain>:]<bus>:<slot>.<func>[/<slot>.<func>][/ ...]
How about:
+ [<domain>:]<bus>:<slot>.<func>[/<slot>.<func>]*
> - by other kernel parameters. The second format
> + by other kernel parameters. Optionally
> + a path from a device through multiple
I think that's "a path to a device", because you'd start by specifying the
root port, then continuing down the hierarchy, right?
> + * Test if a string (typically from a kernel parameter) formated as a
formatted
> + * path of slot/function addresses matches a PCI device. The string must
> + * be of the form:
> + *
> + * [<domain>:]<bus>:<slot>.<func>/<slot>.<func>[/ ...]
> + *
> + * A path for a device can be obtained using 'lspci -t'. Using a path
> + * is more robust against renumbering of devices than using only
I'd call it bus renumbering rather than device renumbering. After all,
if the device got renumbered, this would fail ;-)
> * pci_dev_str_match - test if a string matches a device
> * @dev: the PCI device to test
> * @p: string to match the device against
> * @endptr: pointer to the string after the match
> *
> * Test if a string (typically from a kernel parameter) matches a
> - * specified. The string may be of one of two forms formats:
> + * specified. The string may be of one of three formats:
Surely just "The string may be in one of three formats"
> *
> * [<domain>:]<bus>:<slot>.<func>
> + * path:[<domain>:]<bus>:<slot>.<func>/<slot>.<func>[/ ...]
> * pci:<vendor>:<device>[:<subvendor>:<subdevice>]
I think you're dropped the "path:" prefix from your parser?
> * The first format specifies a PCI bus/slot/function address which
> * may change if new hardware is inserted, if motherboard firmware changes,
> * or due to changes caused in kernel parameters.
> *
> - * The second format matches devices using IDs in the configuration
> + * The second format specifies a PCI bus/slot/function root address and
> + * a path of slot/function addresses to the specific device from the root.
> + * The path for a device can be determined through the use of 'lspci -t'.
> + * This format is more robust against renumbering issues than the first format.
> +
> + * The third format matches devices using IDs in the configuration
> * space which may match multiple devices in the system. A value of 0
> * for any field will match all devices.
> *
So you probably want to reword this too. Two formats, one with optional
trailing path elements?
Powered by blists - more mailing lists