kernel_optimize_test/drivers/nvme/host
Marta Rybczynska d783e0bd02 nvme: avoid cqe corruption when update at the same time as read
Make sure the CQE phase (validity) is read before the rest of the
structure. The phase bit is the highest address and the CQE
read will happen on most platforms from lower to upper addresses
and will be done by multiple non-atomic loads. If the structure
is updated by PCI during the reads from the processor, the
processor may get a corrupted copy.

The addition of the new nvme_cqe_valid function that verifies
the validity bit also allows refactoring of the other CQE read
sequences.

Signed-off-by: Marta Rybczynska <marta.rybczynska@kalray.eu>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2016-03-22 10:27:29 -06:00
..
core.c Merge branch 'for-4.6/drivers' of git://git.kernel.dk/linux-block 2016-03-18 17:13:31 -07:00
Kconfig Merge branch 'for-4.6/drivers' of git://git.kernel.dk/linux-block 2016-03-18 17:13:31 -07:00
lightnvm.c nvme: lightnvm: return ppa completion status 2016-03-18 18:10:38 -07:00
Makefile nvme: split pci module out of core module 2016-02-10 14:22:38 -07:00
nvme.h Merge branch 'for-4.6/drivers' of git://git.kernel.dk/linux-block 2016-03-18 17:13:31 -07:00
pci.c nvme: avoid cqe corruption when update at the same time as read 2016-03-22 10:27:29 -06:00
scsi.c nvme: move chardev and sysfs interface to common code 2015-12-01 10:59:40 -07:00