mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "David E. Box" <david.e.box@linux.intel.com>,
	nirmal.patel@linux.intel.com, jonathan.derrick@linux.dev,
	lorenzo.pieralisi@arm.com, hch@infradead.org, 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 00:04:17 -0700	[thread overview]
Message-ID: <Y19zcYqxk7LcGQfG@infradead.org> (raw)
In-Reply-To: <20221028191308.GA903098@bhelgaas>

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.

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.

  parent reply	other threads:[~2022-10-31  7:04 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 [this message]
2022-10-31 15:40       ` David E. Box
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=Y19zcYqxk7LcGQfG@infradead.org \
    --to=hch@infradead.org \
    --cc=bhelgaas@google.com \
    --cc=david.e.box@linux.intel.com \
    --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

all inboxes | Powered by JetHome®