[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <173987200336.10177.14980244755318411952.tip-bot2@tip-bot2>
Date: Tue, 18 Feb 2025 09:46:43 -0000
From: "tip-bot2 for Nam Cao" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Nam Cao <namcao@...utronix.de>, Thomas Gleixner <tglx@...utronix.de>,
Marc Zyngier <maz@...nel.org>, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: timers/cleanups] KVM: arm64: Switch to use hrtimer_setup()
The following commit has been merged into the timers/cleanups branch of tip:
Commit-ID: 7e5fd922c1464bd0678491f470844884af56f810
Gitweb: https://git.kernel.org/tip/7e5fd922c1464bd0678491f470844884af56f810
Author: Nam Cao <namcao@...utronix.de>
AuthorDate: Wed, 05 Feb 2025 11:38:49 +01:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Tue, 18 Feb 2025 10:32:31 +01:00
KVM: arm64: Switch to use hrtimer_setup()
hrtimer_setup() takes the callback function pointer as argument and
initializes the timer completely.
Replace hrtimer_init() and the open coded initialization of
hrtimer::function with the new setup mechanism.
Signed-off-by: Nam Cao <namcao@...utronix.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/all/59f527713562ad491df7c216eeee0378e0eb2402.1738746821.git.namcao@linutronix.de
---
arch/arm64/kvm/arch_timer.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/kvm/arch_timer.c b/arch/arm64/kvm/arch_timer.c
index 70802e4..5133dcb 100644
--- a/arch/arm64/kvm/arch_timer.c
+++ b/arch/arm64/kvm/arch_timer.c
@@ -1070,8 +1070,7 @@ static void timer_context_init(struct kvm_vcpu *vcpu, int timerid)
else
ctxt->offset.vm_offset = &kvm->arch.timer_data.poffset;
- hrtimer_init(&ctxt->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
- ctxt->hrtimer.function = kvm_hrtimer_expire;
+ hrtimer_setup(&ctxt->hrtimer, kvm_hrtimer_expire, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
switch (timerid) {
case TIMER_PTIMER:
@@ -1098,8 +1097,8 @@ void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu)
timer_set_offset(vcpu_ptimer(vcpu), 0);
}
- hrtimer_init(&timer->bg_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
- timer->bg_timer.function = kvm_bg_timer_expire;
+ hrtimer_setup(&timer->bg_timer, kvm_bg_timer_expire, CLOCK_MONOTONIC,
+ HRTIMER_MODE_ABS_HARD);
}
void kvm_timer_init_vm(struct kvm *kvm)
Powered by blists - more mailing lists