From: Christian Borntraeger <borntraeger@linux.ibm.com>
To: Nam Cao <namcao@linutronix.de>,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org,
linux-s390 <linux-s390@vger.kernel.org>
Cc: Janosch Frank <frankja@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>
Subject: Re: [PATCH v2 03/31] KVM: s390: Switch to use hrtimer_setup()
Date: Fri, 7 Feb 2025 11:29:23 +0100 [thread overview]
Message-ID: <828a5848-518a-4049-b534-0ae45ca964b2@linux.ibm.com> (raw)
In-Reply-To: <637865c62963fb8cddf6c4368ca12434988a8c27.1738746821.git.namcao@linutronix.de>
Am 05.02.25 um 11:38 schrieb Nam Cao:
> 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.
>
> Patch was created by using Coccinelle.
>
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
> ---
> arch/s390/kvm/interrupt.c | 3 +--
> arch/s390/kvm/kvm-s390.c | 4 ++--
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
> index d4f031e086fc..11a33fa21dfd 100644
> --- a/arch/s390/kvm/interrupt.c
> +++ b/arch/s390/kvm/interrupt.c
> @@ -3171,8 +3171,7 @@ void kvm_s390_gisa_init(struct kvm *kvm)
> gi->alert.mask = 0;
> spin_lock_init(&gi->alert.ref_lock);
> gi->expires = 50 * 1000; /* 50 usec */
> - hrtimer_init(&gi->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> - gi->timer.function = gisa_vcpu_kicker;
> + hrtimer_setup(&gi->timer, gisa_vcpu_kicker, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> memset(gi->origin, 0, sizeof(struct kvm_s390_gisa));
> gi->origin->next_alert = (u32)virt_to_phys(gi->origin);
> VM_EVENT(kvm, 3, "gisa 0x%pK initialized", gi->origin);
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index d8080c27d45b..a0ef902c7a3d 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -3930,8 +3930,8 @@ static int kvm_s390_vcpu_setup(struct kvm_vcpu *vcpu)
> if (rc)
> return rc;
> }
> - hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> - vcpu->arch.ckc_timer.function = kvm_s390_idle_wakeup;
> + hrtimer_setup(&vcpu->arch.ckc_timer, kvm_s390_idle_wakeup, CLOCK_MONOTONIC,
> + HRTIMER_MODE_REL);
>
> vcpu->arch.sie_block->hpid = HPID_KVM;
>
next prev parent reply other threads:[~2025-02-07 10:30 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 10:38 [PATCH v2 00/31] hrtimers: Consolidate hrtimer initialization - Part 2 Nam Cao
2025-02-05 10:38 ` [PATCH v2 01/31] KVM: MIPS: Switch to use hrtimer_setup() Nam Cao
2025-02-05 10:38 ` [PATCH v2 02/31] KVM: PPC: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 03/31] KVM: s390: " Nam Cao
2025-02-07 10:29 ` Christian Borntraeger [this message]
2025-02-05 10:38 ` [PATCH v2 04/31] KVM: x86: " Nam Cao
2025-02-06 15:33 ` Sean Christopherson
2025-02-05 10:38 ` [PATCH v2 05/31] KVM: arm64: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 06/31] LoongArch: KVM: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 07/31] riscv: kvm: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 08/31] ARM: imx: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 09/31] ARM: 8611/1: l2x0: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 10/31] powerpc/watchdog: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 11/31] perf/x86: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 12/31] s390/ap_bus: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 13/31] sched: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 14/31] mm/slab: " Nam Cao
2025-02-05 10:38 ` [PATCH v2 15/31] lib: test_objpool: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 16/31] io_uring/timeout: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 17/31] fork: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 18/31] perf: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 19/31] timerfd: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 20/31] time: Switch to hrtimer_setup() Nam Cao
2025-02-05 10:39 ` [PATCH v2 21/31] bpf: Switch to use hrtimer_setup() Nam Cao
2025-02-05 10:39 ` [PATCH v2 22/31] ubifs: " Nam Cao
2025-02-10 19:36 ` Richard Weinberger
2025-02-05 10:39 ` [PATCH v2 23/31] watchdog: " Nam Cao
2025-02-11 16:16 ` Guenter Roeck
2025-02-13 11:16 ` Thomas Gleixner
2025-02-13 12:24 ` Guenter Roeck
2025-02-13 13:43 ` Nam Cao
2025-02-05 10:39 ` [PATCH v2 24/31] tracing/osnoise: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 25/31] block, bfq: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 26/31] ata: pata_octeon_cf: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 27/31] blk_iocost: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 28/31] PM: runtime: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 29/31] PM / devfreq: rockchip-dfi: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 30/31] null_blk: " Nam Cao
2025-02-05 10:39 ` [PATCH v2 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=828a5848-518a-4049-b534-0ae45ca964b2@linux.ibm.com \
--to=borntraeger@linux.ibm.com \
--cc=anna-maria@linutronix.de \
--cc=frankja@linux.ibm.com \
--cc=frederic@kernel.org \
--cc=imbrenda@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=namcao@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®