From: "David E. Box" <david.e.box@linux.intel.com>
To: Christoph Hellwig <hch@infradead.org>,
Bjorn Helgaas <helgaas@kernel.org>
Cc: nirmal.patel@linux.intel.com, jonathan.derrick@linux.dev,
lorenzo.pieralisi@arm.com, kw@linux.com, robh@kernel.org,
bhelgaas@google.com, michael.a.bottini@intel.com,
rafael@kernel.org, me@adhityamohan.in, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V7 3/4] PCI: vmd: Add vmd_device_data
Date: Mon, 31 Oct 2022 08:40:49 -0700 [thread overview]
Message-ID: <ddd1c452d8843fa137bc294b04ee5195967e4b67.camel@linux.intel.com> (raw)
In-Reply-To: <Y19zcYqxk7LcGQfG@infradead.org>
On Mon, 2022-10-31 at 00:04 -0700, Christoph Hellwig wrote:
> On Fri, Oct 28, 2022 at 02:13:08PM -0500, Bjorn Helgaas wrote:
> > It looks like these devices come in families where several device IDs
> > share the same features. I think this would be more readable if you
> > defined each family outside this table and simply referenced the
> > family here. E.g., you could do something like:
> >
> > static struct vmd_device_data vmd_v1 = {
> > .features = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> > VMD_FEAT_HAS_BUS_RESTRICTIONS |
> > VMD_FEAT_OFFSET_FIRST_VECTOR,
> > };
> >
> > {PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
> > .driver_data = (kernel_ulong_t) &vmd_v1,
> >
> > Then you can add VMD_FEAT_BIOS_PM_QUIRK and the .ltr value in one place
> > instead of repeating it a half dozen times.
>
> I wonder why we need the ltr field at all. For those that set it
> is always the same value, so it could just be a quirk flag to set it.
Yeah, this makes sense particularly since this isn't intended as a permanent
fix. I'll get rid of it.
>
> Tat being said I think thegrouping makes a lot of sense, but I'd just
> do it with a #define for the set of common quirk flags.
Works for me. I'll create a VMD_FEATS_CLIENT group but I'll keep the ltr quirk
separate since future client systems won't be using it.
David
next prev parent reply other threads:[~2022-10-31 15:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-25 0:44 [PATCH V7 0/4] PCI: vmd: Enable PCIe ASPM and LTR on select hardware David E. Box
2022-10-25 0:44 ` [PATCH V7 1/4] PCI/ASPM: Add pci_enable_link_state() David E. Box
2022-10-25 0:44 ` [PATCH V7 2/4] PCI: vmd: Use PCI_VDEVICE in device list David E. Box
2022-10-25 0:44 ` [PATCH V7 3/4] PCI: vmd: Add vmd_device_data David E. Box
2022-10-28 19:13 ` Bjorn Helgaas
2022-10-28 19:18 ` Jonathan Derrick
2022-10-28 19:40 ` Bjorn Helgaas
2022-10-28 20:22 ` David E. Box
2022-10-28 21:14 ` Jonathan Derrick
2022-10-28 21:24 ` Patel, Nirmal
2022-10-31 7:04 ` Christoph Hellwig
2022-10-31 15:40 ` David E. Box [this message]
2022-10-25 0:44 ` [PATCH V7 4/4] PCI: vmd: Add quirk to configure PCIe ASPM and LTR David E. Box
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=ddd1c452d8843fa137bc294b04ee5195967e4b67.camel@linux.intel.com \
--to=david.e.box@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=hch@infradead.org \
--cc=helgaas@kernel.org \
--cc=jonathan.derrick@linux.dev \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=me@adhityamohan.in \
--cc=michael.a.bottini@intel.com \
--cc=nirmal.patel@linux.intel.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).