* [PATCH] infiniband: mlx5: fix build error when INFINIBAND_USER_ACCESS=m
@ 2018-04-16 21:21 Randy Dunlap
2018-04-16 21:55 ` Jason Gunthorpe
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2018-04-16 21:21 UTC (permalink / raw)
To: linux-rdma
Cc: LKML, Matan Barak, Jason Gunthorpe, Leon Romanovsky, Doug Ledford
From: Randy Dunlap <rdunlap@infradead.org>
Fix build errors when INFINIBAND_USER_ACCESS=m and MLX5_INFINIBAND=y.
The build error occurs when the mlx5 driver code attempts to use
USER_ACCESS interfaces, which are built as a loadable module.
Fixes these build errors:
drivers/infiniband/hw/mlx5/main.o: In function `populate_specs_root':
../drivers/infiniband/hw/mlx5/main.c:4982: undefined reference to `uverbs_default_get_objects'
../drivers/infiniband/hw/mlx5/main.c:4994: undefined reference to `uverbs_alloc_spec_tree'
drivers/infiniband/hw/mlx5/main.o: In function `depopulate_specs_root':
../drivers/infiniband/hw/mlx5/main.c:5001: undefined reference to `uverbs_free_spec_tree'
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Matan Barak <matanb@mellanox.com>
Cc: Jason Gunthorpe <jgg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>
Cc: Doug Ledford <dledford@redhat.com>
Cc: linux-rdma@vger.kernel.org
Cc: stable@vger.kernel.org # reported against 4.16
---
drivers/infiniband/hw/mlx5/Kconfig | 1 +
1 file changed, 1 insertion(+)
--- lnx-417-rc1.orig/drivers/infiniband/hw/mlx5/Kconfig
+++ lnx-417-rc1/drivers/infiniband/hw/mlx5/Kconfig
@@ -1,6 +1,7 @@
config MLX5_INFINIBAND
tristate "Mellanox Connect-IB HCA support"
depends on NETDEVICES && ETHERNET && PCI && MLX5_CORE
+ select INFINIBAND_USER_ACCESS
---help---
This driver provides low-level InfiniBand support for
Mellanox Connect-IB PCI Express host channel adapters (HCAs).
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] infiniband: mlx5: fix build error when INFINIBAND_USER_ACCESS=m
2018-04-16 21:21 [PATCH] infiniband: mlx5: fix build error when INFINIBAND_USER_ACCESS=m Randy Dunlap
@ 2018-04-16 21:55 ` Jason Gunthorpe
2018-04-17 1:49 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Jason Gunthorpe @ 2018-04-16 21:55 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-rdma, LKML, Matan Barak, Leon Romanovsky, Doug Ledford
On Mon, Apr 16, 2018 at 02:21:07PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Fix build errors when INFINIBAND_USER_ACCESS=m and MLX5_INFINIBAND=y.
> The build error occurs when the mlx5 driver code attempts to use
> USER_ACCESS interfaces, which are built as a loadable module.
>
> Fixes these build errors:
>
> drivers/infiniband/hw/mlx5/main.o: In function `populate_specs_root':
> ../drivers/infiniband/hw/mlx5/main.c:4982: undefined reference to `uverbs_default_get_objects'
> ../drivers/infiniband/hw/mlx5/main.c:4994: undefined reference to `uverbs_alloc_spec_tree'
> drivers/infiniband/hw/mlx5/main.o: In function `depopulate_specs_root':
> ../drivers/infiniband/hw/mlx5/main.c:5001: undefined reference to `uverbs_free_spec_tree'
>
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Matan Barak <matanb@mellanox.com>
> Cc: Jason Gunthorpe <jgg@mellanox.com>
> Cc: Leon Romanovsky <leonro@mellanox.com>
> Cc: Doug Ledford <dledford@redhat.com>
> Cc: linux-rdma@vger.kernel.org
> Cc: stable@vger.kernel.org # reported against 4.16
> drivers/infiniband/hw/mlx5/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> +++ lnx-417-rc1/drivers/infiniband/hw/mlx5/Kconfig
> @@ -1,6 +1,7 @@
> config MLX5_INFINIBAND
> tristate "Mellanox Connect-IB HCA support"
> depends on NETDEVICES && ETHERNET && PCI && MLX5_CORE
> + select INFINIBAND_USER_ACCESS
Shouldn't this be done via
depends on m || INFINIBAND_USER_ACCESS != m
?
We can turn off USER_ACCESS and still successfully compile the driver.
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] infiniband: mlx5: fix build error when INFINIBAND_USER_ACCESS=m
2018-04-16 21:55 ` Jason Gunthorpe
@ 2018-04-17 1:49 ` Randy Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2018-04-17 1:49 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: linux-rdma, LKML, Matan Barak, Leon Romanovsky, Doug Ledford
On 04/16/18 14:55, Jason Gunthorpe wrote:
> On Mon, Apr 16, 2018 at 02:21:07PM -0700, Randy Dunlap wrote:
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> Fix build errors when INFINIBAND_USER_ACCESS=m and MLX5_INFINIBAND=y.
>> The build error occurs when the mlx5 driver code attempts to use
>> USER_ACCESS interfaces, which are built as a loadable module.
>>
>> Fixes these build errors:
>>
>> drivers/infiniband/hw/mlx5/main.o: In function `populate_specs_root':
>> ../drivers/infiniband/hw/mlx5/main.c:4982: undefined reference to `uverbs_default_get_objects'
>> ../drivers/infiniband/hw/mlx5/main.c:4994: undefined reference to `uverbs_alloc_spec_tree'
>> drivers/infiniband/hw/mlx5/main.o: In function `depopulate_specs_root':
>> ../drivers/infiniband/hw/mlx5/main.c:5001: undefined reference to `uverbs_free_spec_tree'
>>
>> Reported-by: kbuild test robot <lkp@intel.com>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Matan Barak <matanb@mellanox.com>
>> Cc: Jason Gunthorpe <jgg@mellanox.com>
>> Cc: Leon Romanovsky <leonro@mellanox.com>
>> Cc: Doug Ledford <dledford@redhat.com>
>> Cc: linux-rdma@vger.kernel.org
>> Cc: stable@vger.kernel.org # reported against 4.16
>> drivers/infiniband/hw/mlx5/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> +++ lnx-417-rc1/drivers/infiniband/hw/mlx5/Kconfig
>> @@ -1,6 +1,7 @@
>> config MLX5_INFINIBAND
>> tristate "Mellanox Connect-IB HCA support"
>> depends on NETDEVICES && ETHERNET && PCI && MLX5_CORE
>> + select INFINIBAND_USER_ACCESS
>
> Shouldn't this be done via
>
> depends on m || INFINIBAND_USER_ACCESS != m
>
> ?
>
> We can turn off USER_ACCESS and still successfully compile the driver.
Argh, thanks, I didn't notice that. v2 on the way but not quite the way
that you mentioned, more like it's done in other (netdev) places.
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-17 1:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-16 21:21 [PATCH] infiniband: mlx5: fix build error when INFINIBAND_USER_ACCESS=m Randy Dunlap
2018-04-16 21:55 ` Jason Gunthorpe
2018-04-17 1:49 ` Randy Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.