diff options
| author | 2025-11-09 16:02:09 +0800 | |
|---|---|---|
| committer | 2025-11-10 08:37:07 +0800 | |
| commit | d3c9515e4f9d10ccb113adb4809db5cc31e7ef65 (patch) | |
| tree | ae8df28a54da8f061ca4862d3eeb1a4a6e361fe7 /net/unix/garbage.c | |
| parent | LoongArch: KVM: Set page with write attribute if dirty track disabled (diff) | |
| download | wireguard-linux-d3c9515e4f9d10ccb113adb4809db5cc31e7ef65.tar.xz wireguard-linux-d3c9515e4f9d10ccb113adb4809db5cc31e7ef65.zip | |
LoongArch: KVM: Add delay until timer interrupt injected
When timer is fired in oneshot mode, CSR.TVAL will stop with value -1
rather than 0. However when the register CSR.TVAL is restored, it will
continue to count down rather than stop there.
Now the method is to write 0 to CSR.TVAL, wait to count down for 1 cycle
at least, which is 10ns with a timer freq 100MHz, and then retore timer
interrupt status. Here add 2 cycles delay to assure that timer interrupt
is injected.
With this patch, timer selftest case passes to run always.
Cc: stable@vger.kernel.org
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'net/unix/garbage.c')
0 files changed, 0 insertions, 0 deletions
