From: Logan Gunthorpe <logang@deltatee.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
linux-doc@vger.kernel.org, "Stephen Bates" <sbates@raithlin.com>,
"Christoph Hellwig" <hch@lst.de>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Ingo Molnar" <mingo@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
"Marc Zyngier" <marc.zyngier@arm.com>,
"Kai-Heng Feng" <kai.heng.feng@canonical.com>,
"Frederic Weisbecker" <frederic@kernel.org>,
"Dan Williams" <dan.j.williams@intel.com>,
"Jérôme Glisse" <jglisse@redhat.com>,
"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH v3 1/3] PCI: Make specifying PCI devices in kernel parameters reusable
Date: Mon, 18 Jun 2018 15:49:49 -0600 [thread overview]
Message-ID: <c2053508-0880-5b7b-fd2f-260d260f33f9@deltatee.com> (raw)
In-Reply-To: <20180618154430.1af3d42f@t450s.home>
On 6/18/2018 3:44 PM, Alex Williamson wrote:
>> + *
>> + * The second 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.
>
> I realize this is not a change in behavior, but since we're spelling it
> out in a proper comment rather than burying it in the implementation,
> using 0 as a wildcard is rather questionable behavior. It always
> surprises me when I read this because pci_match_one_device() uses
> PCI_ANY_ID (~0) as a wildcard and as a result of struct pci_device_id
> using __u32 for these fields, we actually need to specify ffffffff on
> the commandline to get a wildcard match for dynamic ids. The latter is
> tedious to use, but I think it's more correct, and the use of a __u32 is
> probably attributed to the fact that 0xffff is only reserved for vendor
> ID, the spec doesn't seem to reserve any entries from the vendor's
> device ID range.
>
> There's probably really no path to resolve these, but acknowledging the
> difference in this comment block might be helpful in the future.
Ok, I'll add a note in the comment.
>> + ret = pci_dev_str_match(dev, p, &p);
>> + if (ret == 1) {
>> + *resize = true;
>> + if (align_order == -1)
>> + align = PAGE_SIZE;
>> + else
>> + align = 1 << align_order;
>> + break;
>> + } else if (ret < 0) {
>> + pr_info("PCI: Can't parse resource_alignment parameter: pci:%s\n",
>
>
> The "pci:" prefix on %s doesn't make sense now, it was used above when
> the pointer was already advanced past this token, now I believe it would
> lead to "pci:pci:xxxx:yyyy" or "pci:xx:yy.z". Thanks,
Yup, nice catch. I'll fix it for v4.
Logan
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-06-18 21:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 19:36 [PATCH v3 0/3] Add parameter for disabling ACS redirection for P2P Logan Gunthorpe
2018-06-18 19:36 ` [PATCH v3 1/3] PCI: Make specifying PCI devices in kernel parameters reusable Logan Gunthorpe
2018-06-18 21:44 ` Alex Williamson
2018-06-18 21:49 ` Logan Gunthorpe [this message]
2018-06-18 23:06 ` Andy Shevchenko
2018-06-18 23:11 ` Logan Gunthorpe
2018-06-18 19:36 ` [PATCH v3 2/3] PCI: Allow specifying devices using a base bus and path of devfns Logan Gunthorpe
2018-06-18 21:55 ` Alex Williamson
2018-06-21 19:22 ` Matthew Wilcox
2018-06-21 21:00 ` Logan Gunthorpe
2018-06-18 19:36 ` [PATCH v3 3/3] PCI: Introduce the disable_acs_redir parameter Logan Gunthorpe
2018-06-18 22:21 ` Alex Williamson
2018-06-18 22:25 ` Logan Gunthorpe
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=c2053508-0880-5b7b-fd2f-260d260f33f9@deltatee.com \
--to=logang@deltatee.com \
--cc=alex.williamson@redhat.com \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=christian.koenig@amd.com \
--cc=corbet@lwn.net \
--cc=dan.j.williams@intel.com \
--cc=frederic@kernel.org \
--cc=hch@lst.de \
--cc=jglisse@redhat.com \
--cc=kai.heng.feng@canonical.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=sbates@raithlin.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox