android_kernel_xiaomi_sm8350/drivers/infiniband/hw/nes
Roland Dreier 31d1e340f0 RDMA/nes: Remove volatile qualifier from struct nes_hw_cq.cq_vbase
Remove the volatile qualifier from the cq_vbase member of struct
nes_hw_cq, and add an rmb() in the one place where it looks like
access order might make a difference.  As usual, removing a volatile
qualifier in a declaration is actually a bug fix, since a volatile
qualifier is not sufficient to make sure that aggressively
out-of-order CPUs don't reorder things and cause incorrect results.

For example, a CPU might speculatively execute reads of other cqe
fields before the NIC hardware has written those fields and before it
has set the NES_CQE_VALID bit (even though those reads come after the
test of the NES_CQE_VALID bit in program order), but then when the CPU
actually executes the conditional test of the NES_CQE_VALID, the bit
has been set, and the CPU will proceed with the results of the earlier
speculative execution and end up using bogus data.

This also gets rid of the warning:

    drivers/infiniband/hw/nes/nes_verbs.c: In function 'nes_destroy_cq':
    drivers/infiniband/hw/nes/nes_verbs.c:1978: warning: passing argument 3 of 'pci_free_consistent' discards qualifiers from pointer target type

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-04-23 11:55:45 -07:00
..
Kconfig
Makefile
nes_cm.c RDMA/nes: Fix adapter reset after PXE boot 2008-04-23 11:55:45 -07:00
nes_cm.h RDMA/nes: Remove session_id from nes_cm stuff 2008-04-16 21:09:25 -07:00
nes_context.h
nes_hw.c RDMA/nes: Fix adapter reset after PXE boot 2008-04-23 11:55:45 -07:00
nes_hw.h RDMA/nes: Remove volatile qualifier from struct nes_hw_cq.cq_vbase 2008-04-23 11:55:45 -07:00
nes_nic.c RDMA/nes: Use print_mac() to format ethernet addresses for printing 2008-04-23 11:52:18 -07:00
nes_user.h
nes_utils.c RDMA/nes: Print IPv4 addresses in a readable format 2008-04-23 11:55:43 -07:00
nes_verbs.c RDMA/nes: Remove volatile qualifier from struct nes_hw_cq.cq_vbase 2008-04-23 11:55:45 -07:00
nes_verbs.h
nes.c RDMA/nes: Print IPv4 addresses in a readable format 2008-04-23 11:55:43 -07:00
nes.h drivers: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:16:32 -04:00