mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-04-13 09:59:31 +00:00
A treewide hrtimer timer cleanup
hrtimers are initialized with hrtimer_init() and a subsequent store to the callback pointer. This turned out to be suboptimal for the upcoming Rust integration and is obviously a silly implementation to begin with. This cleanup replaces the hrtimer_init(T); T->function = cb; sequence with hrtimer_setup(T, cb); The conversion was done with Coccinelle and a few manual fixups. Once the conversion has completely landed in mainline, hrtimer_init() will be removed and the hrtimer::function becomes a private member. -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmff5jQTHHRnbHhAbGlu dXRyb25peC5kZQAKCRCmGPVMDXSYoVvRD/wKtuwmiA66NJFgXC0qVq82A6fO3bY8 GBdbfysDJIbqGu5PTcULTbJ8qkqv3jeLUv6CcXvS4sZ7y/uJQl2lzf8yrD/0bbwc rLI6sHiPSZmK93kNVN4X5H7kvt7cE/DYC9nnEOgK3BY5FgKc4n9887d4aVBhL8Lv ODwVXvZ+xi351YCj7qRyPU24zt/p4tkkT1o2k4a0HBluqLI0D+V20fke9IERUL8r d1uWKlcn0TqYDesE8HXKIhbst3gx52rMJrXBJDHwFmG6v8Pj1fkTXCVpPo8QcBz8 OTVkpomN9f/Tx4+GZwhZOF86LhLL3OhxD6pT7JhFCXdmSGv+Ez8uyk1YZysM/XpV Juy/1yAcBpDIDkmhMFGdAAn48Nn9Fotty0r4je60zSEp1d/4QMXcFme29qr2JTUE iWnQ/HD6DxUjVHqy7CYvvo26Xegg1C7qgyOVt4PYZwAM1VKF5P3kzYTb4SAdxtop Tpji1sfW9QV08jqMNo6XntD32DSP9S2HqjO9LwBw700jnx2jjJ35fcJs6iodMOUn gckIZLMn3L0OoglPdyA5O7SNTbKE7aFiRKdnT/cJtR3Fa39Qu27CwC5gfiyuie9I Q+LG8GLuYSBHXAR+PBK4GWlzJ7Dn8k3eqmbnLeKpRMsU6ZzcttgA64xhaviN2wN0 iJbvLJeisXr3GA== =bYAX -----END PGP SIGNATURE----- Merge tag 'timers-cleanups-2025-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer cleanups from Thomas Gleixner: "A treewide hrtimer timer cleanup hrtimers are initialized with hrtimer_init() and a subsequent store to the callback pointer. This turned out to be suboptimal for the upcoming Rust integration and is obviously a silly implementation to begin with. This cleanup replaces the hrtimer_init(T); T->function = cb; sequence with hrtimer_setup(T, cb); The conversion was done with Coccinelle and a few manual fixups. Once the conversion has completely landed in mainline, hrtimer_init() will be removed and the hrtimer::function becomes a private member" * tag 'timers-cleanups-2025-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (100 commits) wifi: rt2x00: Switch to use hrtimer_update_function() io_uring: Use helper function hrtimer_update_function() serial: xilinx_uartps: Use helper function hrtimer_update_function() ASoC: fsl: imx-pcm-fiq: Switch to use hrtimer_setup() RDMA: Switch to use hrtimer_setup() virtio: mem: Switch to use hrtimer_setup() drm/vmwgfx: Switch to use hrtimer_setup() drm/xe/oa: Switch to use hrtimer_setup() drm/vkms: Switch to use hrtimer_setup() drm/msm: Switch to use hrtimer_setup() drm/i915/request: Switch to use hrtimer_setup() drm/i915/uncore: Switch to use hrtimer_setup() drm/i915/pmu: Switch to use hrtimer_setup() drm/i915/perf: Switch to use hrtimer_setup() drm/i915/gvt: Switch to use hrtimer_setup() drm/i915/huc: Switch to use hrtimer_setup() drm/amdgpu: Switch to use hrtimer_setup() stm class: heartbeat: Switch to use hrtimer_setup() i2c: Switch to use hrtimer_setup() iio: Switch to use hrtimer_setup() ...
This commit is contained in:
commit
a50b4fe095
141 changed files with 281 additions and 404 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1070,8 +1070,7 @@ static void timer_context_init(struct kvm_vcpu *vcpu, int timerid)
|
|||
else
|
||||
ctxt->offset.vm_offset = &kvm->arch.timer_data.poffset;
|
||||
|
||||
hrtimer_init(&ctxt->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
|
||||
ctxt->hrtimer.function = kvm_hrtimer_expire;
|
||||
hrtimer_setup(&ctxt->hrtimer, kvm_hrtimer_expire, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
|
||||
|
||||
switch (timerid) {
|
||||
case TIMER_PTIMER:
|
||||
|
@ -1098,8 +1097,8 @@ void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu)
|
|||
timer_set_offset(vcpu_ptimer(vcpu), 0);
|
||||
}
|
||||
|
||||
hrtimer_init(&timer->bg_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
|
||||
timer->bg_timer.function = kvm_bg_timer_expire;
|
||||
hrtimer_setup(&timer->bg_timer, kvm_bg_timer_expire, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_ABS_HARD);
|
||||
}
|
||||
|
||||
void kvm_timer_init_vm(struct kvm *kvm)
|
||||
|
|
|
@ -1459,8 +1459,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_HARD);
|
||||
vcpu->arch.swtimer.function = kvm_swtimer_wakeup;
|
||||
hrtimer_setup(&vcpu->arch.swtimer, kvm_swtimer_wakeup, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_ABS_PINNED_HARD);
|
||||
|
||||
vcpu->arch.handle_exit = kvm_handle_exit;
|
||||
vcpu->arch.guest_eentry = (unsigned long)kvm_loongarch_ops->exc_entry;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -766,8 +766,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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -3943,8 +3943,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;
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -274,8 +274,7 @@ static void rapl_hrtimer_init(struct rapl_pmu *rapl_pmu)
|
|||
{
|
||||
struct hrtimer *hr = &rapl_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 *rapl_pmu,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -2921,9 +2921,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;
|
||||
|
||||
|
|
|
@ -5327,9 +5327,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();
|
||||
|
||||
|
|
|
@ -2225,8 +2225,8 @@ void kvm_xen_init_vcpu(struct kvm_vcpu *vcpu)
|
|||
vcpu->arch.xen.poll_evtchn = 0;
|
||||
|
||||
timer_setup(&vcpu->arch.xen.poll_timer, cancel_evtchn_poll, 0);
|
||||
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);
|
||||
|
||||
kvm_gpc_init(&vcpu->arch.xen.runstate_cache, vcpu->kvm);
|
||||
kvm_gpc_init(&vcpu->arch.xen.runstate2_cache, vcpu->kvm);
|
||||
|
|
|
@ -7315,9 +7315,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
|
||||
|
|
|
@ -3004,8 +3004,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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -1426,8 +1426,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);
|
||||
}
|
||||
|
@ -1604,8 +1603,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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -188,8 +188,8 @@ static int amdgpu_vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
|
|||
amdgpu_crtc->connector = NULL;
|
||||
amdgpu_crtc->vsync_timer_enabled = AMDGPU_IRQ_STATE_DISABLE;
|
||||
|
||||
hrtimer_init(&amdgpu_crtc->vblank_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
amdgpu_crtc->vblank_timer.function = &amdgpu_vkms_vblank_simulate;
|
||||
hrtimer_setup(&amdgpu_crtc->vblank_timer, &amdgpu_vkms_vblank_simulate, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -231,8 +231,8 @@ static void delayed_huc_load_init(struct intel_huc *huc)
|
|||
sw_fence_dummy_notify);
|
||||
i915_sw_fence_commit(&huc->delayed_load.fence);
|
||||
|
||||
hrtimer_init(&huc->delayed_load.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
huc->delayed_load.timer.function = huc_delayed_load_timer_callback;
|
||||
hrtimer_setup(&huc->delayed_load.timer, huc_delayed_load_timer_callback, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
static void delayed_huc_load_fini(struct intel_huc *huc)
|
||||
|
|
|
@ -581,8 +581,7 @@ static int setup_virtual_dp_monitor(struct intel_vgpu *vgpu, int port_num,
|
|||
vgpu->display.port_num = port_num;
|
||||
|
||||
/* Init hrtimer based on default refresh rate */
|
||||
hrtimer_init(&vblank_timer->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
vblank_timer->timer.function = vblank_timer_fn;
|
||||
hrtimer_setup(&vblank_timer->timer, vblank_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
vblank_timer->vrefresh_k = port->vrefresh_k;
|
||||
vblank_timer->period = DIV64_U64_ROUND_CLOSEST(NSEC_PER_SEC * MSEC_PER_SEC, vblank_timer->vrefresh_k);
|
||||
|
||||
|
|
|
@ -286,8 +286,7 @@ static int tbs_sched_init(struct intel_gvt *gvt)
|
|||
return -ENOMEM;
|
||||
|
||||
INIT_LIST_HEAD(&data->lru_runq_head);
|
||||
hrtimer_init(&data->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
data->timer.function = tbs_timer_fn;
|
||||
hrtimer_setup(&data->timer, tbs_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
data->period = GVT_DEFAULT_TIME_SLICE;
|
||||
data->gvt = gvt;
|
||||
|
||||
|
|
|
@ -3359,9 +3359,8 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
|
|||
"opening stream oa config uuid=%s\n",
|
||||
stream->oa_config->uuid);
|
||||
|
||||
hrtimer_init(&stream->poll_check_timer,
|
||||
CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
stream->poll_check_timer.function = oa_poll_check_timer_cb;
|
||||
hrtimer_setup(&stream->poll_check_timer, oa_poll_check_timer_cb, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
init_waitqueue_head(&stream->poll_wq);
|
||||
spin_lock_init(&stream->oa_buffer.ptr_lock);
|
||||
mutex_init(&stream->lock);
|
||||
|
|
|
@ -1264,8 +1264,7 @@ void i915_pmu_register(struct drm_i915_private *i915)
|
|||
int ret = -ENOMEM;
|
||||
|
||||
spin_lock_init(&pmu->lock);
|
||||
hrtimer_init(&pmu->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
pmu->timer.function = i915_sample;
|
||||
hrtimer_setup(&pmu->timer, i915_sample, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
pmu->cpuhp.cpu = -1;
|
||||
init_rc6(pmu);
|
||||
|
||||
|
|
|
@ -293,8 +293,7 @@ static void __rq_init_watchdog(struct i915_request *rq)
|
|||
{
|
||||
struct i915_request_watchdog *wdg = &rq->watchdog;
|
||||
|
||||
hrtimer_init(&wdg->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
wdg->timer.function = __rq_watchdog_expired;
|
||||
hrtimer_setup(&wdg->timer, __rq_watchdog_expired, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
static void __rq_arm_watchdog(struct i915_request *rq)
|
||||
|
|
|
@ -2103,8 +2103,7 @@ static int __fw_domain_init(struct intel_uncore *uncore,
|
|||
|
||||
d->mask = BIT(domain_id);
|
||||
|
||||
hrtimer_init(&d->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
d->timer.function = intel_uncore_fw_release_timer;
|
||||
hrtimer_setup(&d->timer, intel_uncore_fw_release_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
|
||||
uncore->fw_domains |= BIT(domain_id);
|
||||
|
||||
|
|
|
@ -65,8 +65,7 @@ msm_fence_context_alloc(struct drm_device *dev, volatile uint32_t *fenceptr,
|
|||
fctx->completed_fence = fctx->last_fence;
|
||||
*fctx->fenceptr = fctx->last_fence;
|
||||
|
||||
hrtimer_init(&fctx->deadline_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
fctx->deadline_timer.function = deadline_timer;
|
||||
hrtimer_setup(&fctx->deadline_timer, deadline_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
|
||||
kthread_init_work(&fctx->deadline_work, deadline_work);
|
||||
|
||||
|
|
|
@ -135,8 +135,7 @@ void msm_hrtimer_work_init(struct msm_hrtimer_work *work,
|
|||
clockid_t clock_id,
|
||||
enum hrtimer_mode mode)
|
||||
{
|
||||
hrtimer_init(&work->timer, clock_id, mode);
|
||||
work->timer.function = msm_hrtimer_worktimer;
|
||||
hrtimer_setup(&work->timer, msm_hrtimer_worktimer, clock_id, mode);
|
||||
work->worker = worker;
|
||||
kthread_init_work(&work->work, fn);
|
||||
}
|
||||
|
|
|
@ -64,8 +64,8 @@ static int vkms_enable_vblank(struct drm_crtc *crtc)
|
|||
struct drm_vblank_crtc *vblank = drm_crtc_vblank_crtc(crtc);
|
||||
struct vkms_output *out = drm_crtc_to_vkms_output(crtc);
|
||||
|
||||
hrtimer_init(&out->vblank_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
out->vblank_hrtimer.function = &vkms_vblank_simulate;
|
||||
hrtimer_setup(&out->vblank_hrtimer, &vkms_vblank_simulate, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
out->period_ns = ktime_set(0, vblank->framedur_ns);
|
||||
hrtimer_start(&out->vblank_hrtimer, out->period_ns, HRTIMER_MODE_REL);
|
||||
|
||||
|
|
|
@ -290,8 +290,8 @@ vmw_vkms_enable_vblank(struct drm_crtc *crtc)
|
|||
|
||||
drm_calc_timestamping_constants(crtc, &crtc->mode);
|
||||
|
||||
hrtimer_init(&du->vkms.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
du->vkms.timer.function = &vmw_vkms_vblank_simulate;
|
||||
hrtimer_setup(&du->vkms.timer, &vmw_vkms_vblank_simulate, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
du->vkms.period_ns = ktime_set(0, vblank->framedur_ns);
|
||||
hrtimer_start(&du->vkms.timer, du->vkms.period_ns, HRTIMER_MODE_REL);
|
||||
|
||||
|
|
|
@ -1766,8 +1766,8 @@ static int xe_oa_stream_init(struct xe_oa_stream *stream,
|
|||
|
||||
WRITE_ONCE(u->exclusive_stream, stream);
|
||||
|
||||
hrtimer_init(&stream->poll_check_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
stream->poll_check_timer.function = xe_oa_poll_check_timer_cb;
|
||||
hrtimer_setup(&stream->poll_check_timer, xe_oa_poll_check_timer_cb, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
init_waitqueue_head(&stream->poll_wq);
|
||||
|
||||
spin_lock_init(&stream->oa_buffer.ptr_lock);
|
||||
|
|
|
@ -81,10 +81,8 @@ static int stm_heartbeat_init(void)
|
|||
stm_heartbeat[i].data.type = STM_USER;
|
||||
stm_heartbeat[i].data.link = stm_heartbeat_link;
|
||||
stm_heartbeat[i].data.unlink = stm_heartbeat_unlink;
|
||||
hrtimer_init(&stm_heartbeat[i].hrtimer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_ABS);
|
||||
stm_heartbeat[i].hrtimer.function =
|
||||
stm_heartbeat_hrtimer_handler;
|
||||
hrtimer_setup(&stm_heartbeat[i].hrtimer, stm_heartbeat_hrtimer_handler,
|
||||
CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
|
||||
ret = stm_source_register_device(NULL, &stm_heartbeat[i].data);
|
||||
if (ret)
|
||||
|
|
|
@ -1723,8 +1723,8 @@ static int i2c_imx_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
|
||||
spin_lock_init(&i2c_imx->slave_lock);
|
||||
hrtimer_init(&i2c_imx->slave_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
i2c_imx->slave_timer.function = i2c_imx_slave_timeout;
|
||||
hrtimer_setup(&i2c_imx->slave_timer, i2c_imx_slave_timeout, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_ABS);
|
||||
|
||||
match = device_get_match_data(&pdev->dev);
|
||||
if (match)
|
||||
|
|
|
@ -812,9 +812,7 @@ static int tsc2046_adc_probe(struct spi_device *spi)
|
|||
|
||||
spin_lock_init(&priv->state_lock);
|
||||
priv->state = TSC2046_STATE_SHUTDOWN;
|
||||
hrtimer_init(&priv->trig_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_SOFT);
|
||||
priv->trig_timer.function = tsc2046_adc_timer;
|
||||
hrtimer_setup(&priv->trig_timer, tsc2046_adc_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT);
|
||||
|
||||
ret = devm_iio_trigger_register(dev, trig);
|
||||
if (ret) {
|
||||
|
|
|
@ -145,8 +145,8 @@ static struct iio_sw_trigger *iio_trig_hrtimer_probe(const char *name)
|
|||
trig_info->swt.trigger->ops = &iio_hrtimer_trigger_ops;
|
||||
trig_info->swt.trigger->dev.groups = iio_hrtimer_attr_groups;
|
||||
|
||||
hrtimer_init(&trig_info->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
|
||||
trig_info->timer.function = iio_hrtimer_trig_handler;
|
||||
hrtimer_setup(&trig_info->timer, iio_hrtimer_trig_handler, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_HARD);
|
||||
|
||||
trig_info->sampling_frequency[0] = HRTIMER_DEFAULT_SAMPLING_FREQUENCY;
|
||||
trig_info->period = NSEC_PER_SEC / trig_info->sampling_frequency[0];
|
||||
|
|
|
@ -635,12 +635,11 @@ void hfi1_init_pportdata(struct pci_dev *pdev, struct hfi1_pportdata *ppd,
|
|||
spin_lock_init(&ppd->cca_timer_lock);
|
||||
|
||||
for (i = 0; i < OPA_MAX_SLS; i++) {
|
||||
hrtimer_init(&ppd->cca_timer[i].hrtimer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
ppd->cca_timer[i].ppd = ppd;
|
||||
ppd->cca_timer[i].sl = i;
|
||||
ppd->cca_timer[i].ccti = 0;
|
||||
ppd->cca_timer[i].hrtimer.function = cca_timer_fn;
|
||||
hrtimer_setup(&ppd->cca_timer[i].hrtimer, cca_timer_fn, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
ppd->cc_max_table_entries = IB_CC_TABLE_CAP_DEFAULT;
|
||||
|
|
|
@ -1107,9 +1107,8 @@ int rvt_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *init_attr,
|
|||
}
|
||||
/* initialize timers needed for rc qp */
|
||||
timer_setup(&qp->s_timer, rvt_rc_timeout, 0);
|
||||
hrtimer_init(&qp->s_rnr_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
qp->s_rnr_timer.function = rvt_rc_rnr_retry;
|
||||
hrtimer_setup(&qp->s_rnr_timer, rvt_rc_rnr_retry, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
/*
|
||||
* Driver needs to set up it's private QP structure and do any
|
||||
|
|
|
@ -483,8 +483,8 @@ static int pattern_trig_activate(struct led_classdev *led_cdev)
|
|||
data->led_cdev = led_cdev;
|
||||
led_set_trigger_data(led_cdev, data);
|
||||
timer_setup(&data->timer, pattern_trig_timer_function, 0);
|
||||
hrtimer_init(&data->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
data->hrtimer.function = pattern_trig_hrtimer_function;
|
||||
hrtimer_setup(&data->hrtimer, pattern_trig_hrtimer_function, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
led_cdev->activated = true;
|
||||
|
||||
if (led_cdev->flags & LED_INIT_DEFAULT_TRIGGER) {
|
||||
|
|
|
@ -534,9 +534,7 @@ int mbox_controller_register(struct mbox_controller *mbox)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
hrtimer_init(&mbox->poll_hrt, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
mbox->poll_hrt.function = txdone_hrtimer;
|
||||
hrtimer_setup(&mbox->poll_hrt, txdone_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
spin_lock_init(&mbox->poll_hrt_lock);
|
||||
}
|
||||
|
||||
|
|
|
@ -1346,9 +1346,8 @@ struct cec_adapter *cec_pin_allocate_adapter(const struct cec_pin_ops *pin_ops,
|
|||
if (pin == NULL)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
pin->ops = pin_ops;
|
||||
hrtimer_init(&pin->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
atomic_set(&pin->work_pin_num_events, 0);
|
||||
pin->timer.function = cec_pin_timer;
|
||||
hrtimer_setup(&pin->timer, cec_pin_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
init_waitqueue_head(&pin->kthread_waitq);
|
||||
pin->tx_custom_low_usecs = CEC_TIM_CUSTOM_DEFAULT;
|
||||
pin->tx_custom_high_usecs = CEC_TIM_CUSTOM_DEFAULT;
|
||||
|
|
|
@ -190,8 +190,7 @@ static int __cx88_ir_start(void *priv)
|
|||
ir = core->ir;
|
||||
|
||||
if (ir->polling) {
|
||||
hrtimer_init(&ir->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
ir->timer.function = cx88_ir_work;
|
||||
hrtimer_setup(&ir->timer, cx88_ir_work, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
hrtimer_start(&ir->timer,
|
||||
ktime_set(0, ir->polling * 1000000),
|
||||
HRTIMER_MODE_REL);
|
||||
|
|
|
@ -269,8 +269,8 @@ static int wave5_vpu_probe(struct platform_device *pdev)
|
|||
dev->irq = platform_get_irq(pdev, 0);
|
||||
if (dev->irq < 0) {
|
||||
dev_err(&pdev->dev, "failed to get irq resource, falling back to polling\n");
|
||||
hrtimer_init(&dev->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED);
|
||||
dev->hrtimer.function = &wave5_vpu_timer_callback;
|
||||
hrtimer_setup(&dev->hrtimer, &wave5_vpu_timer_callback, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_PINNED);
|
||||
dev->worker = kthread_run_worker(0, "vpu_irq_thread");
|
||||
if (IS_ERR(dev->worker)) {
|
||||
dev_err(&pdev->dev, "failed to create vpu irq worker\n");
|
||||
|
|
|
@ -172,8 +172,7 @@ static int pwm_ir_probe(struct platform_device *pdev)
|
|||
rcdev->tx_ir = pwm_ir_tx_sleep;
|
||||
} else {
|
||||
init_completion(&pwm_ir->tx_done);
|
||||
hrtimer_init(&pwm_ir->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
pwm_ir->timer.function = pwm_ir_timer;
|
||||
hrtimer_setup(&pwm_ir->timer, pwm_ir_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
rcdev->tx_ir = pwm_ir_tx_atomic;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,8 +111,7 @@ static int start_stall_detector_cpu(unsigned int cpu)
|
|||
ping_timeout_ms = vcpu_stall_config.stall_timeout_sec *
|
||||
MSEC_PER_SEC / 2;
|
||||
|
||||
hrtimer_init(vcpu_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
vcpu_hrtimer->function = vcpu_stall_detect_timer_fn;
|
||||
hrtimer_setup(vcpu_hrtimer, vcpu_stall_detect_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
vcpu_stall_detector->is_initialized = true;
|
||||
|
||||
hrtimer_start(vcpu_hrtimer, ms_to_ktime(ping_timeout_ms),
|
||||
|
|
|
@ -1875,8 +1875,7 @@ static void dw_mci_init_fault(struct dw_mci *host)
|
|||
{
|
||||
host->fail_data_crc = (struct fault_attr) FAULT_ATTR_INITIALIZER;
|
||||
|
||||
hrtimer_init(&host->fault_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
host->fault_timer.function = dw_mci_fault_timer;
|
||||
hrtimer_setup(&host->fault_timer, dw_mci_fault_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
}
|
||||
#else
|
||||
static void dw_mci_init_fault(struct dw_mci *host)
|
||||
|
|
|
@ -2420,12 +2420,11 @@ int m_can_class_register(struct m_can_classdev *cdev)
|
|||
|
||||
if (!cdev->net->irq) {
|
||||
dev_dbg(cdev->dev, "Polling enabled, initialize hrtimer");
|
||||
hrtimer_init(&cdev->hrtimer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_PINNED);
|
||||
cdev->hrtimer.function = &hrtimer_callback;
|
||||
hrtimer_setup(&cdev->hrtimer, &hrtimer_callback, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_PINNED);
|
||||
} else {
|
||||
hrtimer_init(&cdev->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
cdev->hrtimer.function = m_can_coalescing_timer;
|
||||
hrtimer_setup(&cdev->hrtimer, m_can_coalescing_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
ret = m_can_dev_setup(cdev);
|
||||
|
|
|
@ -541,11 +541,11 @@ int mcp251xfd_ring_alloc(struct mcp251xfd_priv *priv)
|
|||
}
|
||||
priv->rx_ring_num = i;
|
||||
|
||||
hrtimer_init(&priv->rx_irq_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
priv->rx_irq_timer.function = mcp251xfd_rx_irq_timer;
|
||||
hrtimer_setup(&priv->rx_irq_timer, mcp251xfd_rx_irq_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
hrtimer_init(&priv->tx_irq_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
priv->tx_irq_timer.function = mcp251xfd_tx_irq_timer;
|
||||
hrtimer_setup(&priv->tx_irq_timer, mcp251xfd_tx_irq_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1833,9 +1833,8 @@ static int gmac_open(struct net_device *netdev)
|
|||
gmac_enable_tx_rx(netdev);
|
||||
netif_tx_start_all_queues(netdev);
|
||||
|
||||
hrtimer_init(&port->rx_coalesce_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
port->rx_coalesce_timer.function = &gmac_coalesce_delay_expired;
|
||||
hrtimer_setup(&port->rx_coalesce_timer, &gmac_coalesce_delay_expired, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
netdev_dbg(netdev, "opened\n");
|
||||
|
||||
|
|
|
@ -416,8 +416,7 @@ static int ec_bhf_open(struct net_device *net_dev)
|
|||
|
||||
netif_start_queue(net_dev);
|
||||
|
||||
hrtimer_init(&priv->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
priv->hrtimer.function = ec_bhf_timer_fun;
|
||||
hrtimer_setup(&priv->hrtimer, ec_bhf_timer_fun, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
hrtimer_start(&priv->hrtimer, polling_frequency, HRTIMER_MODE_REL);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -739,8 +739,8 @@ void fec_ptp_init(struct platform_device *pdev, int irq_idx)
|
|||
|
||||
INIT_DELAYED_WORK(&fep->time_keep, fec_time_keep);
|
||||
|
||||
hrtimer_init(&fep->perout_timer, CLOCK_REALTIME, HRTIMER_MODE_REL);
|
||||
fep->perout_timer.function = fec_ptp_pps_perout_handler;
|
||||
hrtimer_setup(&fep->perout_timer, fec_ptp_pps_perout_handler, CLOCK_REALTIME,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
irq = platform_get_irq_byname_optional(pdev, "pps");
|
||||
if (irq < 0)
|
||||
|
|
|
@ -934,8 +934,6 @@ static int hip04_mac_probe(struct platform_device *pdev)
|
|||
priv->chan = arg.args[1] * RX_DESC_NUM;
|
||||
priv->group = arg.args[2];
|
||||
|
||||
hrtimer_init(&priv->tx_coalesce_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
|
||||
/* BQL will try to keep the TX queue as short as possible, but it can't
|
||||
* be faster than tx_coalesce_usecs, so we need a fast timeout here,
|
||||
* but also long enough to gather up enough frames to ensure we don't
|
||||
|
@ -944,7 +942,7 @@ static int hip04_mac_probe(struct platform_device *pdev)
|
|||
*/
|
||||
priv->tx_coalesce_frames = TX_DESC_NUM * 3 / 4;
|
||||
priv->tx_coalesce_usecs = 200;
|
||||
priv->tx_coalesce_timer.function = tx_done;
|
||||
hrtimer_setup(&priv->tx_coalesce_timer, tx_done, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
|
||||
priv->map = syscon_node_to_regmap(arg.np);
|
||||
of_node_put(arg.np);
|
||||
|
|
|
@ -7090,8 +7090,8 @@ static int igc_probe(struct pci_dev *pdev,
|
|||
INIT_WORK(&adapter->reset_task, igc_reset_task);
|
||||
INIT_WORK(&adapter->watchdog_task, igc_watchdog_task);
|
||||
|
||||
hrtimer_init(&adapter->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
adapter->hrtimer.function = &igc_qbv_scheduling_timer;
|
||||
hrtimer_setup(&adapter->hrtimer, &igc_qbv_scheduling_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
/* Initialize link properties that are user-changeable */
|
||||
adapter->fc_autoneg = true;
|
||||
|
|
|
@ -6985,9 +6985,8 @@ static int mvpp2_port_probe(struct platform_device *pdev,
|
|||
for (thread = 0; thread < priv->nthreads; thread++) {
|
||||
port_pcpu = per_cpu_ptr(port->pcpu, thread);
|
||||
|
||||
hrtimer_init(&port_pcpu->tx_done_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_PINNED_SOFT);
|
||||
port_pcpu->tx_done_timer.function = mvpp2_hr_timer_cb;
|
||||
hrtimer_setup(&port_pcpu->tx_done_timer, mvpp2_hr_timer_cb, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_PINNED_SOFT);
|
||||
port_pcpu->timer_scheduled = false;
|
||||
port_pcpu->dev = dev;
|
||||
}
|
||||
|
|
|
@ -545,8 +545,7 @@ static int ptp_probe(struct pci_dev *pdev,
|
|||
spin_lock_init(&ptp->ptp_lock);
|
||||
if (cn10k_ptp_errata(ptp)) {
|
||||
ptp->read_ptp_tstmp = &read_ptp_tstmp_sec_nsec;
|
||||
hrtimer_init(&ptp->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
ptp->hrtimer.function = ptp_reset_thresh;
|
||||
hrtimer_setup(&ptp->hrtimer, ptp_reset_thresh, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
} else {
|
||||
ptp->read_ptp_tstmp = &read_ptp_tstmp_nsec;
|
||||
}
|
||||
|
|
|
@ -375,6 +375,6 @@ irqreturn_t sparx5_xtr_handler(int irq, void *_sparx5)
|
|||
|
||||
void sparx5_port_inj_timer_setup(struct sparx5_port *port)
|
||||
{
|
||||
hrtimer_init(&port->inj_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
port->inj_timer.function = sparx5_injection_timeout;
|
||||
hrtimer_setup(&port->inj_timer, sparx5_injection_timeout, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
}
|
||||
|
|
|
@ -686,8 +686,8 @@ void rmnet_map_update_ul_agg_config(struct rmnet_port *port, u32 size,
|
|||
|
||||
void rmnet_map_tx_aggregate_init(struct rmnet_port *port)
|
||||
{
|
||||
hrtimer_init(&port->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
port->hrtimer.function = rmnet_map_flush_tx_packet_queue;
|
||||
hrtimer_setup(&port->hrtimer, rmnet_map_flush_tx_packet_queue, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
spin_lock_init(&port->agg_lock);
|
||||
rmnet_map_update_ul_agg_config(port, 4096, 1, 800);
|
||||
INIT_WORK(&port->agg_wq, rmnet_map_flush_tx_packet_work);
|
||||
|
|
|
@ -3199,8 +3199,7 @@ static void stmmac_init_coalesce(struct stmmac_priv *priv)
|
|||
priv->tx_coal_frames[chan] = STMMAC_TX_FRAMES;
|
||||
priv->tx_coal_timer[chan] = STMMAC_COAL_TX_TIMER;
|
||||
|
||||
hrtimer_init(&tx_q->txtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
tx_q->txtimer.function = stmmac_tx_timer;
|
||||
hrtimer_setup(&tx_q->txtimer, stmmac_tx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
for (chan = 0; chan < rx_channel_count; chan++)
|
||||
|
@ -6970,8 +6969,7 @@ int stmmac_xdp_open(struct net_device *dev)
|
|||
stmmac_set_tx_tail_ptr(priv, priv->ioaddr,
|
||||
tx_q->tx_tail_addr, chan);
|
||||
|
||||
hrtimer_init(&tx_q->txtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
tx_q->txtimer.function = stmmac_tx_timer;
|
||||
hrtimer_setup(&tx_q->txtimer, stmmac_tx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
/* Enable the MAC Rx/Tx */
|
||||
|
|
|
@ -2312,8 +2312,8 @@ static int am65_cpsw_nuss_ndev_add_tx_napi(struct am65_cpsw_common *common)
|
|||
for (i = 0; i < common->tx_ch_num; i++) {
|
||||
tx_chn = &common->tx_chns[i];
|
||||
|
||||
hrtimer_init(&tx_chn->tx_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED);
|
||||
tx_chn->tx_hrtimer.function = &am65_cpsw_nuss_tx_timer_callback;
|
||||
hrtimer_setup(&tx_chn->tx_hrtimer, &am65_cpsw_nuss_tx_timer_callback,
|
||||
CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED);
|
||||
|
||||
netif_napi_add_tx(common->dma_ndev, &tx_chn->napi_tx,
|
||||
am65_cpsw_nuss_tx_poll);
|
||||
|
@ -2566,9 +2566,8 @@ static int am65_cpsw_nuss_init_rx_chns(struct am65_cpsw_common *common)
|
|||
snprintf(flow->name,
|
||||
sizeof(flow->name), "%s-rx%d",
|
||||
dev_name(dev), i);
|
||||
hrtimer_init(&flow->rx_hrtimer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_PINNED);
|
||||
flow->rx_hrtimer.function = &am65_cpsw_nuss_rx_timer_callback;
|
||||
hrtimer_setup(&flow->rx_hrtimer, &am65_cpsw_nuss_rx_timer_callback, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_PINNED);
|
||||
|
||||
netif_napi_add(common->dma_ndev, &flow->napi_rx,
|
||||
am65_cpsw_nuss_rx_poll);
|
||||
|
|
|
@ -249,9 +249,8 @@ int prueth_ndev_add_tx_napi(struct prueth_emac *emac)
|
|||
struct prueth_tx_chn *tx_chn = &emac->tx_chns[i];
|
||||
|
||||
netif_napi_add_tx(emac->ndev, &tx_chn->napi_tx, emac_napi_tx_poll);
|
||||
hrtimer_init(&tx_chn->tx_hrtimer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_PINNED);
|
||||
tx_chn->tx_hrtimer.function = &emac_tx_timer_callback;
|
||||
hrtimer_setup(&tx_chn->tx_hrtimer, &emac_tx_timer_callback, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_PINNED);
|
||||
ret = request_irq(tx_chn->irq, prueth_tx_irq,
|
||||
IRQF_TRIGGER_HIGH, tx_chn->name,
|
||||
tx_chn);
|
||||
|
|
|
@ -1169,9 +1169,8 @@ static int prueth_netdev_init(struct prueth *prueth,
|
|||
ndev->hw_features |= NETIF_PRUETH_HSR_OFFLOAD_FEATURES;
|
||||
|
||||
netif_napi_add(ndev, &emac->napi_rx, icssg_napi_rx_poll);
|
||||
hrtimer_init(&emac->rx_hrtimer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_PINNED);
|
||||
emac->rx_hrtimer.function = &emac_rx_timer_callback;
|
||||
hrtimer_setup(&emac->rx_hrtimer, &emac_rx_timer_callback, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_PINNED);
|
||||
prueth->emac[mac] = emac;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -776,8 +776,8 @@ at86rf230_setup_spi_messages(struct at86rf230_local *lp,
|
|||
state->trx.tx_buf = state->buf;
|
||||
state->trx.rx_buf = state->buf;
|
||||
spi_message_add_tail(&state->trx, &state->msg);
|
||||
hrtimer_init(&state->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
state->timer.function = at86rf230_async_state_timer;
|
||||
hrtimer_setup(&state->timer, at86rf230_async_state_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
static irqreturn_t at86rf230_isr(int irq, void *data)
|
||||
|
|
|
@ -833,8 +833,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
|
|||
|
||||
ctx->dev = dev;
|
||||
|
||||
hrtimer_init(&ctx->tx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
ctx->tx_timer.function = &cdc_ncm_tx_timer_cb;
|
||||
hrtimer_setup(&ctx->tx_timer, &cdc_ncm_tx_timer_cb, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
tasklet_setup(&ctx->bh, cdc_ncm_txpath_bh);
|
||||
atomic_set(&ctx->stop, 0);
|
||||
spin_lock_init(&ctx->mtx);
|
||||
|
|
|
@ -264,8 +264,8 @@ void mt76x02u_init_beacon_config(struct mt76x02_dev *dev)
|
|||
};
|
||||
dev->beacon_ops = &beacon_ops;
|
||||
|
||||
hrtimer_init(&dev->pre_tbtt_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
dev->pre_tbtt_timer.function = mt76x02u_pre_tbtt_interrupt;
|
||||
hrtimer_setup(&dev->pre_tbtt_timer, mt76x02u_pre_tbtt_interrupt, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
INIT_WORK(&dev->pre_tbtt_work, mt76x02u_pre_tbtt_work);
|
||||
|
||||
mt76x02_init_beacon_config(dev);
|
||||
|
|
|
@ -842,7 +842,7 @@ int rt2800mmio_probe_hw(struct rt2x00_dev *rt2x00dev)
|
|||
/*
|
||||
* Set txstatus timer function.
|
||||
*/
|
||||
rt2x00dev->txstatus_timer.function = rt2800mmio_tx_sta_fifo_timeout;
|
||||
hrtimer_update_function(&rt2x00dev->txstatus_timer, rt2800mmio_tx_sta_fifo_timeout);
|
||||
|
||||
/*
|
||||
* Overwrite TX done handler
|
||||
|
|
|
@ -618,7 +618,7 @@ static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev)
|
|||
/*
|
||||
* Set txstatus timer function.
|
||||
*/
|
||||
rt2x00dev->txstatus_timer.function = rt2800usb_tx_sta_fifo_timeout;
|
||||
hrtimer_update_function(&rt2x00dev->txstatus_timer, rt2800usb_tx_sta_fifo_timeout);
|
||||
|
||||
/*
|
||||
* Overwrite TX done handler
|
||||
|
|
|
@ -1391,8 +1391,8 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
|
|||
mutex_init(&rt2x00dev->conf_mutex);
|
||||
INIT_LIST_HEAD(&rt2x00dev->bar_list);
|
||||
spin_lock_init(&rt2x00dev->bar_list_lock);
|
||||
hrtimer_init(&rt2x00dev->txstatus_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
hrtimer_setup(&rt2x00dev->txstatus_timer, hrtimer_dummy_timeout, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
set_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
|
||||
|
||||
|
|
|
@ -5548,10 +5548,8 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
|
|||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(data->link_data); i++) {
|
||||
hrtimer_init(&data->link_data[i].beacon_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_ABS_SOFT);
|
||||
data->link_data[i].beacon_timer.function =
|
||||
mac80211_hwsim_beacon;
|
||||
hrtimer_setup(&data->link_data[i].beacon_timer, mac80211_hwsim_beacon,
|
||||
CLOCK_MONOTONIC, HRTIMER_MODE_ABS_SOFT);
|
||||
data->link_data[i].link_id = i;
|
||||
}
|
||||
|
||||
|
|
|
@ -1381,24 +1381,20 @@ struct iosm_imem *ipc_imem_init(struct iosm_pcie *pcie, unsigned int device_id,
|
|||
/* The phase is set to power off. */
|
||||
ipc_imem->phase = IPC_P_OFF;
|
||||
|
||||
hrtimer_init(&ipc_imem->startup_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
ipc_imem->startup_timer.function = ipc_imem_startup_timer_cb;
|
||||
hrtimer_setup(&ipc_imem->startup_timer, ipc_imem_startup_timer_cb, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
hrtimer_init(&ipc_imem->tdupdate_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
ipc_imem->tdupdate_timer.function = ipc_imem_td_update_timer_cb;
|
||||
hrtimer_setup(&ipc_imem->tdupdate_timer, ipc_imem_td_update_timer_cb, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
hrtimer_init(&ipc_imem->fast_update_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
ipc_imem->fast_update_timer.function = ipc_imem_fast_update_timer_cb;
|
||||
hrtimer_setup(&ipc_imem->fast_update_timer, ipc_imem_fast_update_timer_cb, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
hrtimer_init(&ipc_imem->td_alloc_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
ipc_imem->td_alloc_timer.function = ipc_imem_td_alloc_timer_cb;
|
||||
hrtimer_setup(&ipc_imem->td_alloc_timer, ipc_imem_td_alloc_timer_cb, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
hrtimer_init(&ipc_imem->adb_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
ipc_imem->adb_timer.function = ipc_imem_adb_timer_cb;
|
||||
hrtimer_setup(&ipc_imem->adb_timer, ipc_imem_adb_timer_cb, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
if (ipc_imem_config(ipc_imem)) {
|
||||
dev_err(ipc_imem->dev, "failed to initialize the imem");
|
||||
|
|
|
@ -284,8 +284,7 @@ static struct pp_ctx *pp_create_data(struct ntb_dev *ntb)
|
|||
pp->ntb = ntb;
|
||||
atomic_set(&pp->count, 0);
|
||||
spin_lock_init(&pp->lock);
|
||||
hrtimer_init(&pp->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
pp->timer.function = pp_timer_func;
|
||||
hrtimer_setup(&pp->timer, pp_timer_func, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
|
||||
return pp;
|
||||
}
|
||||
|
|
|
@ -1273,9 +1273,8 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
|
|||
/* No overflow interrupt? Have to use a timer instead. */
|
||||
if (!ccn->irq) {
|
||||
dev_info(ccn->dev, "No access to interrupts, using timer.\n");
|
||||
hrtimer_init(&ccn->dt.hrtimer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
ccn->dt.hrtimer.function = arm_ccn_pmu_timer_handler;
|
||||
hrtimer_setup(&ccn->dt.hrtimer, arm_ccn_pmu_timer_handler, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
/* Pick one CPU which we will use to collect data from CCN... */
|
||||
|
|
|
@ -1064,8 +1064,8 @@ static int cn10k_ddr_perf_probe(struct platform_device *pdev)
|
|||
if (!name)
|
||||
return -ENOMEM;
|
||||
|
||||
hrtimer_init(&ddr_pmu->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
ddr_pmu->hrtimer.function = cn10k_ddr_pmu_timer_handler;
|
||||
hrtimer_setup(&ddr_pmu->hrtimer, cn10k_ddr_pmu_timer_handler, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
cpuhp_state_add_instance_nocalls(
|
||||
CPUHP_AP_PERF_ARM_MARVELL_CN10K_DDR_ONLINE,
|
||||
|
|
|
@ -752,9 +752,8 @@ static int tx2_uncore_pmu_add_dev(struct tx2_uncore_pmu *tx2_pmu)
|
|||
tx2_pmu->cpu = cpu;
|
||||
|
||||
if (tx2_pmu->hrtimer_callback) {
|
||||
hrtimer_init(&tx2_pmu->hrtimer,
|
||||
CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
tx2_pmu->hrtimer.function = tx2_pmu->hrtimer_callback;
|
||||
hrtimer_setup(&tx2_pmu->hrtimer, tx2_pmu->hrtimer_callback, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
ret = tx2_uncore_pmu_register(tx2_pmu);
|
||||
|
|
|
@ -162,11 +162,11 @@ static void ltc2952_poweroff_default(struct ltc2952_poweroff *data)
|
|||
data->wde_interval = 300L * NSEC_PER_MSEC;
|
||||
data->trigger_delay = ktime_set(2, 500L * NSEC_PER_MSEC);
|
||||
|
||||
hrtimer_init(&data->timer_trigger, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
data->timer_trigger.function = ltc2952_poweroff_timer_trigger;
|
||||
hrtimer_setup(&data->timer_trigger, ltc2952_poweroff_timer_trigger, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
hrtimer_init(&data->timer_wde, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
data->timer_wde.function = ltc2952_poweroff_timer_wde;
|
||||
hrtimer_setup(&data->timer_wde, ltc2952_poweroff_timer_wde, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
static int ltc2952_poweroff_init(struct platform_device *pdev)
|
||||
|
|
|
@ -1787,13 +1787,12 @@ static int ab8500_chargalg_probe(struct platform_device *pdev)
|
|||
psy_cfg.drv_data = di;
|
||||
|
||||
/* Initilialize safety timer */
|
||||
hrtimer_init(&di->safety_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
di->safety_timer.function = ab8500_chargalg_safety_timer_expired;
|
||||
hrtimer_setup(&di->safety_timer, ab8500_chargalg_safety_timer_expired, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
/* Initilialize maintenance timer */
|
||||
hrtimer_init(&di->maintenance_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
di->maintenance_timer.function =
|
||||
ab8500_chargalg_maintenance_timer_expired;
|
||||
hrtimer_setup(&di->maintenance_timer, ab8500_chargalg_maintenance_timer_expired,
|
||||
CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
|
||||
/* Init work for chargalg */
|
||||
INIT_DEFERRABLE_WORK(&di->chargalg_periodic_work,
|
||||
|
|
|
@ -339,8 +339,7 @@ struct idle_inject_device *idle_inject_register_full(struct cpumask *cpumask,
|
|||
return NULL;
|
||||
|
||||
cpumask_copy(to_cpumask(ii_dev->cpumask), cpumask);
|
||||
hrtimer_init(&ii_dev->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
ii_dev->timer.function = idle_inject_timer_fn;
|
||||
hrtimer_setup(&ii_dev->timer, idle_inject_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
ii_dev->latency_us = UINT_MAX;
|
||||
ii_dev->update = update;
|
||||
|
||||
|
|
|
@ -2064,8 +2064,7 @@ int rapl_package_add_pmu(struct rapl_package *rp)
|
|||
raw_spin_lock_init(&data->lock);
|
||||
INIT_LIST_HEAD(&data->active_list);
|
||||
data->timer_interval = ms_to_ktime(rapl_pmu.timer_ms);
|
||||
hrtimer_init(&data->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
data->hrtimer.function = rapl_hrtimer_handle;
|
||||
hrtimer_setup(&data->hrtimer, rapl_hrtimer_handle, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
|
||||
return rapl_pmu_update(rp);
|
||||
}
|
||||
|
|
|
@ -208,8 +208,7 @@ static void parport_attach(struct parport *port)
|
|||
|
||||
calibrate_port(&device);
|
||||
|
||||
hrtimer_init(&device.timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
|
||||
device.timer.function = hrtimer_event;
|
||||
hrtimer_setup(&device.timer, hrtimer_event, CLOCK_REALTIME, HRTIMER_MODE_ABS);
|
||||
hrtimer_start(&device.timer, next_intr_time(&device), HRTIMER_MODE_ABS);
|
||||
|
||||
return;
|
||||
|
|
|
@ -240,8 +240,7 @@ static struct rtc_device *rtc_allocate_device(void)
|
|||
/* Init uie timer */
|
||||
rtc_timer_init(&rtc->uie_rtctimer, rtc_uie_update_irq, rtc);
|
||||
/* Init pie timer */
|
||||
hrtimer_init(&rtc->pie_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
rtc->pie_timer.function = rtc_pie_update_irq;
|
||||
hrtimer_setup(&rtc->pie_timer, rtc_pie_update_irq, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
rtc->pie_enabled = 0;
|
||||
|
||||
set_bit(RTC_FEATURE_ALARM, rtc->features);
|
||||
|
|
|
@ -2326,8 +2326,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);
|
||||
|
||||
|
|
|
@ -2922,9 +2922,7 @@ static long ibmvscsis_alloctimer(struct scsi_info *vscsi)
|
|||
struct timer_cb *p_timer;
|
||||
|
||||
p_timer = &vscsi->rsp_q_timer;
|
||||
hrtimer_init(&p_timer->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
|
||||
p_timer->timer.function = ibmvscsis_service_wait_q;
|
||||
hrtimer_setup(&p_timer->timer, ibmvscsis_service_wait_q, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
p_timer->started = false;
|
||||
p_timer->timer_pops = 0;
|
||||
|
||||
|
|
|
@ -7952,11 +7952,10 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
|
|||
timer_setup(&phba->fcf.redisc_wait, lpfc_sli4_fcf_redisc_wait_tmo, 0);
|
||||
|
||||
/* CMF congestion timer */
|
||||
hrtimer_init(&phba->cmf_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
phba->cmf_timer.function = lpfc_cmf_timer;
|
||||
hrtimer_setup(&phba->cmf_timer, lpfc_cmf_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
/* CMF 1 minute stats collection timer */
|
||||
hrtimer_init(&phba->cmf_stats_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
phba->cmf_stats_timer.function = lpfc_cmf_stats_timer;
|
||||
hrtimer_setup(&phba->cmf_stats_timer, lpfc_cmf_stats_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
/*
|
||||
* Control structure for handling external multi-buffer mailbox
|
||||
|
|
|
@ -6384,8 +6384,8 @@ static struct sdebug_queued_cmd *sdebug_alloc_queued_cmd(struct scsi_cmnd *scmd)
|
|||
|
||||
sd_dp = &sqcp->sd_dp;
|
||||
|
||||
hrtimer_init(&sd_dp->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED);
|
||||
sd_dp->hrt.function = sdebug_q_cmd_hrt_complete;
|
||||
hrtimer_setup(&sd_dp->hrt, sdebug_q_cmd_hrt_complete, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL_PINNED);
|
||||
INIT_WORK(&sd_dp->ew.work, sdebug_q_cmd_wq_complete);
|
||||
|
||||
sqcp->scmd = scmd;
|
||||
|
|
|
@ -1056,8 +1056,7 @@ static int brcmuart_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
/* setup HR timer */
|
||||
hrtimer_init(&priv->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
priv->hrt.function = brcmuart_hrtimer_func;
|
||||
hrtimer_setup(&priv->hrt, brcmuart_hrtimer_func, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
|
||||
up.port.shutdown = brcmuart_shutdown;
|
||||
up.port.startup = brcmuart_startup;
|
||||
|
|
|
@ -566,12 +566,10 @@ static int serial8250_em485_init(struct uart_8250_port *p)
|
|||
if (!p->em485)
|
||||
return -ENOMEM;
|
||||
|
||||
hrtimer_init(&p->em485->stop_tx_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
hrtimer_init(&p->em485->start_tx_timer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
p->em485->stop_tx_timer.function = &serial8250_em485_handle_stop_tx;
|
||||
p->em485->start_tx_timer.function = &serial8250_em485_handle_start_tx;
|
||||
hrtimer_setup(&p->em485->stop_tx_timer, &serial8250_em485_handle_stop_tx, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
hrtimer_setup(&p->em485->start_tx_timer, &serial8250_em485_handle_start_tx, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
p->em485->port = p;
|
||||
p->em485->active_timer = NULL;
|
||||
p->em485->tx_stopped = true;
|
||||
|
|
|
@ -2867,11 +2867,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
|
|||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
hrtimer_init(&uap->trigger_start_tx, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
hrtimer_init(&uap->trigger_stop_tx, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
uap->trigger_start_tx.function = pl011_trigger_start_tx;
|
||||
uap->trigger_stop_tx.function = pl011_trigger_stop_tx;
|
||||
hrtimer_setup(&uap->trigger_start_tx, pl011_trigger_start_tx, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
hrtimer_setup(&uap->trigger_stop_tx, pl011_trigger_stop_tx, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
ret = pl011_setup_port(&dev->dev, uap, &dev->res, portnr);
|
||||
if (ret)
|
||||
|
|
|
@ -2582,10 +2582,10 @@ static int imx_uart_probe(struct platform_device *pdev)
|
|||
imx_uart_writel(sport, ucr3, UCR3);
|
||||
}
|
||||
|
||||
hrtimer_init(&sport->trigger_start_tx, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
hrtimer_init(&sport->trigger_stop_tx, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
sport->trigger_start_tx.function = imx_trigger_start_tx;
|
||||
sport->trigger_stop_tx.function = imx_trigger_stop_tx;
|
||||
hrtimer_setup(&sport->trigger_start_tx, imx_trigger_start_tx, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
hrtimer_setup(&sport->trigger_stop_tx, imx_trigger_stop_tx, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
/*
|
||||
* Allocate the IRQ(s) i.MX1 has three interrupts whereas later
|
||||
|
|
|
@ -1702,8 +1702,7 @@ static void sci_request_dma(struct uart_port *port)
|
|||
dma += s->buf_len_rx;
|
||||
}
|
||||
|
||||
hrtimer_init(&s->rx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
s->rx_timer.function = sci_dma_rx_timer_fn;
|
||||
hrtimer_setup(&s->rx_timer, sci_dma_rx_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
|
||||
s->chan_rx_saved = s->chan_rx = chan;
|
||||
|
||||
|
|
|
@ -454,7 +454,7 @@ static void cdns_uart_handle_tx(void *dev_id)
|
|||
|
||||
if (cdns_uart->port->rs485.flags & SER_RS485_ENABLED &&
|
||||
(kfifo_is_empty(&tport->xmit_fifo) || uart_tx_stopped(port))) {
|
||||
cdns_uart->tx_timer.function = &cdns_rs485_rx_callback;
|
||||
hrtimer_update_function(&cdns_uart->tx_timer, cdns_rs485_rx_callback);
|
||||
hrtimer_start(&cdns_uart->tx_timer,
|
||||
ns_to_ktime(cdns_calc_after_tx_delay(cdns_uart)), HRTIMER_MODE_REL);
|
||||
}
|
||||
|
@ -734,7 +734,7 @@ static void cdns_uart_start_tx(struct uart_port *port)
|
|||
|
||||
if (cdns_uart->port->rs485.flags & SER_RS485_ENABLED) {
|
||||
if (!cdns_uart->rs485_tx_started) {
|
||||
cdns_uart->tx_timer.function = &cdns_rs485_tx_callback;
|
||||
hrtimer_update_function(&cdns_uart->tx_timer, cdns_rs485_tx_callback);
|
||||
cdns_rs485_tx_setup(cdns_uart);
|
||||
return hrtimer_start(&cdns_uart->tx_timer,
|
||||
ms_to_ktime(port->rs485.delay_rts_before_send),
|
||||
|
@ -1626,8 +1626,8 @@ static int cdns_rs485_config(struct uart_port *port, struct ktermios *termios,
|
|||
writel(val, port->membase + CDNS_UART_MODEMCR);
|
||||
|
||||
/* Timer setup */
|
||||
hrtimer_init(&cdns_uart->tx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
cdns_uart->tx_timer.function = &cdns_rs485_tx_callback;
|
||||
hrtimer_setup(&cdns_uart->tx_timer, &cdns_rs485_tx_callback, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
|
||||
/* Disable transmitter and make Rx setup*/
|
||||
cdns_uart_stop_tx(port);
|
||||
|
|
|
@ -424,8 +424,7 @@ static enum hrtimer_restart ci_otg_hrtimer_func(struct hrtimer *t)
|
|||
/* Initialize timers */
|
||||
static int ci_otg_init_timers(struct ci_hdrc *ci)
|
||||
{
|
||||
hrtimer_init(&ci->otg_fsm_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
ci->otg_fsm_hrtimer.function = ci_otg_hrtimer_func;
|
||||
hrtimer_setup(&ci->otg_fsm_hrtimer, ci_otg_hrtimer_func, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1459,8 +1459,7 @@ static void dwc2_qh_init(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,
|
|||
/* Initialize QH */
|
||||
qh->hsotg = hsotg;
|
||||
timer_setup(&qh->unreserve_timer, dwc2_unreserve_timer_fn, 0);
|
||||
hrtimer_init(&qh->wait_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
qh->wait_timer.function = &dwc2_wait_timer_fn;
|
||||
hrtimer_setup(&qh->wait_timer, &dwc2_wait_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
qh->ep_type = ep_type;
|
||||
qh->ep_is_in = ep_is_in;
|
||||
|
||||
|
|
|
@ -4901,8 +4901,7 @@ static int hcd_fotg210_init(struct usb_hcd *hcd)
|
|||
*/
|
||||
fotg210->need_io_watchdog = 1;
|
||||
|
||||
hrtimer_init(&fotg210->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
fotg210->hrtimer.function = fotg210_hrtimer_func;
|
||||
hrtimer_setup(&fotg210->hrtimer, fotg210_hrtimer_func, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
fotg210->next_hrtimer_event = FOTG210_HRTIMER_NO_EVENT;
|
||||
|
||||
hcc_params = fotg210_readl(fotg210, &fotg210->caps->hcc_params);
|
||||
|
|
|
@ -1559,8 +1559,7 @@ static int ncm_bind(struct usb_configuration *c, struct usb_function *f)
|
|||
ncm->port.open = ncm_open;
|
||||
ncm->port.close = ncm_close;
|
||||
|
||||
hrtimer_init(&ncm->task_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT);
|
||||
ncm->task_timer.function = ncm_tx_timeout;
|
||||
hrtimer_setup(&ncm->task_timer, ncm_tx_timeout, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT);
|
||||
|
||||
DBG(cdev, "CDC Network: IN/%s OUT/%s NOTIFY/%s\n",
|
||||
ncm->port.in_ep->name, ncm->port.out_ep->name,
|
||||
|
|
|
@ -2479,8 +2479,7 @@ static DEVICE_ATTR_RO(urbs);
|
|||
|
||||
static int dummy_start_ss(struct dummy_hcd *dum_hcd)
|
||||
{
|
||||
hrtimer_init(&dum_hcd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT);
|
||||
dum_hcd->timer.function = dummy_timer;
|
||||
hrtimer_setup(&dum_hcd->timer, dummy_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT);
|
||||
dum_hcd->rh_state = DUMMY_RH_RUNNING;
|
||||
dum_hcd->stream_en_ep = 0;
|
||||
INIT_LIST_HEAD(&dum_hcd->urbp_list);
|
||||
|
@ -2509,8 +2508,7 @@ static int dummy_start(struct usb_hcd *hcd)
|
|||
return dummy_start_ss(dum_hcd);
|
||||
|
||||
spin_lock_init(&dum_hcd->dum->lock);
|
||||
hrtimer_init(&dum_hcd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT);
|
||||
dum_hcd->timer.function = dummy_timer;
|
||||
hrtimer_setup(&dum_hcd->timer, dummy_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT);
|
||||
dum_hcd->rh_state = DUMMY_RH_RUNNING;
|
||||
|
||||
INIT_LIST_HEAD(&dum_hcd->urbp_list);
|
||||
|
|
|
@ -466,8 +466,7 @@ static int ehci_init(struct usb_hcd *hcd)
|
|||
*/
|
||||
ehci->need_io_watchdog = 1;
|
||||
|
||||
hrtimer_init(&ehci->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
ehci->hrtimer.function = ehci_hrtimer_func;
|
||||
hrtimer_setup(&ehci->hrtimer, ehci_hrtimer_func, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
ehci->next_hrtimer_event = EHCI_HRTIMER_NO_EVENT;
|
||||
|
||||
hcc_params = ehci_readl(ehci, &ehci->caps->hcc_params);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue