nvme: add memory barrier in completion path for arm64

Add a memory barrier for arm64 to prevent possible reordering
of tracker and cpl access,
because arm64 has less strict memory ordering behavior than x86.

Change-Id: I0a8716f7bfeffb0bbce27ee3174e214c8e4566b4
Signed-off-by: heyang <heyang18@huawei.com>
Reviewed-on: https://review.gerrithub.io/c/442964 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447592
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
heyang 2019-02-01 14:33:19 +08:00 committed by Darek Stojaczyk
parent 9f6a6b1942
commit a5879f56f4

View File

@ -2084,7 +2084,7 @@ nvme_pcie_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_
if (cpl->status.p != pqpair->phase) {
break;
}
#ifdef __PPC64__
#if defined(__PPC64__) || defined(__aarch64__)
/*
* This memory barrier prevents reordering of:
* - load after store from/to tr