storage: create timer before being started.

timer was getting started evein before being created
leading to below crash. So create timer before getting
started.

[0.483364] Internal error: Oops - BUG: 0 [#1] PREEMPT_RT SMP
Modules linked in: tegra_vblk(O) tegra_hv_vblk_oops(O) tegra_hv(O) ivc_ext(O)
CPU: 10 PID: 9 Comm: kworker/u24:0 Tainted: G O 5.15.98-rt-tegra #1
[0.531518] Hardware name: p3710-0010 (DT)
[0.532301] Workqueue: vblk_req_wq1 0xffff800001271c90
[0.533268] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[0.534552] pc : mod_timer+0x2d8/0x340
[0.535250] lr : mod_timer+0x34/0x340
[0.535936] sp : ffff80000aa13c90
[0.536539] x29: ffff80000aa13c90 x28: ffff000083c18080 x27: ffff000083c182f8
[0.537876] x26: ffff00008012de74 x25: ffff000083c182d8 x24: ffff000083c0f0b0
[0.539253] x23: 00000000fffef8b4 x22: ffff00008028e740 x21: ffff000083c18280
[0.540547] x20: 0000000000000000 x19: ffff000083c183d8 x18: 0000000000000001
[0.541860] x17: 00000000000002b5 x16: ffff800001271c90 x15: 0000000000000003
[0.543184] x14: 0000000000000000 x13: 0000000000000020 x12: 0101010101010101
[0.544549] x11: 7f7f7f7f7f7f7f7f x10: fefefeff3070765e x9 : ffff00008012de74
[0.545885] x8 : fefefefefefefeff x7 : 0000000000000278 x6 : ffff00008012de74
[0.547213] x5 : 7165725f6b6c6276 x4 : 0000000000001000 x3 : ffff000083c18080
[0.548554] x2 : 0000000000000000 x1 : 00000000fffef8b4 x0 : 0000000000000000
[0.549938] Call trace:
[0.550406]  mod_timer+0x2d8/0x340
[0.551070]  0xffff800001271e0c
[0.551672]  process_one_work+0x1f4/0x520
[0.552406]  worker_thread+0x58/0x450
[0.553071]  kthread+0x198/0x1c0
[0.553685]  ret_from_fork+0x10/0x20

JIRA ESLC-7516

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I9160c0bc0907880cb128e4245383adf3a4ddb021
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931256
Tested-by: Advaya Andhare <aandhare@nvidia.com>
Reviewed-by: Kasinadha Dendukuri <kdendukuri@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Manish Bhardwaj
2023-07-05 13:36:32 +05:30
committed by mobile promotions
parent 8e50cfd8ed
commit 309e6943e3

View File

@@ -1427,6 +1427,9 @@ static int tegra_hv_vblk_probe(struct platform_device *pdev)
/* creating and initializing the an internal request list */
INIT_LIST_HEAD(&vblkdev->req_list);
/* Create timers for each request going to storage server*/
tegra_create_timers(vblkdev);
if (devm_request_irq(vblkdev->device, vblkdev->ivck->irq,
ivc_irq_handler, 0, "vblk", vblkdev)) {
dev_err(dev, "Failed to request irq %d\n", vblkdev->ivck->irq);
@@ -1444,9 +1447,6 @@ static int tegra_hv_vblk_probe(struct platform_device *pdev)
}
mutex_unlock(&vblkdev->ivc_lock);
/* Create timers for each request going to storage server*/
tegra_create_timers(vblkdev);
return 0;
free_wq: