Skip to contentSkip to conversation

drivers/video/fbdev: Add dependencies on !S390

PATCH In review Guenter Roeck 2 participants 3 messages Aug 26, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/video/fbdev: Add dependencies on !S390

s390:allmodconfig fails to build with:

ERROR: "pci_iomap_wc" [drivers/video/fbdev/vt8623fb.ko] undefined!
ERROR: "pci_iomap_wc" [drivers/video/fbdev/s3fb.ko] undefined!
ERROR: "pci_iomap_wc" [drivers/video/fbdev/arkfb.ko] undefined!

Those functions are currently only available in generic PCI iomap code, which is not used on S390.

Fixes 81bdef04d3bc ("drivers/video/fbdev/vt8623fb: Use arch_phys_wc_add() and pci_iomap_wc()")
Fixes 4edcd2ab1255 ("drivers/video/fbdev/s3fb: Use arch_phys_wc_add() and pci_iomap_wc()")
Fixes c823a48ac47f ("drivers/video/fbdev/arkfb.c: Use arch_phys_wc_add() and pci_iomap_wc()")
Cc Luis R. Rodriguez <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Ingo Molnar <[email protected]>
---
 drivers/video/fbdev/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/video/fbdev/Kconfig +3 -0
index 8b1d371b5404..6b1893e5c769 100644
@@ -1442,6 +1442,7 @@ config FB_ATY_BACKLIGHT
 config FB_S3
 	tristate "S3 Trio/Virge support"
 	depends on FB && PCI
+	depends on !S390
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
@@ -1649,6 +1650,7 @@ config FB_VOODOO1
 config FB_VT8623
 	tristate "VIA VT8623 support"
 	depends on FB && PCI
+	depends on !S390
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
@@ -1683,6 +1685,7 @@ config FB_TRIDENT
 config FB_ARK
 	tristate "ARK 2000PV support"
 	depends on FB && PCI
+	depends on !S390
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
Signature · 1 line
2.1.4
#1 lore raw

Hey Guenter,

thanks so much for your patch, my feedback below! I'll proactively Cc Andrew and Steven as they're the other ones who I've seen as hawks to compile issues on linux-next so I expect they'll soon run into this as well if they are also testing against s390.

Quoted 6 lines · Guenter Roeck

s390:allmodconfig fails to build with:

ERROR: "pci_iomap_wc" [drivers/video/fbdev/vt8623fb.ko] undefined!
ERROR: "pci_iomap_wc" [drivers/video/fbdev/s3fb.ko] undefined!
ERROR: "pci_iomap_wc" [drivers/video/fbdev/arkfb.ko] undefined!

Quoted 6 lines

Those functions are currently only available in generic PCI iomap code, which is not used on S390.

Fixes 81bdef04d3bc ("drivers/video/fbdev/vt8623fb: Use arch_phys_wc_add() and pci_iomap_wc()")
Fixes 4edcd2ab1255 ("drivers/video/fbdev/s3fb: Use arch_phys_wc_add() and pci_iomap_wc()")
Fixes c823a48ac47f ("drivers/video/fbdev/arkfb.c: Use arch_phys_wc_add() and pci_iomap_wc()")

Those commit IDs are only sepcific to linux-next and as such are ephemeral.

Quoted 29 lines
Cc Luis R. Rodriguez <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Ingo Molnar <[email protected]>
---
 drivers/video/fbdev/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/video/fbdev/Kconfig +2 -0
index 8b1d371b5404..6b1893e5c769 100644
@@ -1442,6 +1442,7 @@ config FB_ATY_BACKLIGHT
 config FB_S3
 	tristate "S3 Trio/Virge support"
 	depends on FB && PCI
+	depends on !S390
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
@@ -1649,6 +1650,7 @@ config FB_VOODOO1
 config FB_VT8623
 	tristate "VIA VT8623 support"
 	depends on FB && PCI
+	depends on !S390
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT

drivers/video/fbdev/Kconfig config FB_TRIDENT · line 1691

Quoted 7 lines
drivers/video/fbdev/Kconfig +1 -0
@@ -1683,6 +1685,7 @@ config FB_TRIDENT
 config FB_ARK
 	tristate "ARK 2000PV support"
 	depends on FB && PCI
+	depends on !S390
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT

Although this is one way to resolve it, the patch does not explain why its needed, and this would also mean its a reactive solution, we either test-compile and find issues or expect and hope developers will also annotate this themselves when using this new API. I rather we define it S390, which I do below.

The reason S390 requires its own S390 requires its own pci_iomap*() calls is because it has its "BAR spaces are not disjunctive on s390 so we need the bar parameter of pci_iomap to find the corresponding device and create the mapping cookie." but in summary, it has its own lookup/lock solution. It does not include asm-generic/pci_iomap.h and requires implementing the generic solutoins on its own then.

As for write-combining, it has no specific solution for this so its ioremap_wc() is a direct mapping, so we can just do a 1-1 mapping to the non-wc calls as well then. If we do this then we don't have to go on fixing drivers when they use this new API and if and when S390 gets some form of WC it can go and update its implementation but right now it has none.

I've tested the patch below on linux-next with make.cross ARCH=s390 with allyesconfig and it fixes the compile issue. I'll post this as a patch fix. Let me know if this is agreeable to you.

