[V9,2/4] PCI: vmd: Use PCI_VDEVICE in device list

Message ID 20221208023942.491721-3-david.e.box@linux.intel.com
State New
Headers
Series Enable PCIe ASPM and LTR on select hardware |

Commit Message

David E. Box Dec. 8, 2022, 2:39 a.m. UTC
  Refactor the PCI ID list to use PCI_VDEVICE.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Jon Derrick <jonathan.derrick@linux.dev>
Reviewed-by: Nirmal Patel <nirmal.patel@linux.intel.com>
---
 V9 - No change

 V8 - No change

 V7 - New Patch. Separate patch suggested by Lorenzo

 drivers/pci/controller/vmd.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
  

Comments

Kuppuswamy Sathyanarayanan Dec. 8, 2022, 2:56 a.m. UTC | #1
On 12/7/22 6:39 PM, David E. Box wrote:
> Refactor the PCI ID list to use PCI_VDEVICE.

Add some info about why it is done.

> 
> Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> Reviewed-by: Jon Derrick <jonathan.derrick@linux.dev>
> Reviewed-by: Nirmal Patel <nirmal.patel@linux.intel.com>
> ---
>  V9 - No change
> 
>  V8 - No change
> 
>  V7 - New Patch. Separate patch suggested by Lorenzo
> 
>  drivers/pci/controller/vmd.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
> index e06e9f4fc50f..9dedca714c18 100644
> --- a/drivers/pci/controller/vmd.c
> +++ b/drivers/pci/controller/vmd.c
> @@ -994,33 +994,33 @@ static int vmd_resume(struct device *dev)
>  static SIMPLE_DEV_PM_OPS(vmd_dev_pm_ops, vmd_suspend, vmd_resume);
>  
>  static const struct pci_device_id vmd_ids[] = {
> -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_201D),
> +	{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_201D),
>  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP,},
> -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0),
> +	{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0),
>  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW |
>  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
>  				VMD_FEAT_CAN_BYPASS_MSI_REMAP,},
> -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x467f),
> +	{PCI_VDEVICE(INTEL, 0x467f),
>  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
>  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
>  				VMD_FEAT_OFFSET_FIRST_VECTOR,},
> -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4c3d),
> +	{PCI_VDEVICE(INTEL, 0x4c3d),
>  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
>  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
>  				VMD_FEAT_OFFSET_FIRST_VECTOR,},
> -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa77f),
> +	{PCI_VDEVICE(INTEL, 0xa77f),
>  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
>  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
>  				VMD_FEAT_OFFSET_FIRST_VECTOR,},
> -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x7d0b),
> +	{PCI_VDEVICE(INTEL, 0x7d0b),
>  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
>  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
>  				VMD_FEAT_OFFSET_FIRST_VECTOR,},
> -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xad0b),
> +	{PCI_VDEVICE(INTEL, 0xad0b),
>  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
>  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
>  				VMD_FEAT_OFFSET_FIRST_VECTOR,},
> -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
> +	{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
>  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
>  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
>  				VMD_FEAT_OFFSET_FIRST_VECTOR,},
  
Lorenzo Pieralisi Jan. 13, 2023, 4:41 p.m. UTC | #2
On Wed, Dec 07, 2022 at 06:56:38PM -0800, Sathyanarayanan Kuppuswamy wrote:
> 
> 
> On 12/7/22 6:39 PM, David E. Box wrote:
> > Refactor the PCI ID list to use PCI_VDEVICE.
> 
> Add some info about why it is done.

I am waiting for the dust to settle on this series, it is pretty
close to completion it seems, please let me know when you consider
it ready.

Lorenzo

> > Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> > Reviewed-by: Jon Derrick <jonathan.derrick@linux.dev>
> > Reviewed-by: Nirmal Patel <nirmal.patel@linux.intel.com>
> > ---
> >  V9 - No change
> > 
> >  V8 - No change
> > 
> >  V7 - New Patch. Separate patch suggested by Lorenzo
> > 
> >  drivers/pci/controller/vmd.c | 16 ++++++++--------
> >  1 file changed, 8 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
> > index e06e9f4fc50f..9dedca714c18 100644
> > --- a/drivers/pci/controller/vmd.c
> > +++ b/drivers/pci/controller/vmd.c
> > @@ -994,33 +994,33 @@ static int vmd_resume(struct device *dev)
> >  static SIMPLE_DEV_PM_OPS(vmd_dev_pm_ops, vmd_suspend, vmd_resume);
> >  
> >  static const struct pci_device_id vmd_ids[] = {
> > -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_201D),
> > +	{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_201D),
> >  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP,},
> > -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0),
> > +	{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0),
> >  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW |
> >  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
> >  				VMD_FEAT_CAN_BYPASS_MSI_REMAP,},
> > -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x467f),
> > +	{PCI_VDEVICE(INTEL, 0x467f),
> >  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> >  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
> >  				VMD_FEAT_OFFSET_FIRST_VECTOR,},
> > -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4c3d),
> > +	{PCI_VDEVICE(INTEL, 0x4c3d),
> >  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> >  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
> >  				VMD_FEAT_OFFSET_FIRST_VECTOR,},
> > -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa77f),
> > +	{PCI_VDEVICE(INTEL, 0xa77f),
> >  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> >  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
> >  				VMD_FEAT_OFFSET_FIRST_VECTOR,},
> > -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x7d0b),
> > +	{PCI_VDEVICE(INTEL, 0x7d0b),
> >  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> >  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
> >  				VMD_FEAT_OFFSET_FIRST_VECTOR,},
> > -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xad0b),
> > +	{PCI_VDEVICE(INTEL, 0xad0b),
> >  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> >  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
> >  				VMD_FEAT_OFFSET_FIRST_VECTOR,},
> > -	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
> > +	{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
> >  		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> >  				VMD_FEAT_HAS_BUS_RESTRICTIONS |
> >  				VMD_FEAT_OFFSET_FIRST_VECTOR,},
> 
> -- 
> Sathyanarayanan Kuppuswamy
> Linux Kernel Developer
  
David E. Box Jan. 20, 2023, 12:19 a.m. UTC | #3
Hi Lorenzo,

On Fri, 2023-01-13 at 17:41 +0100, Lorenzo Pieralisi wrote:
> On Wed, Dec 07, 2022 at 06:56:38PM -0800, Sathyanarayanan Kuppuswamy wrote:
> > 
> > 
> > On 12/7/22 6:39 PM, David E. Box wrote:
> > > Refactor the PCI ID list to use PCI_VDEVICE.
> > 
> > Add some info about why it is done.
> 
> I am waiting for the dust to settle on this series, it is pretty
> close to completion it seems, please let me know when you consider
> it ready.

I'm sending a V10 just to add the commit message Sathya suggested. But other
than that it is done for me.

David

