diff options
author | Huacai Chen <chenhuacai@loongson.cn> | 2025-05-14 22:17:52 +0800 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2025-05-14 22:17:52 +0800 |
commit | ceb9155d058a11242aa0572875c44e9713b1a2be (patch) | |
tree | e3931bb30e4148a0457fef67135a85abc214a045 /drivers/scsi/mpt2sas/mpi/mpi2_raid.h | |
parent | 3e245b7b74c3a2ead5fa4bad27cc275284c75189 (diff) |
LoongArch: Save and restore CSR.CNTC for hibernation
Save and restore CSR.CNTC for hibernation which is similar to suspend.
For host this is unnecessary because sched clock is ensured continuous,
but for kvm guest sched clock isn't enough because rdtime.d should also
be continuous.
Host::rdtime.d = Host::CSR.CNTC + counter
Guest::rdtime.d = Host::CSR.CNTC + Host::CSR.GCNTC + Guest::CSR.CNTC + counter
so,
Guest::rdtime.d = Host::rdtime.d + Host::CSR.GCNTC + Guest::CSR.CNTC
To ensure Guest::rdtime.d continuous, Host::rdtime.d should be at first
continuous, while Host::CSR.GCNTC / Guest::CSR.CNTC is maintained by KVM.
Cc: stable@vger.kernel.org
Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpi/mpi2_raid.h')
0 files changed, 0 insertions, 0 deletions