arch/s390/include/asm/io.h +2 -0
index cb5fdf3a78fc..437e9af96688 100644
@@ -57,6 +57,8 @@ static inline void ioport_unmap(void __iomem *p)
  */
 #define pci_iomap pci_iomap
 #define pci_iounmap pci_iounmap
+#define pci_iomap_wc pci_iomap
+#define pci_iomap_wc_range pci_iomap_range
 
 #define memcpy_fromio(dst, src, count)	zpci_memcpy_fromio(dst, src, count)
 #define memcpy_toio(dst, src, count)	zpci_memcpy_toio(dst, src, count)
#2 lore raw

Hi Luis,

Quoted 18 lines · Luis R. Rodriguez

Hey Guenter,

thanks so much for your patch, my feedback below! I'll proactively Cc Andrew and Steven as they're the other ones who I've seen as hawks to compile issues on linux-next so I expect they'll soon run into this as well if they are also testing against s390.

Quoted 9 lines · Guenter Roeck

s390:allmodconfig fails to build with:

ERROR: "pci_iomap_wc" [drivers/video/fbdev/vt8623fb.ko] undefined!
ERROR: "pci_iomap_wc" [drivers/video/fbdev/s3fb.ko] undefined!
ERROR: "pci_iomap_wc" [drivers/video/fbdev/arkfb.ko] undefined!

Those functions are currently only available in generic PCI iomap code, which is not used on S390.

Quoted 7 lines
Quoted 3 lines
Fixes 81bdef04d3bc ("drivers/video/fbdev/vt8623fb: Use arch_phys_wc_add() and pci_iomap_wc()")
Fixes 4edcd2ab1255 ("drivers/video/fbdev/s3fb: Use arch_phys_wc_add() and pci_iomap_wc()")
Fixes c823a48ac47f ("drivers/video/fbdev/arkfb.c: Use arch_phys_wc_add() and pci_iomap_wc()")

Those commit IDs are only sepcific to linux-next and as such are ephemeral.

Depends on the introducing tree.

Quoted 57 lines
Quoted 29 lines
Cc Luis R. Rodriguez <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Ingo Molnar <[email protected]>
---
  drivers/video/fbdev/Kconfig | 3 +++
  1 file changed, 3 insertions(+)
drivers/video/fbdev/Kconfig +2 -0
index 8b1d371b5404..6b1893e5c769 100644
@@ -1442,6 +1442,7 @@ config FB_ATY_BACKLIGHT
  config FB_S3
  	tristate "S3 Trio/Virge support"
  	depends on FB && PCI
+	depends on !S390
  	select FB_CFB_FILLRECT
  	select FB_CFB_COPYAREA
  	select FB_CFB_IMAGEBLIT
@@ -1649,6 +1650,7 @@ config FB_VOODOO1
  config FB_VT8623
  	tristate "VIA VT8623 support"
  	depends on FB && PCI
+	depends on !S390
  	select FB_CFB_FILLRECT
  	select FB_CFB_COPYAREA
  	select FB_CFB_IMAGEBLIT

drivers/video/fbdev/Kconfig config FB_TRIDENT · line 1691

Quoted 7 lines
drivers/video/fbdev/Kconfig +1 -0
@@ -1683,6 +1685,7 @@ config FB_TRIDENT
  config FB_ARK
  	tristate "ARK 2000PV support"
  	depends on FB && PCI
+	depends on !S390
  	select FB_CFB_FILLRECT
  	select FB_CFB_COPYAREA
  	select FB_CFB_IMAGEBLIT

Although this is one way to resolve it, the patch does not explain why its needed, and this would also mean its a reactive solution, we either test-compile and find issues or expect and hope developers will also annotate this themselves when using this new API. I rather we define it S390, which I do below.

The reason S390 requires its own S390 requires its own pci_iomap*() calls is because it has its "BAR spaces are not disjunctive on s390 so we need the bar parameter of pci_iomap to find the corresponding device and create the mapping cookie." but in summary, it has its own lookup/lock solution. It does not include asm-generic/pci_iomap.h and requires implementing the generic solutoins on its own then.

As for write-combining, it has no specific solution for this so its ioremap_wc() is a direct mapping, so we can just do a 1-1 mapping to the non-wc calls as well then. If we do this then we don't have to go on fixing drivers when they use this new API and if and when S390 gets some form of WC it can go and update its implementation but right now it has none.

Quoted 4 lines

I've tested the patch below on linux-next with make.cross ARCH=s390 with allyesconfig and it fixes the compile issue. I'll post this as a patch fix. Let me know if this is agreeable to you.

Sure, go ahead. It is a much better solution than mine, after all.

Guenter

Quoted 14 lines
arch/s390/include/asm/io.h +2 -0
index cb5fdf3a78fc..437e9af96688 100644
@@ -57,6 +57,8 @@ static inline void ioport_unmap(void __iomem *p)
   */
  #define pci_iomap pci_iomap
  #define pci_iounmap pci_iounmap
+#define pci_iomap_wc pci_iomap
+#define pci_iomap_wc_range pci_iomap_range
 
  #define memcpy_fromio(dst, src, count)	zpci_memcpy_fromio(dst, src, count)
  #define memcpy_toio(dst, src, count)	zpci_memcpy_toio(dst, src, count)