linux_dsm_epyc7002/drivers/platform/mellanox
Liming Sun 2d6168fa6b platform/mellanox: mlxbf-tmfifo: Fix a memory barrier issue
[ Upstream commit 1c0e5701c5e792c090aef0e5b9b8923c334d9324 ]

The virtio framework uses wmb() when updating avail->idx. It
guarantees the write order, but not necessarily loading order
for the code accessing the memory. This commit adds a load barrier
after reading the avail->idx to make sure all the data in the
descriptor is visible. It also adds a barrier when returning the
packet to virtio framework to make sure read/writes are visible to
the virtio code.

Fixes: 1357dfd726 ("platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc")
Signed-off-by: Liming Sun <limings@nvidia.com>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/1620433812-17911-1-git-send-email-limings@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-26 12:06:49 +02:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile platform/mellanox: Add bootctl driver for Mellanox BlueField Soc 2019-10-15 10:55:10 +03:00
mlxbf-bootctl.c platform/mellanox: fix the mlx-bootctl sysfs 2019-12-20 19:00:50 +02:00
mlxbf-bootctl.h platform/mellanox: Add bootctl driver for Mellanox BlueField Soc 2019-10-15 10:55:10 +03:00
mlxbf-tmfifo-regs.h platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc 2019-05-06 17:54:42 +03:00
mlxbf-tmfifo.c platform/mellanox: mlxbf-tmfifo: Fix a memory barrier issue 2021-05-26 12:06:49 +02:00
mlxreg-hotplug.c platform/mellanox: mlxreg-hotplug: Add environmental data to uevent 2020-07-15 12:45:07 +03:00
mlxreg-io.c platform/mellanox: mlxreg-io: Add support for complex attributes 2020-07-15 12:45:07 +03:00