> 
> Lorenzo
> 
> > > Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> > > Reviewed-by: Jon Derrick <jonathan.derrick@linux.dev>
> > > Reviewed-by: Nirmal Patel <nirmal.patel@linux.intel.com>
> > > ---
> > >  V9 - No change
> > > 
> > >  V8 - No change
> > > 
> > >  V7 - New Patch. Separate patch suggested by Lorenzo
> > > 
> > >  drivers/pci/controller/vmd.c | 16 ++++++++--------
> > >  1 file changed, 8 insertions(+), 8 deletions(-)
> > > 
> > > diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
> > > index e06e9f4fc50f..9dedca714c18 100644
> > > --- a/drivers/pci/controller/vmd.c
> > > +++ b/drivers/pci/controller/vmd.c
> > > @@ -994,33 +994,33 @@ static int vmd_resume(struct device *dev)
> > >  static SIMPLE_DEV_PM_OPS(vmd_dev_pm_ops, vmd_suspend, vmd_resume);
> > >  
> > >  static const struct pci_device_id vmd_ids[] = {
> > > -       {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_201D),
> > > +       {PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_201D),
> > >                 .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP,},
> > > -       {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0),
> > > +       {PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0),
> > >                 .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW |
> > >                                 VMD_FEAT_HAS_BUS_RESTRICTIONS |
> > >                                 VMD_FEAT_CAN_BYPASS_MSI_REMAP,},
> > > -       {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x467f),
> > > +       {PCI_VDEVICE(INTEL, 0x467f),
> > >                 .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> > >                                 VMD_FEAT_HAS_BUS_RESTRICTIONS |
> > >                                 VMD_FEAT_OFFSET_FIRST_VECTOR,},
> > > -       {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4c3d),
> > > +       {PCI_VDEVICE(INTEL, 0x4c3d),
> > >                 .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> > >                                 VMD_FEAT_HAS_BUS_RESTRICTIONS |
> > >                                 VMD_FEAT_OFFSET_FIRST_VECTOR,},
> > > -       {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa77f),
> > > +       {PCI_VDEVICE(INTEL, 0xa77f),
> > >                 .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> > >                                 VMD_FEAT_HAS_BUS_RESTRICTIONS |
> > >                                 VMD_FEAT_OFFSET_FIRST_VECTOR,},
> > > -       {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x7d0b),
> > > +       {PCI_VDEVICE(INTEL, 0x7d0b),
> > >                 .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> > >                                 VMD_FEAT_HAS_BUS_RESTRICTIONS |
> > >                                 VMD_FEAT_OFFSET_FIRST_VECTOR,},
> > > -       {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xad0b),
> > > +       {PCI_VDEVICE(INTEL, 0xad0b),
> > >                 .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> > >                                 VMD_FEAT_HAS_BUS_RESTRICTIONS |
> > >                                 VMD_FEAT_OFFSET_FIRST_VECTOR,},
> > > -       {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
> > > +       {PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
> > >                 .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
> > >                                 VMD_FEAT_HAS_BUS_RESTRICTIONS |
> > >                                 VMD_FEAT_OFFSET_FIRST_VECTOR,},
> > 
> > -- 
> > Sathyanarayanan Kuppuswamy
> > Linux Kernel Developer
  

Patch

diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index e06e9f4fc50f..9dedca714c18 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -994,33 +994,33 @@  static int vmd_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(vmd_dev_pm_ops, vmd_suspend, vmd_resume);
 
 static const struct pci_device_id vmd_ids[] = {
-	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_201D),
+	{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_201D),
 		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP,},
-	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0),
+	{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0),
 		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW |
 				VMD_FEAT_HAS_BUS_RESTRICTIONS |
 				VMD_FEAT_CAN_BYPASS_MSI_REMAP,},
-	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x467f),
+	{PCI_VDEVICE(INTEL, 0x467f),
 		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
 				VMD_FEAT_HAS_BUS_RESTRICTIONS |
 				VMD_FEAT_OFFSET_FIRST_VECTOR,},
-	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4c3d),
+	{PCI_VDEVICE(INTEL, 0x4c3d),
 		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
 				VMD_FEAT_HAS_BUS_RESTRICTIONS |
 				VMD_FEAT_OFFSET_FIRST_VECTOR,},
-	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa77f),
+	{PCI_VDEVICE(INTEL, 0xa77f),
 		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
 				VMD_FEAT_HAS_BUS_RESTRICTIONS |
 				VMD_FEAT_OFFSET_FIRST_VECTOR,},
-	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x7d0b),
+	{PCI_VDEVICE(INTEL, 0x7d0b),
 		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
 				VMD_FEAT_HAS_BUS_RESTRICTIONS |
 				VMD_FEAT_OFFSET_FIRST_VECTOR,},
-	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xad0b),
+	{PCI_VDEVICE(INTEL, 0xad0b),
 		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
 				VMD_FEAT_HAS_BUS_RESTRICTIONS |
 				VMD_FEAT_OFFSET_FIRST_VECTOR,},
-	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
+	{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
 		.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
 				VMD_FEAT_HAS_BUS_RESTRICTIONS |
 				VMD_FEAT_OFFSET_FIRST_VECTOR,},