Skip to contentSkip to conversation

cxl: Remove unused include

PATCH In review Alexey Kardashevskiy 4 participants 5 messages Sep 28, 2018 – Oct 3, 2018 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cxl: Remove unused include

The included opal.h gives a wrong idea that CXL makes PPC OPAL calls while it does not so let's remote it.

---
 drivers/misc/cxl/pci.c | 1 -
 1 file changed, 1 deletion(-)
drivers/misc/cxl/pci.c +0 -1
index b66d832..8cbcbb7 100644
@@ -17,7 +17,6 @@
 #include <linux/pci.h>
 #include <linux/of.h>
 #include <linux/delay.h>
-#include <asm/opal.h>
 #include <asm/msi_bitmap.h>
 #include <asm/pnv-pci.h>
 #include <asm/io.h>
Signature · 1 line
2.11.0
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Alexey Kardashevskiy

The included opal.h gives a wrong idea that CXL makes PPC OPAL calls while it does not so let's remote it.

Thanks for catching this

Quoted 17 lines
---
  drivers/misc/cxl/pci.c | 1 -
  1 file changed, 1 deletion(-)
drivers/misc/cxl/pci.c +0 -1
index b66d832..8cbcbb7 100644
@@ -17,7 +17,6 @@
  #include <linux/pci.h>
  #include <linux/of.h>
  #include <linux/delay.h>
-#include <asm/opal.h>
  #include <asm/msi_bitmap.h>
  #include <asm/pnv-pci.h>
  #include <asm/io.h>
Signature · 2 lines
Andrew Donnellan              OzLabs, ADL Canberra
[email protected]  IBM Australia Limited
#2 lore raw
In reply to Alexey Kardashevskiy
Quoted 2 lines · Alexey Kardashevskiy

The included opal.h gives a wrong idea that CXL makes PPC OPAL calls while it does not so let's remote it.

But it does use eg.

OPAL_PHB_CAPI_MODE_SNOOP_ON
OPAL_PHB_CAPI_MODE_CAPI

Which come from opal-api.h via opal.h.

So you should at least include opal-api.h.

cheers

Quoted 14 lines
drivers/misc/cxl/pci.c +0 -1
index b66d832..8cbcbb7 100644
@@ -17,7 +17,6 @@
 #include <linux/pci.h>
 #include <linux/of.h>
 #include <linux/delay.h>
-#include <asm/opal.h>
 #include <asm/msi_bitmap.h>
 #include <asm/pnv-pci.h>
 #include <asm/io.h>
Signature · 1 line
2.11.0
#3 lore raw
Quoted 4 lines · Michael Ellerman
Quoted 2 lines · Alexey Kardashevskiy

The included opal.h gives a wrong idea that CXL makes PPC OPAL calls while it does not so let's remote it.

Quoted 8 lines

But it does use eg.

OPAL_PHB_CAPI_MODE_SNOOP_ON
OPAL_PHB_CAPI_MODE_CAPI

Which come from opal-api.h via opal.h.

So you should at least include opal-api.h.

I'd say that since it includes pnv-pci.h (and this is why this patch compiles), it should be a different set of values for powernv (which would map 1:1 to OPAL_PHB_xxx). The powernv platform knowledge is already intimate enough for a driver to have. Dunno, I found this opal.h inclusion confusing, that's all.

Quoted 17 lines

cheers

Quoted 14 lines
drivers/misc/cxl/pci.c +0 -1
index b66d832..8cbcbb7 100644
@@ -17,7 +17,6 @@
 #include <linux/pci.h>
 #include <linux/of.h>
 #include <linux/delay.h>
-#include <asm/opal.h>
 #include <asm/msi_bitmap.h>
 #include <asm/pnv-pci.h>
 #include <asm/io.h>
Signature · 1 line
2.11.0
Signature · 1 line
Alexey
#4 lore raw

Le 03/10/2018 à 09:46, Alexey Kardashevskiy a écrit :

Quoted 14 lines · Michael Ellerman
Quoted 11 lines
Quoted 2 lines · Alexey Kardashevskiy

The included opal.h gives a wrong idea that CXL makes PPC OPAL calls while it does not so let's remote it.

But it does use eg.

OPAL_PHB_CAPI_MODE_SNOOP_ON
OPAL_PHB_CAPI_MODE_CAPI

Which come from opal-api.h via opal.h.

Quoted 8 lines
Quoted 1 line

So you should at least include opal-api.h.

I'd say that since it includes pnv-pci.h (and this is why this patch compiles), it should be a different set of values for powernv (which would map 1:1 to OPAL_PHB_xxx). The powernv platform knowledge is already intimate enough for a driver to have. Dunno, I found this opal.h inclusion confusing, that's all.

I agree, it would be the cleaner way of doing it. It's going to be pretty low on my list though...

Fred

Quoted 20 lines
Quoted 19 lines

cheers

Quoted 14 lines
drivers/misc/cxl/pci.c +0 -1
index b66d832..8cbcbb7 100644
@@ -17,7 +17,6 @@
  #include <linux/pci.h>
  #include <linux/of.h>
  #include <linux/delay.h>
-#include <asm/opal.h>
  #include <asm/msi_bitmap.h>
  #include <asm/pnv-pci.h>
  #include <asm/io.h>
Signature · 1 line
2.11.0