All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Nam Cao <namcao@linutronix.de>
Cc: Anna-Maria Behnsen <anna-maria@linutronix.de>,
	Frederic Weisbecker <frederic@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andreas Hindborg <a.hindborg@kernel.org>,
	Alice Ryhl <aliceryhl@google.com>,
	Miguel Ojeda <ojeda@kernel.org>, Kees Cook <kees@kernel.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Joey Gouly <joey.gouly@arm.com>,
	Oliver Upton <oliver.upton@linux.dev>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 05/31] KVM: arm64: Switch to use hrtimer_setup()
Date: Mon, 28 Oct 2024 10:56:11 +0000	[thread overview]
Message-ID: <87msiots1g.wl-maz@kernel.org> (raw)
In-Reply-To: <c8a1987ae32ee2596c90fc4403fa767cf5a3f2f4.1729864823.git.namcao@linutronix.de>

[+ the rest of the KVM/arm64 maintainers/reviewers]

On Mon, 28 Oct 2024 07:31:38 +0000,
Nam Cao <namcao@linutronix.de> wrote:
> 
> There is a newly introduced hrtimer_setup() which will replace
> hrtimer_init(). This new function is similar to the old one, except that it
> also sanity-checks and initializes the timer's callback function.
> 
> Switch to use this new function.
> 
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> ---
> Cc: Marc Zyngier <maz@kernel.org>
> ---
>  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 879982b1cc73..92e4fb5dcf52 100644
> --- a/arch/arm64/kvm/arch_timer.c
> +++ b/arch/arm64/kvm/arch_timer.c
> @@ -993,8 +993,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:
> @@ -1021,8 +1020,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)


Acked-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2024-10-28 10:56 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28  7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
2024-10-28  7:31 ` [PATCH 01/31] KVM: MIPS: Switch to use hrtimer_setup() Nam Cao
2024-10-28  7:31 ` [PATCH 02/31] KVM: PPC: " Nam Cao
2024-10-28  7:31 ` [PATCH 03/31] KVM: s390: " Nam Cao
2024-10-28  7:31 ` [PATCH 04/31] KVM: x86: " Nam Cao
2024-10-28 13:53   ` kernel test robot
2024-10-28 19:17   ` kernel test robot
2024-10-28  7:31 ` [PATCH 05/31] KVM: arm64: " Nam Cao
2024-10-28 10:56   ` Marc Zyngier [this message]
2024-10-28  7:31 ` [PATCH 06/31] LoongArch: KVM: " Nam Cao
2024-10-28  7:31 ` [PATCH 07/31] riscv: kvm: " Nam Cao
2024-10-28  7:31 ` [PATCH 08/31] ARM: imx: " Nam Cao
2024-10-28  7:31 ` [PATCH 09/31] ARM: 8611/1: l2x0: " Nam Cao
2024-10-28  7:31 ` [PATCH 10/31] powerpc/watchdog: " Nam Cao
2024-10-28  7:31 ` [PATCH 11/31] perf/x86: " Nam Cao
2024-10-28  7:31 ` [PATCH 12/31] s390/ap_bus: " Nam Cao
2024-10-28  7:31 ` [PATCH 13/31] sched: " Nam Cao
2024-10-28 12:51   ` kernel test robot
2024-10-28  7:31 ` [PATCH 14/31] rcu: " Nam Cao
2024-10-28 13:52   ` Paul E. McKenney
2024-10-28  7:31 ` [PATCH 15/31] lib: test_objpool: " Nam Cao
2024-10-28  7:31 ` [PATCH 16/31] io_uring/timeout: " Nam Cao
2025-05-02  8:50   ` Pavel Begunkov
2024-10-28  7:31 ` [PATCH 17/31] fork: " Nam Cao
2024-10-28  7:31 ` [PATCH 18/31] perf: " Nam Cao
2024-10-28  7:31 ` [PATCH 19/31] timerfd: " Nam Cao
2024-10-28  7:31 ` [PATCH 20/31] time: Switch to hrtimer_setup() Nam Cao
2024-10-28  7:31 ` [PATCH 21/31] bpf: Switch to use hrtimer_setup() Nam Cao
2024-10-28  7:31 ` [PATCH 22/31] ubifs: " Nam Cao
2024-10-28  7:31 ` [PATCH 23/31] watchdog: " Nam Cao
2024-10-28  7:31 ` [PATCH 24/31] tracing/osnoise: " Nam Cao
2024-10-28  7:52   ` Steven Rostedt
2024-10-28  7:31 ` [PATCH 25/31] block, bfq: " Nam Cao
2024-10-28  7:31 ` [PATCH 26/31] ata: pata_octeon_cf: " Nam Cao
2024-10-29 23:41   ` Damien Le Moal
2024-10-28  7:32 ` [PATCH 27/31] blk_iocost: " Nam Cao
2024-10-28  7:32 ` [PATCH 28/31] PM: runtime: " Nam Cao
2024-10-28 11:43   ` Rafael J. Wysocki
2024-10-28  7:32 ` [PATCH 29/31] PM / devfreq: rockchip-dfi: " Nam Cao
2024-12-08 12:39   ` Chanwoo Choi
2024-10-28  7:32 ` [PATCH 30/31] null_blk: " Nam Cao
2024-10-28  7:32 ` [PATCH 31/31] hwrng: timeriomem: " Nam Cao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87msiots1g.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=anna-maria@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=joey.gouly@arm.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namcao@linutronix.de \
    --cc=ojeda@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.