Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1527549 > unrolled thread

[PATCH net-next] marvell: mark mvneta and mvpp2 32-bit only

Started byArnd Bergmann <arnd@arndb.de>
First post2016-11-22 15:30 +0100
Last post2016-11-22 16:20 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net-next] marvell: mark mvneta and mvpp2 32-bit only Arnd Bergmann <arnd@arndb.de> - 2016-11-22 15:30 +0100
    Re: [PATCH net-next] marvell: mark mvneta and mvpp2 32-bit only Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-11-22 16:20 +0100
    Re: [PATCH net-next] marvell: mark mvneta and mvpp2 32-bit only David Miller <davem@davemloft.net> - 2016-11-22 16:20 +0100

#1527549 — [PATCH net-next] marvell: mark mvneta and mvpp2 32-bit only

FromArnd Bergmann <arnd@arndb.de>
Date2016-11-22 15:30 +0100
Subject[PATCH net-next] marvell: mark mvneta and mvpp2 32-bit only
Message-ID<sGkf8-8lc-39@gated-at.bofh.it>
Both of these drivers won't work on 64-bit architectures unless they
are redesigned, since they store a virtual address pointer in a 32-bit
field of the descriptors:

drivers/net/ethernet/marvell/mvneta_bm.c: In function 'mvneta_bm_construct':
drivers/net/ethernet/marvell/mvneta_bm.c:103:16: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_vlan_init':
drivers/net/ethernet/marvell/mvpp2.c:2563:32: error: large integer implicitly truncated to unsigned type [-Werror=overflow]

This limits the COMPILE_TEST option for the two drivers again to
only build them on 32-bit. This seems nicer than shutting up the
warnings, in case we ever actually want to use them on 64-bit,
as the warnings indicate which parts of the driver are currently
broken there.

Fixes: a0627f776a45 ("net: marvell: Allow drivers to be built with COMPILE_TEST")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/marvell/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/marvell/Kconfig b/drivers/net/ethernet/marvell/Kconfig
index d74d4e6f0b34..66fd9dbb2ca7 100644
--- a/drivers/net/ethernet/marvell/Kconfig
+++ b/drivers/net/ethernet/marvell/Kconfig
@@ -58,6 +58,7 @@ config MVNETA
 	tristate "Marvell Armada 370/38x/XP network interface support"
 	depends on PLAT_ORION || COMPILE_TEST
 	depends on HAS_DMA
+	depends on !64BIT
 	select MVMDIO
 	select FIXED_PHY
 	---help---
@@ -81,6 +82,7 @@ config MVPP2
 	tristate "Marvell Armada 375 network interface support"
 	depends on MACH_ARMADA_375 || COMPILE_TEST
 	depends on HAS_DMA
+	depends on !64BIT
 	select MVMDIO
 	---help---
 	  This driver supports the network interface units in the
-- 
2.9.0

[toc] | [next] | [standalone]


#1527589

FromGregory CLEMENT <gregory.clement@free-electrons.com>
Date2016-11-22 16:20 +0100
Message-ID<sGl1v-oK-5@gated-at.bofh.it>
In reply to#1527549
Hi Arnd,
 
 On mar., nov. 22 2016, Arnd Bergmann <arnd@arndb.de> wrote:

> Both of these drivers won't work on 64-bit architectures unless they
> are redesigned, since they store a virtual address pointer in a 32-bit
> field of the descriptors:
>
> drivers/net/ethernet/marvell/mvneta_bm.c: In function 'mvneta_bm_construct':
> drivers/net/ethernet/marvell/mvneta_bm.c:103:16: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_vlan_init':
> drivers/net/ethernet/marvell/mvpp2.c:2563:32: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
>
> This limits the COMPILE_TEST option for the two drivers again to
> only build them on 32-bit. This seems nicer than shutting up the
> warnings, in case we ever actually want to use them on 64-bit,
> as the warnings indicate which parts of the driver are currently

Actually we are using these drivers on 64-bits so obviously there are
not 32 bits only!

For mvneta currently we do not use BM on the 64-bits version. I agree
that there is a problem with mvneta_bm.c when building in 64-bits but it
should not prevent us to use the mvneta driver.

Gregory

> broken there.
>
> Fixes: a0627f776a45 ("net: marvell: Allow drivers to be built with COMPILE_TEST")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/net/ethernet/marvell/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/marvell/Kconfig b/drivers/net/ethernet/marvell/Kconfig
> index d74d4e6f0b34..66fd9dbb2ca7 100644
> --- a/drivers/net/ethernet/marvell/Kconfig
> +++ b/drivers/net/ethernet/marvell/Kconfig
> @@ -58,6 +58,7 @@ config MVNETA
>  	tristate "Marvell Armada 370/38x/XP network interface support"
>  	depends on PLAT_ORION || COMPILE_TEST
>  	depends on HAS_DMA
> +	depends on !64BIT
>  	select MVMDIO
>  	select FIXED_PHY
>  	---help---
> @@ -81,6 +82,7 @@ config MVPP2
>  	tristate "Marvell Armada 375 network interface support"
>  	depends on MACH_ARMADA_375 || COMPILE_TEST
>  	depends on HAS_DMA
> +	depends on !64BIT
>  	select MVMDIO
>  	---help---
>  	  This driver supports the network interface units in the
> -- 
> 2.9.0
>

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

[toc] | [prev] | [next] | [standalone]


#1527592

FromDavid Miller <davem@davemloft.net>
Date2016-11-22 16:20 +0100
Message-ID<sGl1v-oK-17@gated-at.bofh.it>
In reply to#1527549
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 22 Nov 2016 15:21:22 +0100

> Both of these drivers won't work on 64-bit architectures unless they
> are redesigned, since they store a virtual address pointer in a 32-bit
> field of the descriptors:
> 
> drivers/net/ethernet/marvell/mvneta_bm.c: In function 'mvneta_bm_construct':
> drivers/net/ethernet/marvell/mvneta_bm.c:103:16: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> drivers/net/ethernet/marvell/mvpp2.c: In function 'mvpp2_prs_vlan_init':
> drivers/net/ethernet/marvell/mvpp2.c:2563:32: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
> 
> This limits the COMPILE_TEST option for the two drivers again to
> only build them on 32-bit. This seems nicer than shutting up the
> warnings, in case we ever actually want to use them on 64-bit,
> as the warnings indicate which parts of the driver are currently
> broken there.
> 
> Fixes: a0627f776a45 ("net: marvell: Allow drivers to be built with COMPILE_TEST")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Ok, this is a reasonable thing to do for now until the 64-bit patches
are sorted out.

Applied, thanks Arnd.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web