diff options
author | Shuai Xue <xueshuai@linux.alibaba.com> | 2022-08-30 19:32:23 +0800 |
---|---|---|
committer | Shuai Xue <xueshuai@linux.alibaba.com> | 2022-08-30 19:50:58 +0800 |
commit | cb000779db6e81845e3b19f24eea9ba53378bccb (patch) | |
tree | f04e06d707daf7b3119cea9a7b55f1cecbd98ba5 | |
parent | 00fac3288314f698d561a95d291b1f5c21bf72ed (diff) | |
download | ras-tools-cb000779db6e81845e3b19f24eea9ba53378bccb.tar.gz |
einj_mem_uc: Wait for injection to take effect before triggering
Einj interrupt may be a SPI on arm64 and could be dispatched to any core,
so the current process could run trigger action before the injection takes
effect.
Add a sleep to wait for injection completion, and then trigger.
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
-rw-r--r-- | einj_mem_uc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/einj_mem_uc.c b/einj_mem_uc.c index c653a59..9be39a2 100644 --- a/einj_mem_uc.c +++ b/einj_mem_uc.c @@ -1006,6 +1006,7 @@ int main(int argc, char **argv) } } else { t->inject(paddr, vaddr, t->notrigger); + sleep(3); t->trigger(vaddr); if (t->flags & F_SIGBUS) { printf("Expected SIGBUS, didn't get one\n"); |