Skip to contentSkip to conversation

dmaengine: idxd: Move DSA/IAA device IDs to IDXD driver

PATCH Superseded Fenghua Yu 2 participants 3 messages Oct 4, 2024 – Oct 14, 2024

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Fenghua Yu

author
#0 lore raw

PATCH 1/1 dmaengine: idxd: Move DSA/IAA device IDs to IDXD driver

Since the DSA/IAA device IDs are only used by the IDXD driver, there is no need to define them as public IDs. Move their definitions to the IDXD driver to limit their scope. This change helps reduce unnecessary exposure of the device IDs in the global space, making the codebase cleaner and better encapsulated.

There is no functional change.

Fixes 4fecf944c051 ("dmaengine: idxd: Add new DSA and IAA device IDs for Diamond Rapids platform")
Fixes f91f2a9879cc ("dmaengine: idxd: Add a new DSA device ID for Granite Rapids-D platform")
---
 drivers/dma/idxd/registers.h | 4 ++++
 include/linux/pci_ids.h      | 3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/dma/idxd/registers.h +4 -0
index e16dbf9ab324..c426511f2104 100644
@@ -6,6 +6,10 @@
 #include <uapi/linux/idxd.h>
 
 /* PCI Config */
+#define PCI_DEVICE_ID_INTEL_DSA_GNRD	0x11fb
+#define PCI_DEVICE_ID_INTEL_DSA_DMR	0x1212
+#define PCI_DEVICE_ID_INTEL_IAA_DMR	0x1216
+
 #define DEVICE_VERSION_1		0x100
 #define DEVICE_VERSION_2		0x200
 
include/linux/pci_ids.h +0 -3
index 4cf6aaed5f35..e4bddb927795 100644
@@ -2709,9 +2709,6 @@
 #define PCI_DEVICE_ID_INTEL_82815_MC	0x1130
 #define PCI_DEVICE_ID_INTEL_82815_CGC	0x1132
 #define PCI_DEVICE_ID_INTEL_SST_TNG	0x119a
-#define PCI_DEVICE_ID_INTEL_DSA_GNRD	0x11fb
-#define PCI_DEVICE_ID_INTEL_DSA_DMR	0x1212
-#define PCI_DEVICE_ID_INTEL_IAA_DMR	0x1216
 #define PCI_DEVICE_ID_INTEL_82092AA_0	0x1221
 #define PCI_DEVICE_ID_INTEL_82437	0x122d
 #define PCI_DEVICE_ID_INTEL_82371FB_0	0x122e
Signature · 1 line
2.37.1
maintainer
#1 lore raw
Quoted 5 lines · Fenghua Yu

Since the DSA/IAA device IDs are only used by the IDXD driver, there is no need to define them as public IDs. Move their definitions to the IDXD driver to limit their scope. This change helps reduce unnecessary exposure of the device IDs in the global space, making the codebase cleaner and better encapsulated.

That is good

Quoted 2 lines

There is no functional change.

Ok

Quoted 3 lines
Fixes 4fecf944c051 ("dmaengine: idxd: Add new DSA and IAA device IDs for Diamond Rapids platform")
Fixes f91f2a9879cc ("dmaengine: idxd: Add a new DSA device ID for Granite Rapids-D platform")

How is this a fix?

Quoted 37 lines
---
 drivers/dma/idxd/registers.h | 4 ++++
 include/linux/pci_ids.h      | 3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/dma/idxd/registers.h +4 -0
index e16dbf9ab324..c426511f2104 100644
@@ -6,6 +6,10 @@
 #include <uapi/linux/idxd.h>
 
 /* PCI Config */
+#define PCI_DEVICE_ID_INTEL_DSA_GNRD	0x11fb
+#define PCI_DEVICE_ID_INTEL_DSA_DMR	0x1212
+#define PCI_DEVICE_ID_INTEL_IAA_DMR	0x1216
+
 #define DEVICE_VERSION_1		0x100
 #define DEVICE_VERSION_2		0x200
 
include/linux/pci_ids.h +0 -3
index 4cf6aaed5f35..e4bddb927795 100644
@@ -2709,9 +2709,6 @@
 #define PCI_DEVICE_ID_INTEL_82815_MC	0x1130
 #define PCI_DEVICE_ID_INTEL_82815_CGC	0x1132
 #define PCI_DEVICE_ID_INTEL_SST_TNG	0x119a
-#define PCI_DEVICE_ID_INTEL_DSA_GNRD	0x11fb
-#define PCI_DEVICE_ID_INTEL_DSA_DMR	0x1212
-#define PCI_DEVICE_ID_INTEL_IAA_DMR	0x1216
 #define PCI_DEVICE_ID_INTEL_82092AA_0	0x1221
 #define PCI_DEVICE_ID_INTEL_82437	0x122d
 #define PCI_DEVICE_ID_INTEL_82371FB_0	0x122e
Signature · 1 line
2.37.1
Signature · 1 line
~Vinod
author
#2 lore raw

Hi, Vinod,

Quoted 12 lines · Vinod Koul
Quoted 5 lines · Fenghua Yu

Since the DSA/IAA device IDs are only used by the IDXD driver, there is no need to define them as public IDs. Move their definitions to the IDXD driver to limit their scope. This change helps reduce unnecessary exposure of the device IDs in the global space, making the codebase cleaner and better encapsulated.

That is good

Quoted 2 lines

There is no functional change.

Quoted 7 lines

Ok

Quoted 3 lines
Fixes 4fecf944c051 ("dmaengine: idxd: Add new DSA and IAA device IDs for Diamond Rapids platform")
Fixes f91f2a9879cc ("dmaengine: idxd: Add a new DSA device ID for Granite Rapids-D platform")

How is this a fix?

Do you want me to remove the fixes message?

I can do that in v2 if you agree.

Quoted 22 lines
Quoted 22 lines
---
  drivers/dma/idxd/registers.h | 4 ++++
  include/linux/pci_ids.h      | 3 ---
  2 files changed, 4 insertions(+), 3 deletions(-)
drivers/dma/idxd/registers.h +4 -0
index e16dbf9ab324..c426511f2104 100644
@@ -6,6 +6,10 @@
  #include <uapi/linux/idxd.h>
 
  /* PCI Config */
+#define PCI_DEVICE_ID_INTEL_DSA_GNRD	0x11fb
+#define PCI_DEVICE_ID_INTEL_DSA_DMR	0x1212
+#define PCI_DEVICE_ID_INTEL_IAA_DMR	0x1216
+
  #define DEVICE_VERSION_1		0x100
  #define DEVICE_VERSION_2		0x200
 
Quoted 17 lines
Quoted 16 lines
include/linux/pci_ids.h +0 -3
index 4cf6aaed5f35..e4bddb927795 100644
@@ -2709,9 +2709,6 @@
  #define PCI_DEVICE_ID_INTEL_82815_MC	0x1130
  #define PCI_DEVICE_ID_INTEL_82815_CGC	0x1132
  #define PCI_DEVICE_ID_INTEL_SST_TNG	0x119a
-#define PCI_DEVICE_ID_INTEL_DSA_GNRD	0x11fb
-#define PCI_DEVICE_ID_INTEL_DSA_DMR	0x1212
-#define PCI_DEVICE_ID_INTEL_IAA_DMR	0x1216
  #define PCI_DEVICE_ID_INTEL_82092AA_0	0x1221
  #define PCI_DEVICE_ID_INTEL_82437	0x122d
  #define PCI_DEVICE_ID_INTEL_82371FB_0	0x122e
Signature · 1 line
2.37.1

Thanks.

-Fenghua