IB/mlx5: Generally use the WC auto detection test result
authorYishai Hadas <yishaih@mellanox.com>
Wed, 18 Mar 2020 10:03:23 +0000 (12:03 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 24 Mar 2020 23:22:21 +0000 (20:22 -0300)
commit1f3db161881b7e21efb149e0ae8152b79a571a8f
tree6a304e77741d8df8d388ba8437a2ccb844b20df9
parent38dcb35048fdc9b11530b23c092b250b2e8135a1
IB/mlx5: Generally use the WC auto detection test result

Now that we have direct and reliable detection of WC support by the
system, use is broadly. The only case we have to worry about is when the
WC autodetector cannot run.

For this fringe case generally assume that that WC is available, except in
the well defined case of no PAT support on x86 which is tested by calling
arch_can_pci_mmap_wc().

If WC is wrongly assumed to be available then it causes a small
performance hit on paths in userspace that are tuned to the assumption
that WC is available. There is no functional loss.

It is very unlikely that any platforms exist that lack WC and also care
about the micro optimization of WC in the fringe case where autodetection
does not work.

By removing the fairly bogus CONFIG tests this makes WC work broadly on
all arches and all platforms.

Link: https://lore.kernel.org/r/20200318100323.46659-1-leon@kernel.org
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Michael Guralnik <michaelgur@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mem.c