View Issue Details

IDProjectCategoryView StatusLast Update
0013344CentOS-7kernelpublic2017-06-22 15:39
Reportertoracat 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version7.3.1611 
Target VersionFixed in Version 
Summary0013344: Compiling kernel-plus-3.10.0-514.21.1.el7.centos.plus fails on a 32-bit system
DescriptionCompilation of kernel-plus-3.10.0-514.21.1.el7.centos.plus on an i686 system results in the following error:

drivers/net/ethernet/mellanox/mlx5/core/alloc.c:127:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
            (void *)frag->map, buf->page_shift);

No problem with x86_64.
TagsNo tags attached.
abrt_hash
URL

Activities

toracat

toracat

2017-05-31 06:54

manager   ~0029368

A quick and dirty solution is to remove the defending code by disabling the mlx5_core driver.

@@ -2170,10 +2172,7 @@
 # CONFIG_MLX4_EN is not set
 CONFIG_MLX4_CORE=m
 CONFIG_MLX4_DEBUG=y
-CONFIG_MLX5_CORE=m
-CONFIG_MLX5_CORE_EN=y
-CONFIG_MLX5_CORE_EN_DCB=y
-CONFIG_MLX5_CORE_EN_VXLAN=y
+# CONFIG_MLX5_CORE is not set
 # CONFIG_NET_VENDOR_MICREL is not set
 # CONFIG_NET_VENDOR_MICROCHIP is not set
 CONFIG_NET_VENDOR_MYRI=y
@@ -4743,7 +4742,6 @@
 CONFIG_INFINIBAND_CXGB4=m
 CONFIG_INFINIBAND_I40IW=m
 CONFIG_MLX4_INFINIBAND=m
-CONFIG_MLX5_INFINIBAND=m
 CONFIG_INFINIBAND_NES=m
 # CONFIG_INFINIBAND_NES_DEBUG is not set
 CONFIG_INFINIBAND_OCRDMA=m

With the above modification to the config file (i686 only), the build now completes.
toracat

toracat

2017-06-01 17:01

manager   ~0029385

This patch:

https://lkml.org/lkml/2016/12/8/616

will likely fix the issue.
toracat

toracat

2017-06-01 17:09

manager   ~0029386

commit 9afd895271d91cd6ed743d22fce043f8c28b30ce
Author: Arnd Bergmann <arnd@arndb.de>
Date: Thu Dec 8 22:57:03 2016 +0100

    net/mlx5e: use %pad format string for dma_addr_t

    On 32-bit ARM with 64-bit dma_addr_t I get this warning about an
    incorrect format string:

    In file included from /git/arm-soc/drivers/net/ethernet/mellanox/mlx5/core/alloc.c:42:0:
    drivers/net/ethernet/mellanox/mlx5/core/alloc.c: In function ‘mlx5_frag_buf_alloc_node’:
    drivers/net/ethernet/mellanox/mlx5/core/alloc.c:134:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

    We have the special %pad format for printing dma_addr_t, so use that
    to print the correct address and avoid the warning.

    Fixes: 1c1b522808a1 ("net/mlx5e: Implement Fragmented Work Queue (WQ)")
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/alloc.c b/drivers/net/ethernet/mellanox/mlx5/core/alloc.c
index 44791de..66bd213 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/alloc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/alloc.c
@@ -130,8 +130,8 @@ int mlx5_frag_buf_alloc_node(struct mlx5_core_dev *dev, int size,
                if (frag->map & ((1 << buf->page_shift) - 1)) {
                        dma_free_coherent(&dev->pdev->dev, frag_sz,
                                          buf->frags[i].buf, buf->frags[i].map);
- mlx5_core_warn(dev, "unexpected map alignment: 0x%p, page_shift=%d\n",
- (void *)frag->map, buf->page_shift);
+ mlx5_core_warn(dev, "unexpected map alignment: %pad, page_shift=%d\n",
+ &frag->map, buf->page_shift);
                        goto err_free_buf;
                }
                size -= frag_sz;
toracat

toracat

2017-06-22 15:38

manager   ~0029551

kernel-plus-3.10.0-514.21.2.el7 is out. It has the patch from this bug report.

Issue History

Date Modified Username Field Change
2017-05-31 06:50 toracat New Issue
2017-05-31 06:54 toracat Note Added: 0029368
2017-05-31 06:54 toracat Status new => assigned
2017-06-01 17:01 toracat Note Added: 0029385
2017-06-01 17:09 toracat Note Added: 0029386
2017-06-22 15:38 toracat Note Added: 0029551
2017-06-22 15:39 toracat Status assigned => resolved
2017-06-22 15:39 toracat Resolution open => fixed