nvme: flush dcache on both r/w, and the prp list
authorPatrick Wildt <patrick@blueri.se>
Wed, 16 Oct 2019 21:22:50 +0000 (23:22 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 31 Oct 2019 11:22:53 +0000 (07:22 -0400)
commit8c403402ca691c967516481b6bc2c879d683a73d
treecab6c81fd9b422fcac6be3b9dccb346f98e3dab4
parent232ba7623171635e971227696edefddc84d47927
nvme: flush dcache on both r/w, and the prp list

It's possible that the data cache for the buffer still holds data
to be flushed to memory, since the buffer was probably used as stack
before.  Thus we need to make sure to flush it also on reads, since
it's possible that the cache is automatically flused to memory after
the NVMe DMA transfer happened, thus overwriting the NVMe transfer's
data.  Also add a missing dcache flush for the prp list.

Signed-off-by: Patrick Wildt <patrick@blueri.se>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/nvme/nvme.c