IB/mlx5: Device memory support in mlx5_ib
authorAriel Levkovich <lariel@mellanox.com>
Thu, 5 Apr 2018 15:53:27 +0000 (18:53 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 5 Apr 2018 19:04:49 +0000 (13:04 -0600)
commit24da00164f7a9c247d2224a54494d0e955199630
treed38b046ff1b7f6cefef6e70e0193eba9089d61fe
parente72bd817aee2bd867a90aac68aca07d99addcb55
IB/mlx5: Device memory support in mlx5_ib

This patch adds the mlx5_ib driver implementation for the device
memory allocation API.
It implements the ib_device callbacks for allocation and deallocation
operations as well as a new mmap command support which allows mapping
an allocated device memory to a VMA.

The change also adds reporting of device memory maximum size and
alignment parameters reported in device capabilities.

The allocation/deallocation operations are using new firmware
commands to allocate MEMIC memory on the device.

Signed-off-by: Ariel Levkovich <lariel@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/cmd.c
drivers/infiniband/hw/mlx5/cmd.h
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
include/linux/mlx5/mlx5_ifc.h
include/uapi/rdma/mlx5-abi.h
include/uapi/rdma/mlx5_user_ioctl_cmds.h