* [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5)
@ 2024-10-28 7:31 Nam Cao
2024-10-28 7:31 ` [PATCH 01/31] KVM: MIPS: Switch to use hrtimer_setup() Nam Cao
` (30 more replies)
0 siblings, 31 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Thomas Bogendoerfer, Michael Ellerman,
Christian Borntraeger, Sean Christopherson, Marc Zyngier,
Huacai Chen, Anup Patel, Sascha Hauer, Russell King,
Peter Zijlstra, Paul E. McKenney, Andrew Morton, Jens Axboe,
Oleg Nesterov, Christian Brauner, John Stultz, Alexei Starovoitov,
Richard Weinberger, Wim Van Sebroeck, Steven Rostedt,
Damien Le Moal, Rafael J. Wysocki, Heiko Stuebner, Herbert Xu
This is the second part of a 5-part series (split for convenience). All 5
parts are:
Part 1: https://lore.kernel.org/lkml/cover.1729864615.git.namcao@linutronix.de
Part 2: https://lore.kernel.org/lkml/cover.1729864823.git.namcao@linutronix.de
Part 3: https://lore.kernel.org/lkml/cover.1729865232.git.namcao@linutronix.de
Part 4: https://lore.kernel.org/lkml/cover.1729865485.git.namcao@linutronix.de
Part 5: https://lore.kernel.org/lkml/cover.1729865740.git.namcao@linutronix.de
To use hrtimer, hrtimer_init() (or one of its variant) must be called, and
also the timer's callfack function must be setup separately.
That can cause misuse of hrtimer. For example, because:
- The callback function is not setup
- The callback function is setup while it is not safe to do so
To prevent misuse of hrtimer, this series:
- Introduce new functions hrtimer_setup*(). These new functions are
similar to hrtimer_init*(), except that they also sanity-check and
initialize the callback function.
- Introduce hrtimer_update_function() which checks that it is safe to
change the callback function. The 'function' field of hrtimer is then
made private.
- Convert all users to use the new functions.
- Some minor cleanups on the way.
Most conversion patches were created using Coccinelle with the sematic
patch below; except for tricky cases that Coccinelle cannot handle, or for
some cases where a Coccinelle's bug regarding 100 column limit is
triggered. Any patches not mentioning Coccinelle were done manually.
virtual patch
@@ expression timer, clock, mode, func; @@
- hrtimer_init(timer, clock, mode);
...
- timer->function = func;
+ hrtimer_setup(timer, func, clock, mode);
@@ expression timer, clock, mode, func; @@
- hrtimer_init(&timer, clock, mode);
...
- timer.function = func;
+ hrtimer_setup(&timer, func, clock, mode);
@@ expression timer, clock, mode, func; @@
- hrtimer_init_on_stack(&timer, clock, mode);
...
- timer.function = func;
+ hrtimer_setup_on_stack(&timer, func, clock, mode);
@@ expression timer, clock, mode; @@
- hrtimer_init_sleeper_on_stack(timer, clock, mode);
+ hrtimer_setup_sleeper_on_stack(timer, clock, mode);
Signed-off-by: Nam Cao <namcao@linutronix.de>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Anup Patel <anup@brainfault.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: John Stultz <jstultz@google.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Damien Le Moal <dlemoal@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Nam Cao (31):
KVM: MIPS: Switch to use hrtimer_setup()
KVM: PPC: Switch to use hrtimer_setup()
KVM: s390: Switch to use hrtimer_setup()
KVM: x86: Switch to use hrtimer_setup()
KVM: arm64: Switch to use hrtimer_setup()
LoongArch: KVM: Switch to use hrtimer_setup()
riscv: kvm: Switch to use hrtimer_setup()
ARM: imx: Switch to use hrtimer_setup()
ARM: 8611/1: l2x0: Switch to use hrtimer_setup()
powerpc/watchdog: Switch to use hrtimer_setup()
perf/x86: Switch to use hrtimer_setup()
s390/ap_bus: Switch to use hrtimer_setup()
sched: Switch to use hrtimer_setup()
rcu: Switch to use hrtimer_setup()
lib: test_objpool: Switch to use hrtimer_setup()
io_uring/timeout: Switch to use hrtimer_setup()
fork: Switch to use hrtimer_setup()
perf: Switch to use hrtimer_setup()
timerfd: Switch to use hrtimer_setup()
time: Switch to hrtimer_setup()
bpf: Switch to use hrtimer_setup()
ubifs: Switch to use hrtimer_setup()
watchdog: Switch to use hrtimer_setup()
tracing/osnoise: Switch to use hrtimer_setup()
block, bfq: Switch to use hrtimer_setup()
ata: pata_octeon_cf: Switch to use hrtimer_setup()
blk_iocost: Switch to use hrtimer_setup()
PM: runtime: Switch to use hrtimer_setup()
PM / devfreq: rockchip-dfi: Switch to use hrtimer_setup()
null_blk: Switch to use hrtimer_setup()
hwrng: timeriomem: Switch to use hrtimer_setup()
arch/arm/mach-imx/mmdc.c | 5 ++---
arch/arm/mm/cache-l2x0-pmu.c | 3 +--
arch/arm64/kvm/arch_timer.c | 7 +++----
arch/loongarch/kvm/vcpu.c | 4 ++--
arch/mips/kvm/mips.c | 5 ++---
arch/powerpc/kernel/watchdog.c | 3 +--
arch/powerpc/kvm/powerpc.c | 4 ++--
arch/riscv/kvm/vcpu_timer.c | 7 ++++---
arch/s390/kvm/interrupt.c | 3 +--
arch/s390/kvm/kvm-s390.c | 4 ++--
arch/x86/events/intel/uncore.c | 3 +--
arch/x86/events/rapl.c | 3 +--
arch/x86/kvm/hyperv.c | 3 +--
arch/x86/kvm/i8254.c | 3 +--
arch/x86/kvm/lapic.c | 5 ++---
arch/x86/kvm/vmx/nested.c | 5 ++---
arch/x86/kvm/xen.c | 5 ++---
block/bfq-iosched.c | 5 ++---
block/blk-iocost.c | 3 +--
drivers/ata/pata_octeon_cf.c | 5 ++---
drivers/base/power/runtime.c | 4 ++--
drivers/block/null_blk/main.c | 7 +++----
drivers/char/hw_random/timeriomem-rng.c | 3 +--
drivers/devfreq/event/rockchip-dfi.c | 3 +--
drivers/s390/crypto/ap_bus.c | 3 +--
drivers/watchdog/softdog.c | 8 +++-----
drivers/watchdog/watchdog_dev.c | 4 ++--
drivers/watchdog/watchdog_hrtimer_pretimeout.c | 4 ++--
fs/timerfd.c | 5 ++---
fs/ubifs/io.c | 3 +--
io_uring/timeout.c | 13 ++++++-------
kernel/bpf/helpers.c | 3 +--
kernel/events/core.c | 7 +++----
kernel/fork.c | 3 +--
kernel/rcu/tree.c | 4 ++--
kernel/sched/core.c | 3 +--
kernel/sched/deadline.c | 6 ++----
kernel/sched/fair.c | 8 ++++----
kernel/sched/rt.c | 5 ++---
kernel/time/ntp.c | 3 +--
kernel/time/posix-timers.c | 7 +++----
kernel/time/sched_clock.c | 3 +--
kernel/time/tick-broadcast-hrtimer.c | 3 +--
kernel/time/tick-sched.c | 6 ++----
kernel/trace/trace_osnoise.c | 6 ++----
kernel/watchdog.c | 3 +--
lib/test_objpool.c | 3 +--
47 files changed, 87 insertions(+), 128 deletions(-)
--
2.39.5
^ permalink raw reply [flat|nested] 42+ messages in thread
* [PATCH 01/31] KVM: MIPS: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 02/31] KVM: PPC: " Nam Cao
` (29 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Thomas Bogendoerfer
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
---
arch/mips/kvm/mips.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
index 60b43ea85c12..cef3c423a41a 100644
--- a/arch/mips/kvm/mips.c
+++ b/arch/mips/kvm/mips.c
@@ -288,9 +288,8 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)
if (err)
return err;
- hrtimer_init(&vcpu->arch.comparecount_timer, CLOCK_MONOTONIC,
- HRTIMER_MODE_REL);
- vcpu->arch.comparecount_timer.function = kvm_mips_comparecount_wakeup;
+ hrtimer_setup(&vcpu->arch.comparecount_timer, kvm_mips_comparecount_wakeup, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL);
/*
* Allocate space for host mode exception handlers that handle
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 02/31] KVM: PPC: Switch to use hrtimer_setup()
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 ` Nam Cao
2024-10-28 7:31 ` [PATCH 03/31] KVM: s390: " Nam Cao
` (28 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Michael Ellerman
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/kvm/powerpc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index f14329989e9a..e6269ba3a839 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -769,8 +769,8 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)
{
int err;
- hrtimer_init(&vcpu->arch.dec_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
- vcpu->arch.dec_timer.function = kvmppc_decrementer_wakeup;
+ hrtimer_setup(&vcpu->arch.dec_timer, kvmppc_decrementer_wakeup, CLOCK_REALTIME,
+ HRTIMER_MODE_ABS);
#ifdef CONFIG_KVM_EXIT_TIMING
mutex_init(&vcpu->arch.exit_timing_lock);
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 03/31] KVM: s390: Switch to use hrtimer_setup()
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 ` Nam Cao
2024-10-28 7:31 ` [PATCH 04/31] KVM: x86: " Nam Cao
` (27 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Christian Borntraeger
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: 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 4f0e7f61edf7..3c8685ffea62 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -3174,8 +3174,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 bb7134faaebf..4ab20ba0392c 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -3896,8 +3896,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;
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 04/31] KVM: x86: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (2 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 03/31] KVM: s390: " Nam Cao
@ 2024-10-28 7:31 ` 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
` (26 subsequent siblings)
30 siblings, 2 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Sean Christopherson
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Sean Christopherson <seanjc@google.com>
---
arch/x86/kvm/hyperv.c | 3 +--
arch/x86/kvm/i8254.c | 3 +--
arch/x86/kvm/lapic.c | 5 ++---
arch/x86/kvm/vmx/nested.c | 5 ++---
arch/x86/kvm/xen.c | 5 ++---
5 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 4f0a94346d00..19ea425a7264 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -952,8 +952,7 @@ static void stimer_init(struct kvm_vcpu_hv_stimer *stimer, int timer_index)
{
memset(stimer, 0, sizeof(*stimer));
stimer->index = timer_index;
- hrtimer_init(&stimer->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
- stimer->timer.function = stimer_timer_callback;
+ hrtimer_setup(&stimer->timer, stimer_timer_callback, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
stimer_prepare_msg(stimer);
}
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index cd57a517d04a..9342442e9650 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -690,8 +690,7 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags)
pit->kvm = kvm;
pit_state = &pit->pit_state;
- hrtimer_init(&pit_state->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
- pit_state->timer.function = pit_timer_fn;
+ hrtimer_setup(&pit_state->timer, pit_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
pit_state->irq_ack_notifier.gsi = 0;
pit_state->irq_ack_notifier.irq_acked = kvm_pit_ack_irq;
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 2098dc689088..1cfcd9125ffb 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -2887,9 +2887,8 @@ int kvm_create_lapic(struct kvm_vcpu *vcpu)
apic->nr_lvt_entries = kvm_apic_calc_nr_lvt_entries(vcpu);
- hrtimer_init(&apic->lapic_timer.timer, CLOCK_MONOTONIC,
- HRTIMER_MODE_ABS_HARD);
- apic->lapic_timer.timer.function = apic_timer_fn;
+ hrtimer_setup(&apic->lapic_timer.timer, apic_timer_fn, CLOCK_MONOTONIC,
+ HRTIMER_MODE_ABS_HARD);
if (lapic_timer_advance)
apic->lapic_timer.timer_advance_ns = LAPIC_TIMER_ADVANCE_NS_INIT;
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
index a8e7bc04d9bf..c8cdf2ef00aa 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -5279,9 +5279,8 @@ static int enter_vmx_operation(struct kvm_vcpu *vcpu)
if (enable_shadow_vmcs && !alloc_shadow_vmcs(vcpu))
goto out_shadow_vmcs;
- hrtimer_init(&vmx->nested.preemption_timer, CLOCK_MONOTONIC,
- HRTIMER_MODE_ABS_PINNED);
- vmx->nested.preemption_timer.function = vmx_preemption_timer_fn;
+ hrtimer_setup(&vmx->nested.preemption_timer, vmx_preemption_timer_fn, CLOCK_MONOTONIC,
+ HRTIMER_MODE_ABS_PINNED);
vmx->nested.vpid02 = allocate_vpid();
diff --git a/arch/x86/kvm/xen.c b/arch/x86/kvm/xen.c
index c386fbe6b58d..73e85b1ebb08 100644
--- a/arch/x86/kvm/xen.c
+++ b/arch/x86/kvm/xen.c
@@ -265,9 +265,8 @@ static void kvm_xen_stop_timer(struct kvm_vcpu *vcpu)
static void kvm_xen_init_timer(struct kvm_vcpu *vcpu)
{
- hrtimer_init(&vcpu->arch.xen.timer, CLOCK_MONOTONIC,
- HRTIMER_MODE_ABS_HARD);
- vcpu->arch.xen.timer.function = xen_timer_callback;
+ hrtimer_setup(&vcpu->arch.xen.timer, xen_timer_callback, CLOCK_MONOTONIC,
+ HRTIMER_MODE_ABS_HARD);
}
static void kvm_xen_update_runstate_guest(struct kvm_vcpu *v, bool atomic)
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 05/31] KVM: arm64: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (3 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 04/31] KVM: x86: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 10:56 ` Marc Zyngier
2024-10-28 7:31 ` [PATCH 06/31] LoongArch: KVM: " Nam Cao
` (25 subsequent siblings)
30 siblings, 1 reply; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Marc Zyngier
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)
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 06/31] LoongArch: KVM: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (4 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 05/31] KVM: arm64: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 07/31] riscv: kvm: " Nam Cao
` (24 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Huacai Chen
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Huacai Chen <chenhuacai@kernel.org>
---
arch/loongarch/kvm/vcpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/loongarch/kvm/vcpu.c b/arch/loongarch/kvm/vcpu.c
index 0697b1064251..eada16d2532c 100644
--- a/arch/loongarch/kvm/vcpu.c
+++ b/arch/loongarch/kvm/vcpu.c
@@ -1457,8 +1457,8 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)
vcpu->arch.vpid = 0;
vcpu->arch.flush_gpa = INVALID_GPA;
- hrtimer_init(&vcpu->arch.swtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED);
- vcpu->arch.swtimer.function = kvm_swtimer_wakeup;
+ hrtimer_setup(&vcpu->arch.swtimer, kvm_swtimer_wakeup, CLOCK_MONOTONIC,
+ HRTIMER_MODE_ABS_PINNED);
vcpu->arch.handle_exit = kvm_handle_exit;
vcpu->arch.guest_eentry = (unsigned long)kvm_loongarch_ops->exc_entry;
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 07/31] riscv: kvm: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (5 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 06/31] LoongArch: KVM: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 08/31] ARM: imx: " Nam Cao
` (23 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Anup Patel
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Anup Patel <anup@brainfault.org>
---
arch/riscv/kvm/vcpu_timer.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/riscv/kvm/vcpu_timer.c b/arch/riscv/kvm/vcpu_timer.c
index 75486b25ac45..74b78b0346df 100644
--- a/arch/riscv/kvm/vcpu_timer.c
+++ b/arch/riscv/kvm/vcpu_timer.c
@@ -248,18 +248,19 @@ int kvm_riscv_vcpu_timer_init(struct kvm_vcpu *vcpu)
if (t->init_done)
return -EINVAL;
- hrtimer_init(&t->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
t->init_done = true;
t->next_set = false;
/* Enable sstc for every vcpu if available in hardware */
if (riscv_isa_extension_available(NULL, SSTC)) {
t->sstc_enabled = true;
- t->hrt.function = kvm_riscv_vcpu_vstimer_expired;
+ hrtimer_setup(&t->hrt, kvm_riscv_vcpu_vstimer_expired, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL);
t->timer_next_event = kvm_riscv_vcpu_update_vstimecmp;
} else {
t->sstc_enabled = false;
- t->hrt.function = kvm_riscv_vcpu_hrtimer_expired;
+ hrtimer_setup(&t->hrt, kvm_riscv_vcpu_hrtimer_expired, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL);
t->timer_next_event = kvm_riscv_vcpu_update_hrtimer;
}
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 08/31] ARM: imx: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (6 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 07/31] riscv: kvm: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 09/31] ARM: 8611/1: l2x0: " Nam Cao
` (22 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Sascha Hauer
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: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/mmdc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
index b68cb86dbe4c..a568b5e15dcb 100644
--- a/arch/arm/mach-imx/mmdc.c
+++ b/arch/arm/mach-imx/mmdc.c
@@ -509,9 +509,8 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b
pmu_mmdc->mmdc_ipg_clk = mmdc_ipg_clk;
pmu_mmdc->devtype_data = device_get_match_data(&pdev->dev);
- hrtimer_init(&pmu_mmdc->hrtimer, CLOCK_MONOTONIC,
- HRTIMER_MODE_REL);
- pmu_mmdc->hrtimer.function = mmdc_pmu_timer_handler;
+ hrtimer_setup(&pmu_mmdc->hrtimer, mmdc_pmu_timer_handler, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL);
cpumask_set_cpu(raw_smp_processor_id(), &pmu_mmdc->cpu);
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 09/31] ARM: 8611/1: l2x0: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (7 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 08/31] ARM: imx: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 10/31] powerpc/watchdog: " Nam Cao
` (21 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Russell King
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Russell King <linux@armlinux.org.uk>
---
arch/arm/mm/cache-l2x0-pmu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/mm/cache-l2x0-pmu.c b/arch/arm/mm/cache-l2x0-pmu.c
index 993fefdc167a..93ef0502b7ff 100644
--- a/arch/arm/mm/cache-l2x0-pmu.c
+++ b/arch/arm/mm/cache-l2x0-pmu.c
@@ -539,8 +539,7 @@ static __init int l2x0_pmu_init(void)
* at higher frequencies.
*/
l2x0_pmu_poll_period = ms_to_ktime(1000);
- hrtimer_init(&l2x0_pmu_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- l2x0_pmu_hrtimer.function = l2x0_pmu_poll;
+ hrtimer_setup(&l2x0_pmu_hrtimer, l2x0_pmu_poll, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
cpumask_set_cpu(0, &pmu_cpu);
ret = cpuhp_setup_state_nocalls(CPUHP_AP_PERF_ARM_L2X0_ONLINE,
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 10/31] powerpc/watchdog: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (8 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 09/31] ARM: 8611/1: l2x0: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 11/31] perf/x86: " Nam Cao
` (20 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Michael Ellerman
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/kernel/watchdog.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
index 8c464a5d8246..2429cb1c7baa 100644
--- a/arch/powerpc/kernel/watchdog.c
+++ b/arch/powerpc/kernel/watchdog.c
@@ -495,8 +495,7 @@ static void start_watchdog(void *arg)
*this_cpu_ptr(&wd_timer_tb) = get_tb();
- hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- hrtimer->function = watchdog_timer_fn;
+ hrtimer_setup(hrtimer, watchdog_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
hrtimer_start(hrtimer, ms_to_ktime(wd_timer_period_ms),
HRTIMER_MODE_REL_PINNED);
}
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 11/31] perf/x86: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (9 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 10/31] powerpc/watchdog: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 12/31] s390/ap_bus: " Nam Cao
` (19 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Peter Zijlstra
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Peter Zijlstra <peterz@infradead.org>
---
arch/x86/events/intel/uncore.c | 3 +--
arch/x86/events/rapl.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index d98fac567684..1579ee33f8eb 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -347,8 +347,7 @@ void uncore_pmu_cancel_hrtimer(struct intel_uncore_box *box)
static void uncore_pmu_init_hrtimer(struct intel_uncore_box *box)
{
- hrtimer_init(&box->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- box->hrtimer.function = uncore_pmu_hrtimer;
+ hrtimer_setup(&box->hrtimer, uncore_pmu_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
}
static struct intel_uncore_box *uncore_alloc_box(struct intel_uncore_type *type,
diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c
index a481a939862e..d072955e5930 100644
--- a/arch/x86/events/rapl.c
+++ b/arch/x86/events/rapl.c
@@ -264,8 +264,7 @@ static void rapl_hrtimer_init(struct rapl_pmu *pmu)
{
struct hrtimer *hr = &pmu->hrtimer;
- hrtimer_init(hr, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- hr->function = rapl_hrtimer_handle;
+ hrtimer_setup(hr, rapl_hrtimer_handle, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
}
static void __rapl_pmu_event_start(struct rapl_pmu *pmu,
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 12/31] s390/ap_bus: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (10 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 11/31] perf/x86: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 13/31] sched: " Nam Cao
` (18 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Christian Borntraeger
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
---
drivers/s390/crypto/ap_bus.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index 60cea6c24349..98beb2656c3f 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -2327,8 +2327,7 @@ static inline int __init ap_async_init(void)
*/
if (MACHINE_IS_VM)
poll_high_timeout = 1500000;
- hrtimer_init(&ap_poll_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
- ap_poll_timer.function = ap_poll_timeout;
+ hrtimer_setup(&ap_poll_timer, ap_poll_timeout, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
queue_work(system_long_wq, &ap_scan_bus_work);
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 13/31] sched: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (11 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 12/31] s390/ap_bus: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 12:51 ` kernel test robot
2024-10-28 7:31 ` [PATCH 14/31] rcu: " Nam Cao
` (17 subsequent siblings)
30 siblings, 1 reply; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Peter Zijlstra
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: Peter Zijlstra <peterz@infradead.org>
---
kernel/sched/core.c | 3 +--
kernel/sched/deadline.c | 6 ++----
kernel/sched/fair.c | 8 ++++----
kernel/sched/rt.c | 5 ++---
4 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 43e453ab7e20..b86dc57e9dcd 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -903,8 +903,7 @@ static void hrtick_rq_init(struct rq *rq)
#ifdef CONFIG_SMP
INIT_CSD(&rq->hrtick_csd, __hrtick_start, rq);
#endif
- hrtimer_init(&rq->hrtick_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
- rq->hrtick_timer.function = hrtick;
+ hrtimer_setup(&rq->hrtick_timer, hrtick, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
}
#else /* CONFIG_SCHED_HRTICK */
static inline void hrtick_clear(struct rq *rq)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 9ce93d0bf452..cd9d68e87aa0 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1362,8 +1362,7 @@ static void init_dl_task_timer(struct sched_dl_entity *dl_se)
{
struct hrtimer *timer = &dl_se->dl_timer;
- hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
- timer->function = dl_task_timer;
+ hrtimer_setup(timer, dl_task_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
}
/*
@@ -1817,8 +1816,7 @@ static void init_dl_inactive_task_timer(struct sched_dl_entity *dl_se)
{
struct hrtimer *timer = &dl_se->inactive_timer;
- hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
- timer->function = inactive_task_timer;
+ hrtimer_setup(timer, inactive_task_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
}
#define __node_2_dle(node) \
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 225b31aaee55..c82ada095bca 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6576,14 +6576,14 @@ void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b, struct cfs_bandwidth *paren
cfs_b->hierarchical_quota = parent ? parent->hierarchical_quota : RUNTIME_INF;
INIT_LIST_HEAD(&cfs_b->throttled_cfs_rq);
- hrtimer_init(&cfs_b->period_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED);
- cfs_b->period_timer.function = sched_cfs_period_timer;
+ hrtimer_setup(&cfs_b->period_timer, sched_cfs_period_timer, CLOCK_MONOTONIC,
+ HRTIMER_MODE_ABS_PINNED);
/* Add a random offset so that timers interleave */
hrtimer_set_expires(&cfs_b->period_timer,
get_random_u32_below(cfs_b->period));
- hrtimer_init(&cfs_b->slack_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- cfs_b->slack_timer.function = sched_cfs_slack_timer;
+ hrtimer_setup(&cfs_b->slack_timer, sched_cfs_slack_timer, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL);
cfs_b->slack_started = false;
}
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 172c588de542..082e3970dc18 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -127,9 +127,8 @@ void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime)
raw_spin_lock_init(&rt_b->rt_runtime_lock);
- hrtimer_init(&rt_b->rt_period_timer, CLOCK_MONOTONIC,
- HRTIMER_MODE_REL_HARD);
- rt_b->rt_period_timer.function = sched_rt_period_timer;
+ hrtimer_setup(&rt_b->rt_period_timer, sched_rt_period_timer, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL_HARD);
}
static inline void do_start_rt_bandwidth(struct rt_bandwidth *rt_b)
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 14/31] rcu: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (12 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 13/31] sched: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 13:52 ` Paul E. McKenney
2024-10-28 7:31 ` [PATCH 15/31] lib: test_objpool: " Nam Cao
` (16 subsequent siblings)
30 siblings, 1 reply; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Paul E. McKenney
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: "Paul E. McKenney" <paulmck@kernel.org>
---
kernel/rcu/tree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index a60616e69b66..686c4bdbd62e 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3701,8 +3701,8 @@ run_page_cache_worker(struct kfree_rcu_cpu *krcp)
&krcp->page_cache_work,
msecs_to_jiffies(rcu_delay_page_cache_fill_msec));
} else {
- hrtimer_init(&krcp->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- krcp->hrtimer.function = schedule_page_work_fn;
+ hrtimer_setup(&krcp->hrtimer, schedule_page_work_fn, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL);
hrtimer_start(&krcp->hrtimer, 0, HRTIMER_MODE_REL);
}
}
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 15/31] lib: test_objpool: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (13 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 14/31] rcu: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 16/31] io_uring/timeout: " Nam Cao
` (15 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Andrew Morton
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Andrew Morton <akpm@linux-foundation.org>
---
lib/test_objpool.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/test_objpool.c b/lib/test_objpool.c
index 5a3f6961a70f..89db1933eb41 100644
--- a/lib/test_objpool.c
+++ b/lib/test_objpool.c
@@ -190,8 +190,7 @@ static int ot_init_hrtimer(struct ot_item *item, unsigned long hrtimer)
return -ENOENT;
item->hrtcycle = ktime_set(0, hrtimer * 1000000UL);
- hrtimer_init(hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- hrt->function = ot_hrtimer_handler;
+ hrtimer_setup(hrt, ot_hrtimer_handler, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
return 0;
}
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 16/31] io_uring/timeout: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (14 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 15/31] lib: test_objpool: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2025-05-02 8:50 ` Pavel Begunkov
2024-10-28 7:31 ` [PATCH 17/31] fork: " Nam Cao
` (14 subsequent siblings)
30 siblings, 1 reply; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Jens Axboe
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 the new function.
This new function is also used to initialize the callback function in
.prep() (the callback function depends on whether it is IORING_OP_TIMEOUT
or IORING_OP_LINK_TIMEOUT). Thus, callback function setup in io_timeout()
and io_queue_linked_timeout() are now redundant, therefore remove them.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Jens Axboe <axboe@kernel.dk>
---
io_uring/timeout.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/io_uring/timeout.c b/io_uring/timeout.c
index 2ffe5e1dc68a..a4165e54238b 100644
--- a/io_uring/timeout.c
+++ b/io_uring/timeout.c
@@ -388,8 +388,7 @@ static int io_linked_timeout_update(struct io_ring_ctx *ctx, __u64 user_data,
io = req->async_data;
if (hrtimer_try_to_cancel(&io->timer) == -1)
return -EALREADY;
- hrtimer_init(&io->timer, io_timeout_get_clock(io), mode);
- io->timer.function = io_link_timeout_fn;
+ hrtimer_setup(&io->timer, io_link_timeout_fn, io_timeout_get_clock(io), mode);
hrtimer_start(&io->timer, timespec64_to_ktime(*ts), mode);
return 0;
}
@@ -409,8 +408,7 @@ static int io_timeout_update(struct io_ring_ctx *ctx, __u64 user_data,
timeout->off = 0; /* noseq */
data = req->async_data;
list_add_tail(&timeout->list, &ctx->timeout_list);
- hrtimer_init(&data->timer, io_timeout_get_clock(data), mode);
- data->timer.function = io_timeout_fn;
+ hrtimer_setup(&data->timer, io_timeout_fn, io_timeout_get_clock(data), mode);
hrtimer_start(&data->timer, timespec64_to_ktime(*ts), mode);
return 0;
}
@@ -537,7 +535,6 @@ static int __io_timeout_prep(struct io_kiocb *req,
return -EINVAL;
data->mode = io_translate_timeout_mode(flags);
- hrtimer_init(&data->timer, io_timeout_get_clock(data), data->mode);
if (is_timeout_link) {
struct io_submit_link *link = &req->ctx->submit_state.link;
@@ -548,6 +545,10 @@ static int __io_timeout_prep(struct io_kiocb *req,
return -EINVAL;
timeout->head = link->last;
link->last->flags |= REQ_F_ARM_LTIMEOUT;
+ hrtimer_setup(&data->timer, io_link_timeout_fn, io_timeout_get_clock(data),
+ data->mode);
+ } else {
+ hrtimer_setup(&data->timer, io_timeout_fn, io_timeout_get_clock(data), data->mode);
}
return 0;
}
@@ -607,7 +608,6 @@ int io_timeout(struct io_kiocb *req, unsigned int issue_flags)
}
add:
list_add(&timeout->list, entry);
- data->timer.function = io_timeout_fn;
hrtimer_start(&data->timer, timespec64_to_ktime(data->ts), data->mode);
spin_unlock_irq(&ctx->timeout_lock);
return IOU_ISSUE_SKIP_COMPLETE;
@@ -626,7 +626,6 @@ void io_queue_linked_timeout(struct io_kiocb *req)
if (timeout->head) {
struct io_timeout_data *data = req->async_data;
- data->timer.function = io_link_timeout_fn;
hrtimer_start(&data->timer, timespec64_to_ktime(data->ts),
data->mode);
list_add_tail(&timeout->list, &ctx->ltimeout_list);
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 17/31] fork: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (15 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 16/31] io_uring/timeout: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 18/31] perf: " Nam Cao
` (13 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Oleg Nesterov
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Oleg Nesterov <oleg@redhat.com>
---
kernel/fork.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index 60c0b4868fd4..9a2e1905232f 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1864,8 +1864,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
#ifdef CONFIG_POSIX_TIMERS
INIT_HLIST_HEAD(&sig->posix_timers);
- hrtimer_init(&sig->real_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- sig->real_timer.function = it_real_fn;
+ hrtimer_setup(&sig->real_timer, it_real_fn, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
#endif
task_lock(current->group_leader);
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 18/31] perf: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (16 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 17/31] fork: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 19/31] timerfd: " Nam Cao
` (12 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Peter Zijlstra
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Peter Zijlstra <peterz@infradead.org>
---
kernel/events/core.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index e3589c4287cb..a4d0d7b0311f 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -1151,8 +1151,8 @@ static void __perf_mux_hrtimer_init(struct perf_cpu_pmu_context *cpc, int cpu)
cpc->hrtimer_interval = ns_to_ktime(NSEC_PER_MSEC * interval);
raw_spin_lock_init(&cpc->hrtimer_lock);
- hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
- timer->function = perf_mux_hrtimer_handler;
+ hrtimer_setup(timer, perf_mux_hrtimer_handler, CLOCK_MONOTONIC,
+ HRTIMER_MODE_ABS_PINNED_HARD);
}
static int perf_mux_hrtimer_restart(struct perf_cpu_pmu_context *cpc)
@@ -11273,8 +11273,7 @@ static void perf_swevent_init_hrtimer(struct perf_event *event)
if (!is_sampling_event(event))
return;
- hrtimer_init(&hwc->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
- hwc->hrtimer.function = perf_swevent_hrtimer;
+ hrtimer_setup(&hwc->hrtimer, perf_swevent_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
/*
* Since hrtimers have a fixed rate, we can do a static freq->period
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 19/31] timerfd: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (17 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 18/31] perf: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 20/31] time: Switch to hrtimer_setup() Nam Cao
` (11 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Christian Brauner
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: Christian Brauner <brauner@kernel.org>
---
fs/timerfd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/timerfd.c b/fs/timerfd.c
index 137523e0bb21..c57ebced16bf 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -207,9 +207,8 @@ static int timerfd_setup(struct timerfd_ctx *ctx, int flags,
ALARM_REALTIME : ALARM_BOOTTIME,
timerfd_alarmproc);
} else {
- hrtimer_init(&ctx->t.tmr, clockid, htmode);
+ hrtimer_setup(&ctx->t.tmr, timerfd_tmrproc, clockid, htmode);
hrtimer_set_expires(&ctx->t.tmr, texp);
- ctx->t.tmr.function = timerfd_tmrproc;
}
if (texp != 0) {
@@ -444,7 +443,7 @@ SYSCALL_DEFINE2(timerfd_create, int, clockid, int, flags)
ALARM_REALTIME : ALARM_BOOTTIME,
timerfd_alarmproc);
else
- hrtimer_init(&ctx->t.tmr, clockid, HRTIMER_MODE_ABS);
+ hrtimer_setup(&ctx->t.tmr, timerfd_tmrproc, clockid, HRTIMER_MODE_ABS);
ctx->moffs = ktime_mono_to_real(0);
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 20/31] time: Switch to hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (18 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 19/31] timerfd: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 21/31] bpf: Switch to use hrtimer_setup() Nam Cao
` (10 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, John Stultz
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: John Stultz <jstultz@google.com>
---
kernel/time/ntp.c | 3 +--
kernel/time/posix-timers.c | 7 +++----
kernel/time/sched_clock.c | 3 +--
kernel/time/tick-broadcast-hrtimer.c | 3 +--
kernel/time/tick-sched.c | 6 ++----
5 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index b550ebe0f03b..577e11d1b191 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -678,8 +678,7 @@ void ntp_notify_cmos_timer(bool offset_set)
static void __init ntp_init_cmos_sync(void)
{
- hrtimer_init(&sync_hrtimer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
- sync_hrtimer.function = sync_timer_callback;
+ hrtimer_setup(&sync_hrtimer, sync_timer_callback, CLOCK_REALTIME, HRTIMER_MODE_ABS);
}
#else /* CONFIG_GENERIC_CMOS_UPDATE) || defined(CONFIG_RTC_SYSTOHC) */
static inline void __init ntp_init_cmos_sync(void) { }
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
index fc40dacabe78..f3acb16d6254 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -430,7 +430,7 @@ static void posix_timer_unhash_and_free(struct k_itimer *tmr)
static int common_timer_create(struct k_itimer *new_timer)
{
- hrtimer_init(&new_timer->it.real.timer, new_timer->it_clock, 0);
+ hrtimer_setup(&new_timer->it.real.timer, posix_timer_fn, new_timer->it_clock, 0);
return 0;
}
@@ -784,7 +784,7 @@ static void common_hrtimer_arm(struct k_itimer *timr, ktime_t expires,
/*
* Posix magic: Relative CLOCK_REALTIME timers are not affected by
* clock modifications, so they become CLOCK_MONOTONIC based under the
- * hood. See hrtimer_init(). Update timr->kclock, so the generic
+ * hood. See hrtimer_setup(). Update timr->kclock, so the generic
* functions which use timr->kclock->clock_get_*() work.
*
* Note: it_clock stays unmodified, because the next timer_set() might
@@ -793,8 +793,7 @@ static void common_hrtimer_arm(struct k_itimer *timr, ktime_t expires,
if (timr->it_clock == CLOCK_REALTIME)
timr->kclock = absolute ? &clock_realtime : &clock_monotonic;
- hrtimer_init(&timr->it.real.timer, timr->it_clock, mode);
- timr->it.real.timer.function = posix_timer_fn;
+ hrtimer_setup(&timr->it.real.timer, posix_timer_fn, timr->it_clock, mode);
if (!absolute)
expires = ktime_add_safe(expires, timer->base->get_time());
diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c
index 68d6c1190ac7..39017f1f8486 100644
--- a/kernel/time/sched_clock.c
+++ b/kernel/time/sched_clock.c
@@ -249,8 +249,7 @@ void __init generic_sched_clock_init(void)
* Start the timer to keep sched_clock() properly updated and
* sets the initial epoch.
*/
- hrtimer_init(&sched_clock_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
- sched_clock_timer.function = sched_clock_poll;
+ hrtimer_setup(&sched_clock_timer, sched_clock_poll, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
hrtimer_start(&sched_clock_timer, cd.wrap_kt, HRTIMER_MODE_REL_HARD);
}
diff --git a/kernel/time/tick-broadcast-hrtimer.c b/kernel/time/tick-broadcast-hrtimer.c
index e28f9210f8a1..a88b72b0f35e 100644
--- a/kernel/time/tick-broadcast-hrtimer.c
+++ b/kernel/time/tick-broadcast-hrtimer.c
@@ -100,7 +100,6 @@ static enum hrtimer_restart bc_handler(struct hrtimer *t)
void tick_setup_hrtimer_broadcast(void)
{
- hrtimer_init(&bctimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
- bctimer.function = bc_handler;
+ hrtimer_setup(&bctimer, bc_handler, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
clockevents_register_device(&ce_broadcast_hrtimer);
}
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 753a184c7090..bcea3a9fe638 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -1572,12 +1572,10 @@ void tick_setup_sched_timer(bool hrtimer)
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
/* Emulate tick processing via per-CPU hrtimers: */
- hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
+ hrtimer_setup(&ts->sched_timer, tick_nohz_handler, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
- if (IS_ENABLED(CONFIG_HIGH_RES_TIMERS) && hrtimer) {
+ if (IS_ENABLED(CONFIG_HIGH_RES_TIMERS) && hrtimer)
tick_sched_flag_set(ts, TS_FLAG_HIGHRES);
- ts->sched_timer.function = tick_nohz_handler;
- }
/* Get the next period (per-CPU) */
hrtimer_set_expires(&ts->sched_timer, tick_init_jiffy_update());
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 21/31] bpf: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (19 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 20/31] time: Switch to hrtimer_setup() Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 22/31] ubifs: " Nam Cao
` (9 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Alexei Starovoitov
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Alexei Starovoitov <ast@kernel.org>
---
kernel/bpf/helpers.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
index 1a43d06eab28..3518519e468a 100644
--- a/kernel/bpf/helpers.c
+++ b/kernel/bpf/helpers.c
@@ -1284,8 +1284,7 @@ static int __bpf_async_init(struct bpf_async_kern *async, struct bpf_map *map, u
atomic_set(&t->cancelling, 0);
INIT_WORK(&t->cb.delete_work, bpf_timer_delete_work);
- hrtimer_init(&t->timer, clockid, HRTIMER_MODE_REL_SOFT);
- t->timer.function = bpf_timer_cb;
+ hrtimer_setup(&t->timer, bpf_timer_cb, clockid, HRTIMER_MODE_REL_SOFT);
cb->value = (void *)async - map->record->timer_off;
break;
case BPF_ASYNC_TYPE_WQ:
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 22/31] ubifs: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (20 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 21/31] bpf: Switch to use hrtimer_setup() Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 23/31] watchdog: " Nam Cao
` (8 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Richard Weinberger
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Richard Weinberger <richard@nod.at>
---
fs/ubifs/io.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index 01d8eb170382..a79f229df475 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -1179,8 +1179,7 @@ int ubifs_wbuf_init(struct ubifs_info *c, struct ubifs_wbuf *wbuf)
wbuf->c = c;
wbuf->next_ino = 0;
- hrtimer_init(&wbuf->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- wbuf->timer.function = wbuf_timer_callback_nolock;
+ hrtimer_setup(&wbuf->timer, wbuf_timer_callback_nolock, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
return 0;
}
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 23/31] watchdog: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (21 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 22/31] ubifs: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 24/31] tracing/osnoise: " Nam Cao
` (7 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Wim Van Sebroeck
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
---
drivers/watchdog/softdog.c | 8 +++-----
drivers/watchdog/watchdog_dev.c | 4 ++--
drivers/watchdog/watchdog_hrtimer_pretimeout.c | 4 ++--
kernel/watchdog.c | 3 +--
4 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/drivers/watchdog/softdog.c b/drivers/watchdog/softdog.c
index 7a1096265f18..0820e35ad2e3 100644
--- a/drivers/watchdog/softdog.c
+++ b/drivers/watchdog/softdog.c
@@ -187,14 +187,12 @@ static int __init softdog_init(void)
watchdog_set_nowayout(&softdog_dev, nowayout);
watchdog_stop_on_reboot(&softdog_dev);
- hrtimer_init(&softdog_ticktock, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- softdog_ticktock.function = softdog_fire;
+ hrtimer_setup(&softdog_ticktock, softdog_fire, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
if (IS_ENABLED(CONFIG_SOFT_WATCHDOG_PRETIMEOUT)) {
softdog_info.options |= WDIOF_PRETIMEOUT;
- hrtimer_init(&softdog_preticktock, CLOCK_MONOTONIC,
- HRTIMER_MODE_REL);
- softdog_preticktock.function = softdog_pretimeout;
+ hrtimer_setup(&softdog_preticktock, softdog_pretimeout, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL);
}
if (soft_active_on_boot)
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
index 4190cb800cc4..8f59f66c61bf 100644
--- a/drivers/watchdog/watchdog_dev.c
+++ b/drivers/watchdog/watchdog_dev.c
@@ -1051,8 +1051,8 @@ static int watchdog_cdev_register(struct watchdog_device *wdd)
}
kthread_init_work(&wd_data->work, watchdog_ping_work);
- hrtimer_init(&wd_data->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
- wd_data->timer.function = watchdog_timer_expired;
+ hrtimer_setup(&wd_data->timer, watchdog_timer_expired, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL_HARD);
watchdog_hrtimer_pretimeout_init(wdd);
if (wdd->id == 0) {
diff --git a/drivers/watchdog/watchdog_hrtimer_pretimeout.c b/drivers/watchdog/watchdog_hrtimer_pretimeout.c
index 940b53718a91..fbc7eecd8b20 100644
--- a/drivers/watchdog/watchdog_hrtimer_pretimeout.c
+++ b/drivers/watchdog/watchdog_hrtimer_pretimeout.c
@@ -23,8 +23,8 @@ void watchdog_hrtimer_pretimeout_init(struct watchdog_device *wdd)
{
struct watchdog_core_data *wd_data = wdd->wd_data;
- hrtimer_init(&wd_data->pretimeout_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- wd_data->pretimeout_timer.function = watchdog_hrtimer_pretimeout;
+ hrtimer_setup(&wd_data->pretimeout_timer, watchdog_hrtimer_pretimeout, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL);
}
void watchdog_hrtimer_pretimeout_start(struct watchdog_device *wdd)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 262691ba62b7..46d0852683de 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -789,8 +789,7 @@ static void watchdog_enable(unsigned int cpu)
* Start the timer first to prevent the hardlockup watchdog triggering
* before the timer has a chance to fire.
*/
- hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
- hrtimer->function = watchdog_timer_fn;
+ hrtimer_setup(hrtimer, watchdog_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
hrtimer_start(hrtimer, ns_to_ktime(sample_period),
HRTIMER_MODE_REL_PINNED_HARD);
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 24/31] tracing/osnoise: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (22 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 23/31] watchdog: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:52 ` Steven Rostedt
2024-10-28 7:31 ` [PATCH 25/31] block, bfq: " Nam Cao
` (6 subsequent siblings)
30 siblings, 1 reply; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Steven Rostedt
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_osnoise.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index 1439064f65d6..e50f7a1aae6d 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -1896,8 +1896,7 @@ static int timerlat_main(void *data)
tlat->count = 0;
tlat->tracing_thread = false;
- hrtimer_init(&tlat->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
- tlat->timer.function = timerlat_irq;
+ hrtimer_setup(&tlat->timer, timerlat_irq, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
tlat->kthread = current;
osn_var->pid = current->pid;
/*
@@ -2461,8 +2460,7 @@ static int timerlat_fd_open(struct inode *inode, struct file *file)
tlat = this_cpu_tmr_var();
tlat->count = 0;
- hrtimer_init(&tlat->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
- tlat->timer.function = timerlat_irq;
+ hrtimer_setup(&tlat->timer, timerlat_irq, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
migrate_enable();
return 0;
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 25/31] block, bfq: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (23 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 24/31] tracing/osnoise: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-28 7:31 ` [PATCH 26/31] ata: pata_octeon_cf: " Nam Cao
` (5 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Jens Axboe
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Jens Axboe <axboe@kernel.dk>
---
block/bfq-iosched.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 0747d9d0e48c..7ce1ab0b65b4 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -7294,9 +7294,8 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e)
INIT_LIST_HEAD(&bfqd->dispatch);
- hrtimer_init(&bfqd->idle_slice_timer, CLOCK_MONOTONIC,
- HRTIMER_MODE_REL);
- bfqd->idle_slice_timer.function = bfq_idle_slice_timer;
+ hrtimer_setup(&bfqd->idle_slice_timer, bfq_idle_slice_timer, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL);
bfqd->queue_weights_tree = RB_ROOT_CACHED;
#ifdef CONFIG_BFQ_GROUP_IOSCHED
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 26/31] ata: pata_octeon_cf: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (24 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 25/31] block, bfq: " Nam Cao
@ 2024-10-28 7:31 ` Nam Cao
2024-10-29 23:41 ` Damien Le Moal
2024-10-28 7:32 ` [PATCH 27/31] blk_iocost: " Nam Cao
` (4 subsequent siblings)
30 siblings, 1 reply; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:31 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Damien Le Moal
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Damien Le Moal <dlemoal@kernel.org>
---
drivers/ata/pata_octeon_cf.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index 0bb9607e7348..29be47fd8e03 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -935,9 +935,8 @@ static int octeon_cf_probe(struct platform_device *pdev)
ap->mwdma_mask = enable_dma ? ATA_MWDMA4 : 0;
/* True IDE mode needs a timer to poll for not-busy. */
- hrtimer_init(&cf_port->delayed_finish, CLOCK_MONOTONIC,
- HRTIMER_MODE_REL);
- cf_port->delayed_finish.function = octeon_cf_delayed_finish;
+ hrtimer_setup(&cf_port->delayed_finish, octeon_cf_delayed_finish, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL);
} else {
/* 16 bit but not True IDE */
base = cs0 + 0x800;
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 27/31] blk_iocost: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (25 preceding siblings ...)
2024-10-28 7:31 ` [PATCH 26/31] ata: pata_octeon_cf: " Nam Cao
@ 2024-10-28 7:32 ` Nam Cao
2024-10-28 7:32 ` [PATCH 28/31] PM: runtime: " Nam Cao
` (3 subsequent siblings)
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:32 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Jens Axboe
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Jens Axboe <axboe@kernel.dk>
---
block/blk-iocost.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 9dc9323f84ac..5a89535c1303 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -2997,8 +2997,7 @@ static void ioc_pd_init(struct blkg_policy_data *pd)
iocg->hweight_inuse = WEIGHT_ONE;
init_waitqueue_head(&iocg->waitq);
- hrtimer_init(&iocg->waitq_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
- iocg->waitq_timer.function = iocg_waitq_timer_fn;
+ hrtimer_setup(&iocg->waitq_timer, iocg_waitq_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
iocg->level = blkg->blkcg->css.cgroup->level;
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 28/31] PM: runtime: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (26 preceding siblings ...)
2024-10-28 7:32 ` [PATCH 27/31] blk_iocost: " Nam Cao
@ 2024-10-28 7:32 ` Nam Cao
2024-10-28 11:43 ` Rafael J. Wysocki
2024-10-28 7:32 ` [PATCH 29/31] PM / devfreq: rockchip-dfi: " Nam Cao
` (2 subsequent siblings)
30 siblings, 1 reply; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:32 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Rafael J. Wysocki
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
---
drivers/base/power/runtime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 2ee45841486b..425c43b2d478 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -1764,8 +1764,8 @@ void pm_runtime_init(struct device *dev)
INIT_WORK(&dev->power.work, pm_runtime_work);
dev->power.timer_expires = 0;
- hrtimer_init(&dev->power.suspend_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
- dev->power.suspend_timer.function = pm_suspend_timer_fn;
+ hrtimer_setup(&dev->power.suspend_timer, pm_suspend_timer_fn, CLOCK_MONOTONIC,
+ HRTIMER_MODE_ABS);
init_waitqueue_head(&dev->power.wait_queue);
}
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 29/31] PM / devfreq: rockchip-dfi: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (27 preceding siblings ...)
2024-10-28 7:32 ` [PATCH 28/31] PM: runtime: " Nam Cao
@ 2024-10-28 7:32 ` 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
30 siblings, 1 reply; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:32 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Heiko Stuebner
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Heiko Stuebner <heiko@sntech.de>
---
drivers/devfreq/event/rockchip-dfi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c
index e2a1e4463b6f..0470d7c175f4 100644
--- a/drivers/devfreq/event/rockchip-dfi.c
+++ b/drivers/devfreq/event/rockchip-dfi.c
@@ -642,8 +642,7 @@ static int rockchip_ddr_perf_init(struct rockchip_dfi *dfi)
if (ret)
return ret;
- hrtimer_init(&dfi->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- dfi->timer.function = rockchip_dfi_timer;
+ hrtimer_setup(&dfi->timer, rockchip_dfi_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
switch (dfi->ddr_type) {
case ROCKCHIP_DDRTYPE_LPDDR2:
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 30/31] null_blk: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (28 preceding siblings ...)
2024-10-28 7:32 ` [PATCH 29/31] PM / devfreq: rockchip-dfi: " Nam Cao
@ 2024-10-28 7:32 ` Nam Cao
2024-10-28 7:32 ` [PATCH 31/31] hwrng: timeriomem: " Nam Cao
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:32 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Jens Axboe
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Jens Axboe <axboe@kernel.dk>
---
drivers/block/null_blk/main.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index 2f0431e42c49..b815b26b39d2 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -1418,8 +1418,7 @@ static void nullb_setup_bwtimer(struct nullb *nullb)
{
ktime_t timer_interval = ktime_set(0, TIMER_INTERVAL);
- hrtimer_init(&nullb->bw_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- nullb->bw_timer.function = nullb_bwtimer_fn;
+ hrtimer_setup(&nullb->bw_timer, nullb_bwtimer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
atomic_long_set(&nullb->cur_bytes, mb_per_tick(nullb->dev->mbps));
hrtimer_start(&nullb->bw_timer, timer_interval, HRTIMER_MODE_REL);
}
@@ -1596,8 +1595,8 @@ static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx,
might_sleep_if(hctx->flags & BLK_MQ_F_BLOCKING);
if (!is_poll && nq->dev->irqmode == NULL_IRQ_TIMER) {
- hrtimer_init(&cmd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- cmd->timer.function = null_cmd_timer_expired;
+ hrtimer_setup(&cmd->timer, null_cmd_timer_expired, CLOCK_MONOTONIC,
+ HRTIMER_MODE_REL);
}
cmd->error = BLK_STS_OK;
cmd->nq = nq;
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* [PATCH 31/31] hwrng: timeriomem: Switch to use hrtimer_setup()
2024-10-28 7:31 [PATCH 00/31] hrtimers: Switch to new hrtimer interface functions (2/5) Nam Cao
` (29 preceding siblings ...)
2024-10-28 7:32 ` [PATCH 30/31] null_blk: " Nam Cao
@ 2024-10-28 7:32 ` Nam Cao
30 siblings, 0 replies; 42+ messages in thread
From: Nam Cao @ 2024-10-28 7:32 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: Nam Cao, Herbert Xu
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.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@linutronix.de>
---
Cc: Herbert Xu <herbert@gondor.apana.org.au>
---
drivers/char/hw_random/timeriomem-rng.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char/hw_random/timeriomem-rng.c b/drivers/char/hw_random/timeriomem-rng.c
index 65b8260339f5..27b0e2026d53 100644
--- a/drivers/char/hw_random/timeriomem-rng.c
+++ b/drivers/char/hw_random/timeriomem-rng.c
@@ -152,8 +152,7 @@ static int timeriomem_rng_probe(struct platform_device *pdev)
priv->period = ns_to_ktime(period * NSEC_PER_USEC);
init_completion(&priv->completion);
- hrtimer_init(&priv->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
- priv->timer.function = timeriomem_rng_trigger;
+ hrtimer_setup(&priv->timer, timeriomem_rng_trigger, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
priv->rng_ops.name = dev_name(&pdev->dev);
priv->rng_ops.read = timeriomem_rng_read;
--
2.39.5
^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [PATCH 24/31] tracing/osnoise: Switch to use hrtimer_setup()
2024-10-28 7:31 ` [PATCH 24/31] tracing/osnoise: " Nam Cao
@ 2024-10-28 7:52 ` Steven Rostedt
0 siblings, 0 replies; 42+ messages in thread
From: Steven Rostedt @ 2024-10-28 7:52 UTC (permalink / raw)
To: Nam Cao
Cc: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
On Mon, 28 Oct 2024 08:31:57 +0100
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.
>
> Patch was created by using Coccinelle.
>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-- Steve
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> ---
> Cc: Steven Rostedt <rostedt@goodmis.org>
> ---
> kernel/trace/trace_osnoise.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
> index 1439064f65d6..e50f7a1aae6d 100644
> --- a/kernel/trace/trace_osnoise.c
> +++ b/kernel/trace/trace_osnoise.c
> @@ -1896,8 +1896,7 @@ static int timerlat_main(void *data)
> tlat->count = 0;
> tlat->tracing_thread = false;
>
> - hrtimer_init(&tlat->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
> - tlat->timer.function = timerlat_irq;
> + hrtimer_setup(&tlat->timer, timerlat_irq, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
> tlat->kthread = current;
> osn_var->pid = current->pid;
> /*
> @@ -2461,8 +2460,7 @@ static int timerlat_fd_open(struct inode *inode, struct file *file)
> tlat = this_cpu_tmr_var();
> tlat->count = 0;
>
> - hrtimer_init(&tlat->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
> - tlat->timer.function = timerlat_irq;
> + hrtimer_setup(&tlat->timer, timerlat_irq, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
>
> migrate_enable();
> return 0;
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH 05/31] KVM: arm64: Switch to use hrtimer_setup()
2024-10-28 7:31 ` [PATCH 05/31] KVM: arm64: " Nam Cao
@ 2024-10-28 10:56 ` Marc Zyngier
0 siblings, 0 replies; 42+ messages in thread
From: Marc Zyngier @ 2024-10-28 10:56 UTC (permalink / raw)
To: Nam Cao
Cc: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
Suzuki K Poulose, Joey Gouly, Oliver Upton, linux-kernel
[+ 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.
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH 28/31] PM: runtime: Switch to use hrtimer_setup()
2024-10-28 7:32 ` [PATCH 28/31] PM: runtime: " Nam Cao
@ 2024-10-28 11:43 ` Rafael J. Wysocki
0 siblings, 0 replies; 42+ messages in thread
From: Rafael J. Wysocki @ 2024-10-28 11:43 UTC (permalink / raw)
To: Nam Cao
Cc: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel, Rafael J. Wysocki
On Mon, Oct 28, 2024 at 8:32 AM 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.
>
> Patch was created by using Coccinelle.
>
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> ---
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Fine by me.
Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
> ---
> drivers/base/power/runtime.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
> index 2ee45841486b..425c43b2d478 100644
> --- a/drivers/base/power/runtime.c
> +++ b/drivers/base/power/runtime.c
> @@ -1764,8 +1764,8 @@ void pm_runtime_init(struct device *dev)
> INIT_WORK(&dev->power.work, pm_runtime_work);
>
> dev->power.timer_expires = 0;
> - hrtimer_init(&dev->power.suspend_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
> - dev->power.suspend_timer.function = pm_suspend_timer_fn;
> + hrtimer_setup(&dev->power.suspend_timer, pm_suspend_timer_fn, CLOCK_MONOTONIC,
> + HRTIMER_MODE_ABS);
>
> init_waitqueue_head(&dev->power.wait_queue);
> }
> --
> 2.39.5
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH 13/31] sched: Switch to use hrtimer_setup()
2024-10-28 7:31 ` [PATCH 13/31] sched: " Nam Cao
@ 2024-10-28 12:51 ` kernel test robot
0 siblings, 0 replies; 42+ messages in thread
From: kernel test robot @ 2024-10-28 12:51 UTC (permalink / raw)
To: Nam Cao, Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: oe-kbuild-all, Nam Cao, Peter Zijlstra
Hi Nam,
kernel test robot noticed the following build errors:
[auto build test ERROR on kvm/queue]
[also build test ERROR on tip/sched/core perf-tools-next/perf-tools-next tip/perf/core perf-tools/perf-tools tip/timers/core axboe-block/for-next]
[cannot apply to linus/master kvm/linux-next acme/perf/core v6.12-rc5 next-20241028]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Nam-Cao/KVM-MIPS-Switch-to-use-hrtimer_setup/20241028-154142
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
patch link: https://lore.kernel.org/r/f83c7ad9954fce1f84eaec94bb7b58f5f6974fc4.1729864823.git.namcao%40linutronix.de
patch subject: [PATCH 13/31] sched: Switch to use hrtimer_setup()
config: x86_64-rhel-8.3-func (https://download.01.org/0day-ci/archive/20241028/202410282033.n74LbYyl-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241028/202410282033.n74LbYyl-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410282033.n74LbYyl-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from kernel/sched/build_policy.c:52:
kernel/sched/rt.c: In function 'init_rt_bandwidth':
>> kernel/sched/rt.c:130:9: error: implicit declaration of function 'hrtimer_setup'; did you mean 'timer_setup'? [-Werror=implicit-function-declaration]
130 | hrtimer_setup(&rt_b->rt_period_timer, sched_rt_period_timer, CLOCK_MONOTONIC,
| ^~~~~~~~~~~~~
| timer_setup
cc1: some warnings being treated as errors
vim +130 kernel/sched/rt.c
122
123 void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime)
124 {
125 rt_b->rt_period = ns_to_ktime(period);
126 rt_b->rt_runtime = runtime;
127
128 raw_spin_lock_init(&rt_b->rt_runtime_lock);
129
> 130 hrtimer_setup(&rt_b->rt_period_timer, sched_rt_period_timer, CLOCK_MONOTONIC,
131 HRTIMER_MODE_REL_HARD);
132 }
133
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH 14/31] rcu: Switch to use hrtimer_setup()
2024-10-28 7:31 ` [PATCH 14/31] rcu: " Nam Cao
@ 2024-10-28 13:52 ` Paul E. McKenney
0 siblings, 0 replies; 42+ messages in thread
From: Paul E. McKenney @ 2024-10-28 13:52 UTC (permalink / raw)
To: Nam Cao
Cc: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
On Mon, Oct 28, 2024 at 08:31:47AM +0100, Nam Cao 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.
>
> Patch was created by using Coccinelle.
>
> Signed-off-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
> ---
> Cc: "Paul E. McKenney" <paulmck@kernel.org>
> ---
> kernel/rcu/tree.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index a60616e69b66..686c4bdbd62e 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -3701,8 +3701,8 @@ run_page_cache_worker(struct kfree_rcu_cpu *krcp)
> &krcp->page_cache_work,
> msecs_to_jiffies(rcu_delay_page_cache_fill_msec));
> } else {
> - hrtimer_init(&krcp->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> - krcp->hrtimer.function = schedule_page_work_fn;
> + hrtimer_setup(&krcp->hrtimer, schedule_page_work_fn, CLOCK_MONOTONIC,
> + HRTIMER_MODE_REL);
> hrtimer_start(&krcp->hrtimer, 0, HRTIMER_MODE_REL);
> }
> }
> --
> 2.39.5
>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH 04/31] KVM: x86: Switch to use hrtimer_setup()
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
1 sibling, 0 replies; 42+ messages in thread
From: kernel test robot @ 2024-10-28 13:53 UTC (permalink / raw)
To: Nam Cao, Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: oe-kbuild-all, Nam Cao, Sean Christopherson
Hi Nam,
kernel test robot noticed the following build errors:
[auto build test ERROR on kvm/queue]
[also build test ERROR on tip/sched/core perf-tools-next/perf-tools-next tip/perf/core perf-tools/perf-tools tip/timers/core axboe-block/for-next linus/master v6.12-rc5 next-20241028]
[cannot apply to kvm/linux-next acme/perf/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Nam-Cao/KVM-MIPS-Switch-to-use-hrtimer_setup/20241028-154142
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
patch link: https://lore.kernel.org/r/8774212e6c10c550743219e00738492eb379227c.1729864823.git.namcao%40linutronix.de
patch subject: [PATCH 04/31] KVM: x86: Switch to use hrtimer_setup()
config: x86_64-rhel-8.3 (https://download.01.org/0day-ci/archive/20241028/202410282113.l2iM0IOZ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241028/202410282113.l2iM0IOZ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410282113.l2iM0IOZ-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/x86/kvm/lapic.c: In function 'kvm_create_lapic':
>> arch/x86/kvm/lapic.c:2878:9: error: implicit declaration of function 'hrtimer_setup'; did you mean 'timer_setup'? [-Werror=implicit-function-declaration]
2878 | hrtimer_setup(&apic->lapic_timer.timer, apic_timer_fn, CLOCK_MONOTONIC,
| ^~~~~~~~~~~~~
| timer_setup
cc1: some warnings being treated as errors
--
arch/x86/kvm/i8254.c: In function 'kvm_create_pit':
>> arch/x86/kvm/i8254.c:693:9: error: implicit declaration of function 'hrtimer_setup'; did you mean 'timer_setup'? [-Werror=implicit-function-declaration]
693 | hrtimer_setup(&pit_state->timer, pit_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
| ^~~~~~~~~~~~~
| timer_setup
cc1: some warnings being treated as errors
--
arch/x86/kvm/hyperv.c: In function 'stimer_init':
>> arch/x86/kvm/hyperv.c:955:9: error: implicit declaration of function 'hrtimer_setup'; did you mean 'timer_setup'? [-Werror=implicit-function-declaration]
955 | hrtimer_setup(&stimer->timer, stimer_timer_callback, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
| ^~~~~~~~~~~~~
| timer_setup
cc1: some warnings being treated as errors
--
arch/x86/kvm/vmx/nested.c: In function 'enter_vmx_operation':
>> arch/x86/kvm/vmx/nested.c:5278:9: error: implicit declaration of function 'hrtimer_setup'; did you mean 'timer_setup'? [-Werror=implicit-function-declaration]
5278 | hrtimer_setup(&vmx->nested.preemption_timer, vmx_preemption_timer_fn, CLOCK_MONOTONIC,
| ^~~~~~~~~~~~~
| timer_setup
cc1: some warnings being treated as errors
vim +2878 arch/x86/kvm/lapic.c
2847
2848 int kvm_create_lapic(struct kvm_vcpu *vcpu)
2849 {
2850 struct kvm_lapic *apic;
2851
2852 ASSERT(vcpu != NULL);
2853
2854 if (!irqchip_in_kernel(vcpu->kvm)) {
2855 static_branch_inc(&kvm_has_noapic_vcpu);
2856 return 0;
2857 }
2858
2859 apic = kzalloc(sizeof(*apic), GFP_KERNEL_ACCOUNT);
2860 if (!apic)
2861 goto nomem;
2862
2863 vcpu->arch.apic = apic;
2864
2865 if (kvm_x86_ops.alloc_apic_backing_page)
2866 apic->regs = kvm_x86_call(alloc_apic_backing_page)(vcpu);
2867 else
2868 apic->regs = (void *)get_zeroed_page(GFP_KERNEL_ACCOUNT);
2869 if (!apic->regs) {
2870 printk(KERN_ERR "malloc apic regs error for vcpu %x\n",
2871 vcpu->vcpu_id);
2872 goto nomem_free_apic;
2873 }
2874 apic->vcpu = vcpu;
2875
2876 apic->nr_lvt_entries = kvm_apic_calc_nr_lvt_entries(vcpu);
2877
> 2878 hrtimer_setup(&apic->lapic_timer.timer, apic_timer_fn, CLOCK_MONOTONIC,
2879 HRTIMER_MODE_ABS_HARD);
2880 if (lapic_timer_advance)
2881 apic->lapic_timer.timer_advance_ns = LAPIC_TIMER_ADVANCE_NS_INIT;
2882
2883 /*
2884 * Stuff the APIC ENABLE bit in lieu of temporarily incrementing
2885 * apic_hw_disabled; the full RESET value is set by kvm_lapic_reset().
2886 */
2887 vcpu->arch.apic_base = MSR_IA32_APICBASE_ENABLE;
2888 static_branch_inc(&apic_sw_disabled.key); /* sw disabled at reset */
2889 kvm_iodevice_init(&apic->dev, &apic_mmio_ops);
2890
2891 /*
2892 * Defer evaluating inhibits until the vCPU is first run, as this vCPU
2893 * will not get notified of any changes until this vCPU is visible to
2894 * other vCPUs (marked online and added to the set of vCPUs).
2895 *
2896 * Opportunistically mark APICv active as VMX in particularly is highly
2897 * unlikely to have inhibits. Ignore the current per-VM APICv state so
2898 * that vCPU creation is guaranteed to run with a deterministic value,
2899 * the request will ensure the vCPU gets the correct state before VM-Entry.
2900 */
2901 if (enable_apicv) {
2902 apic->apicv_active = true;
2903 kvm_make_request(KVM_REQ_APICV_UPDATE, vcpu);
2904 }
2905
2906 return 0;
2907 nomem_free_apic:
2908 kfree(apic);
2909 vcpu->arch.apic = NULL;
2910 nomem:
2911 return -ENOMEM;
2912 }
2913
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH 04/31] KVM: x86: Switch to use hrtimer_setup()
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
1 sibling, 0 replies; 42+ messages in thread
From: kernel test robot @ 2024-10-28 19:17 UTC (permalink / raw)
To: Nam Cao, Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
Cc: llvm, oe-kbuild-all, Nam Cao, Sean Christopherson
Hi Nam,
kernel test robot noticed the following build errors:
[auto build test ERROR on kvm/queue]
[also build test ERROR on tip/sched/core perf-tools-next/perf-tools-next tip/perf/core perf-tools/perf-tools tip/timers/core axboe-block/for-next linus/master v6.12-rc5 next-20241028]
[cannot apply to kvm/linux-next acme/perf/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Nam-Cao/KVM-MIPS-Switch-to-use-hrtimer_setup/20241028-154142
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
patch link: https://lore.kernel.org/r/8774212e6c10c550743219e00738492eb379227c.1729864823.git.namcao%40linutronix.de
patch subject: [PATCH 04/31] KVM: x86: Switch to use hrtimer_setup()
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241029/202410290239.urBaNd5D-lkp@intel.com/config)
compiler: clang version 19.1.2 (https://github.com/llvm/llvm-project 7ba7d8e2f7b6445b60679da826210cdde29eaf8b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241029/202410290239.urBaNd5D-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410290239.urBaNd5D-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/x86/kvm/lapic.c:20:
In file included from include/linux/kvm_host.h:16:
In file included from include/linux/mm.h:2213:
include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
505 | item];
| ~~~~
include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
512 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
525 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/lapic.c:2878:2: error: call to undeclared function 'hrtimer_setup'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
2878 | hrtimer_setup(&apic->lapic_timer.timer, apic_timer_fn, CLOCK_MONOTONIC,
| ^
arch/x86/kvm/lapic.c:2878:2: note: did you mean 'hrtimer_start'?
include/linux/hrtimer.h:272:20: note: 'hrtimer_start' declared here
272 | static inline void hrtimer_start(struct hrtimer *timer, ktime_t tim,
| ^
4 warnings and 1 error generated.
--
In file included from arch/x86/kvm/i8254.c:35:
In file included from include/linux/kvm_host.h:16:
In file included from include/linux/mm.h:2213:
include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
505 | item];
| ~~~~
include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
512 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
525 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/i8254.c:693:2: error: call to undeclared function 'hrtimer_setup'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
693 | hrtimer_setup(&pit_state->timer, pit_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
| ^
arch/x86/kvm/i8254.c:693:2: note: did you mean 'hrtimer_start'?
include/linux/hrtimer.h:272:20: note: 'hrtimer_start' declared here
272 | static inline void hrtimer_start(struct hrtimer *timer, ktime_t tim,
| ^
4 warnings and 1 error generated.
--
In file included from arch/x86/kvm/hyperv.c:22:
In file included from arch/x86/kvm/x86.h:5:
In file included from include/linux/kvm_host.h:16:
In file included from include/linux/mm.h:2213:
include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
505 | item];
| ~~~~
include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
512 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
525 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/hyperv.c:955:2: error: call to undeclared function 'hrtimer_setup'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
955 | hrtimer_setup(&stimer->timer, stimer_timer_callback, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
| ^
arch/x86/kvm/hyperv.c:955:2: note: did you mean 'hrtimer_start'?
include/linux/hrtimer.h:272:20: note: 'hrtimer_start' declared here
272 | static inline void hrtimer_start(struct hrtimer *timer, ktime_t tim,
| ^
4 warnings and 1 error generated.
--
In file included from arch/x86/kvm/vmx/nested.c:8:
In file included from arch/x86/include/asm/mmu_context.h:8:
In file included from include/linux/pkeys.h:5:
In file included from include/linux/mm.h:2213:
include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
505 | item];
| ~~~~
include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
512 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
525 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/vmx/nested.c:5278:2: error: call to undeclared function 'hrtimer_setup'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
5278 | hrtimer_setup(&vmx->nested.preemption_timer, vmx_preemption_timer_fn, CLOCK_MONOTONIC,
| ^
arch/x86/kvm/vmx/nested.c:5278:2: note: did you mean 'hrtimer_start'?
include/linux/hrtimer.h:272:20: note: 'hrtimer_start' declared here
272 | static inline void hrtimer_start(struct hrtimer *timer, ktime_t tim,
| ^
4 warnings and 1 error generated.
vim +/hrtimer_setup +2878 arch/x86/kvm/lapic.c
2847
2848 int kvm_create_lapic(struct kvm_vcpu *vcpu)
2849 {
2850 struct kvm_lapic *apic;
2851
2852 ASSERT(vcpu != NULL);
2853
2854 if (!irqchip_in_kernel(vcpu->kvm)) {
2855 static_branch_inc(&kvm_has_noapic_vcpu);
2856 return 0;
2857 }
2858
2859 apic = kzalloc(sizeof(*apic), GFP_KERNEL_ACCOUNT);
2860 if (!apic)
2861 goto nomem;
2862
2863 vcpu->arch.apic = apic;
2864
2865 if (kvm_x86_ops.alloc_apic_backing_page)
2866 apic->regs = kvm_x86_call(alloc_apic_backing_page)(vcpu);
2867 else
2868 apic->regs = (void *)get_zeroed_page(GFP_KERNEL_ACCOUNT);
2869 if (!apic->regs) {
2870 printk(KERN_ERR "malloc apic regs error for vcpu %x\n",
2871 vcpu->vcpu_id);
2872 goto nomem_free_apic;
2873 }
2874 apic->vcpu = vcpu;
2875
2876 apic->nr_lvt_entries = kvm_apic_calc_nr_lvt_entries(vcpu);
2877
> 2878 hrtimer_setup(&apic->lapic_timer.timer, apic_timer_fn, CLOCK_MONOTONIC,
2879 HRTIMER_MODE_ABS_HARD);
2880 if (lapic_timer_advance)
2881 apic->lapic_timer.timer_advance_ns = LAPIC_TIMER_ADVANCE_NS_INIT;
2882
2883 /*
2884 * Stuff the APIC ENABLE bit in lieu of temporarily incrementing
2885 * apic_hw_disabled; the full RESET value is set by kvm_lapic_reset().
2886 */
2887 vcpu->arch.apic_base = MSR_IA32_APICBASE_ENABLE;
2888 static_branch_inc(&apic_sw_disabled.key); /* sw disabled at reset */
2889 kvm_iodevice_init(&apic->dev, &apic_mmio_ops);
2890
2891 /*
2892 * Defer evaluating inhibits until the vCPU is first run, as this vCPU
2893 * will not get notified of any changes until this vCPU is visible to
2894 * other vCPUs (marked online and added to the set of vCPUs).
2895 *
2896 * Opportunistically mark APICv active as VMX in particularly is highly
2897 * unlikely to have inhibits. Ignore the current per-VM APICv state so
2898 * that vCPU creation is guaranteed to run with a deterministic value,
2899 * the request will ensure the vCPU gets the correct state before VM-Entry.
2900 */
2901 if (enable_apicv) {
2902 apic->apicv_active = true;
2903 kvm_make_request(KVM_REQ_APICV_UPDATE, vcpu);
2904 }
2905
2906 return 0;
2907 nomem_free_apic:
2908 kfree(apic);
2909 vcpu->arch.apic = NULL;
2910 nomem:
2911 return -ENOMEM;
2912 }
2913
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH 26/31] ata: pata_octeon_cf: Switch to use hrtimer_setup()
2024-10-28 7:31 ` [PATCH 26/31] ata: pata_octeon_cf: " Nam Cao
@ 2024-10-29 23:41 ` Damien Le Moal
0 siblings, 0 replies; 42+ messages in thread
From: Damien Le Moal @ 2024-10-29 23:41 UTC (permalink / raw)
To: Nam Cao, Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel
On 10/28/24 16:31, Nam Cao 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.
>
> Patch was created by using Coccinelle.
>
> Signed-off-by: Nam Cao <namcao@linutronix.de>
Acked-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH 29/31] PM / devfreq: rockchip-dfi: Switch to use hrtimer_setup()
2024-10-28 7:32 ` [PATCH 29/31] PM / devfreq: rockchip-dfi: " Nam Cao
@ 2024-12-08 12:39 ` Chanwoo Choi
0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2024-12-08 12:39 UTC (permalink / raw)
To: Nam Cao
Cc: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel, Heiko Stuebner
Hi,
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Thanks,
On Mon, Oct 28, 2024 at 4:42 PM 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.
>
> Patch was created by using Coccinelle.
>
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> ---
> Cc: Heiko Stuebner <heiko@sntech.de>
> ---
> drivers/devfreq/event/rockchip-dfi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c
> index e2a1e4463b6f..0470d7c175f4 100644
> --- a/drivers/devfreq/event/rockchip-dfi.c
> +++ b/drivers/devfreq/event/rockchip-dfi.c
> @@ -642,8 +642,7 @@ static int rockchip_ddr_perf_init(struct rockchip_dfi *dfi)
> if (ret)
> return ret;
>
> - hrtimer_init(&dfi->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> - dfi->timer.function = rockchip_dfi_timer;
> + hrtimer_setup(&dfi->timer, rockchip_dfi_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
>
> switch (dfi->ddr_type) {
> case ROCKCHIP_DDRTYPE_LPDDR2:
> --
> 2.39.5
>
>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH 16/31] io_uring/timeout: Switch to use hrtimer_setup()
2024-10-28 7:31 ` [PATCH 16/31] io_uring/timeout: " Nam Cao
@ 2025-05-02 8:50 ` Pavel Begunkov
0 siblings, 0 replies; 42+ messages in thread
From: Pavel Begunkov @ 2025-05-02 8:50 UTC (permalink / raw)
To: Nam Cao, Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
Andreas Hindborg, Alice Ryhl, Miguel Ojeda, Kees Cook,
linux-kernel, io-uring
Cc: Jens Axboe
On 10/28/24 07:31, Nam Cao 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 the new function.
>
> This new function is also used to initialize the callback function in
> .prep() (the callback function depends on whether it is IORING_OP_TIMEOUT
> or IORING_OP_LINK_TIMEOUT). Thus, callback function setup in io_timeout()
> and io_queue_linked_timeout() are now redundant, therefore remove them.
Next time do the basic courtesy of CC'ing io_uring mailing list if
you're sending io_uring patches, so that people don't have to guess
months later why there is an unknown patch in the tree and where the
hell did it came from.
--
Pavel Begunkov
^ permalink raw reply [flat|nested] 42+ messages in thread
end of thread, other threads:[~2025-05-02 8:49 UTC | newest]
Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox