[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ddd1c452d8843fa137bc294b04ee5195967e4b67.camel@linux.intel.com>
Date: Mon, 31 Oct 2022 08:40:49 -0700
From: "David E. Box" <david.e.box@...ux.intel.com>
To: Christoph Hellwig <hch@...radead.org>,
Bjorn Helgaas <helgaas@...nel.org>
Cc: nirmal.patel@...ux.intel.com, jonathan.derrick@...ux.dev,
lorenzo.pieralisi@....com, kw@...ux.com, robh@...nel.org,
bhelgaas@...gle.com, michael.a.bottini@...el.com,
rafael@...nel.org, me@...ityamohan.in, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V7 3/4] PCI: vmd: Add vmd_device_data
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
Powered by blists - more mailing lists