Skip to contentSkip to conversation

net: thunderx: add 64-bit dependency

PATCH Applied Arnd Bergmann 3 participants 3 messages May 28, 2015 – May 31, 2015

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

PATCH 1/1 net: thunderx: add 64-bit dependency

The thunderx ethernet driver fails to build on architectures that do not have an atomic readq() and writeq() function for 64-bit PCI bus access:

drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function 'bgx_reg_read':
include/asm-generic/io.h:195:23: error: implicit declaration of function 'readq' [-Werror=implicit-function-declaration]

It seems impossible to get this driver to work on most 32-bit hardware, so it's better to add an explicit dependency, in order to let us keep building 'allmodconfig' kernels on all architectures.

As the driver is meant for the internal hardware on an arm64 SoC, this is not a problem for usability. Allowing the build on all 64-bit architectures rather than just CONFIG_ARM64 on the other hand means that we get the benefit of build testing on x86.

drivers/net/ethernet/cavium/Kconfig +1 -1
index 6365fb4242be..fc3d8e3ee807 100644
@@ -4,7 +4,7 @@
 
 config NET_VENDOR_CAVIUM
 	tristate "Cavium ethernet drivers"
-	depends on PCI
+	depends on PCI && 64BIT
 	---help---
 	  Enable support for the Cavium ThunderX Network Interface
 	  Controller (NIC). The NIC provides the controller and DMA
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Arnd Bergmann

The thunderx ethernet driver fails to build on architectures that do not have an atomic readq() and writeq() function for 64-bit PCI bus access:

drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function 'bgx_reg_read':
include/asm-generic/io.h:195:23: error: implicit declaration of function 'readq' [-Werror=implicit-function-declaration]

It seems impossible to get this driver to work on most 32-bit hardware, so it's better to add an explicit dependency, in order to let us keep building 'allmodconfig' kernels on all architectures.

Quoted 6 lines

As the driver is meant for the internal hardware on an arm64 SoC, this is not a problem for usability. Allowing the build on all 64-bit architectures rather than just CONFIG_ARM64 on the other hand means that we get the benefit of build testing on x86.

Thanks for the quick fix. I agree with your analysis...

Quoted 15 lines
drivers/net/ethernet/cavium/Kconfig +1 -1
index 6365fb4242be..fc3d8e3ee807 100644
@@ -4,7 +4,7 @@
 
  config NET_VENDOR_CAVIUM
  	tristate "Cavium ethernet drivers"
-	depends on PCI
+	depends on PCI && 64BIT
  	---help---
  	  Enable support for the Cavium ThunderX Network Interface
  	  Controller (NIC). The NIC provides the controller and DMA
maintainer Applied
#2 lore raw
In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>
Date: Thu, 28 May 2015 16:00:46 +0200

Quoted 12 lines

The thunderx ethernet driver fails to build on architectures that do not have an atomic readq() and writeq() function for 64-bit PCI bus access:

drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function 'bgx_reg_read':
include/asm-generic/io.h:195:23: error: implicit declaration of function 'readq' [-Werror=implicit-function-declaration]

It seems impossible to get this driver to work on most 32-bit hardware, so it's better to add an explicit dependency, in order to let us keep building 'allmodconfig' kernels on all architectures.

Quoted 6 lines

As the driver is meant for the internal hardware on an arm64 SoC, this is not a problem for usability. Allowing the build on all 64-bit architectures rather than just CONFIG_ARM64 on the other hand means that we get the benefit of build testing on x86.

Applied, thanks Arnd.