]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RISC-V: KVM: Move timer state defines closer to struct in UAPI header
authorAnup Patel <anup.patel@oss.qualcomm.com>
Tue, 20 Jan 2026 07:59:52 +0000 (13:29 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 3 Apr 2026 12:05:38 +0000 (17:35 +0530)
The KVM_RISCV_TIMER_STATE_xyz defines specify possible values of the
"state" member in struct kvm_riscv_timer so move these defines closer
to struct kvm_riscv_timer in uapi/asm/kvm.h.

Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260120080013.2153519-7-anup.patel@oss.qualcomm.com
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/uapi/asm/kvm.h

index 6a89c1d00a7203d85f298ccdae492f68468500ff..504e73305343a8d3ffac39ed8fb675f90e1d6ed3 100644 (file)
@@ -110,6 +110,10 @@ struct kvm_riscv_timer {
        __u64 state;
 };
 
+/* Possible states for kvm_riscv_timer */
+#define KVM_RISCV_TIMER_STATE_OFF      0
+#define KVM_RISCV_TIMER_STATE_ON       1
+
 /*
  * ISA extension IDs specific to KVM. This is not the same as the host ISA
  * extension IDs as that is internal to the host and should not be exposed
@@ -238,10 +242,6 @@ struct kvm_riscv_sbi_fwft {
        struct kvm_riscv_sbi_fwft_feature pointer_masking;
 };
 
-/* Possible states for kvm_riscv_timer */
-#define KVM_RISCV_TIMER_STATE_OFF      0
-#define KVM_RISCV_TIMER_STATE_ON       1
-
 /* If you need to interpret the index values, here is the key: */
 #define KVM_REG_RISCV_TYPE_MASK                0x00000000FF000000
 #define KVM_REG_RISCV_TYPE_SHIFT       24