vireshk

Untitled

Jun 23rd, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. diff --git a/drivers/soc/qcom/watchdog_v2.c b/drivers/soc/qcom/watchdog_v2.c
  2. index af2e5dd2dde7..114031b6949b 100644
  3. --- a/drivers/soc/qcom/watchdog_v2.c
  4. +++ b/drivers/soc/qcom/watchdog_v2.c
  5. @@ -52,6 +52,7 @@ static struct workqueue_struct *wdog_wq;
  6. static struct msm_watchdog_data *wdog_data;
  7.  
  8. static int cpu_idle_pc_state[NR_CPUS];
  9. +struct delayed_work *mdogwork_struct;
  10.  
  11. struct msm_watchdog_data {
  12. unsigned int __iomem phys_base;
  13. @@ -336,7 +337,7 @@ static void pet_watchdog_work(struct work_struct *work)
  14.  
  15. pet_watchdog(wdog_dd);
  16.  
  17. - pr_info("%s: %d: %llu, %llu, %llu, %llu\n", __func__, raw_smp_processor_id(),
  18. + pr_info("%s: %lu, %llu, %llu\n", __func__, jiffies,
  19. wdog_dd->prev_last_pet, wdog_dd->last_pet_begin);
  20.  
  21. @@ -723,6 +724,7 @@ static int msm_watchdog_probe(struct platform_device *pdev)
  22. cpumask_clear(&wdog_dd->alive_mask);
  23. INIT_WORK(&wdog_dd->init_dogwork_struct, init_watchdog_work);
  24. INIT_DELAYED_WORK(&wdog_dd->dogwork_struct, pet_watchdog_work);
  25. + mdogwork_struct = &wdog_dd->dogwork_struct;
  26. queue_work(wdog_wq, &wdog_dd->init_dogwork_struct);
  27. return 0;
  28. err:
  29. diff --git a/kernel/workqueue.c b/kernel/workqueue.c
  30. index 47d26cbbe347..1feb422fb2b8 100644
  31. --- a/kernel/workqueue.c
  32. +++ b/kernel/workqueue.c
  33. @@ -1417,10 +1417,14 @@ bool queue_work_on(int cpu, struct workqueue_struct *wq,
  34. }
  35. EXPORT_SYMBOL(queue_work_on);
  36.  
  37. +extern struct delayed_work *mdogwork_struct;
  38. void delayed_work_timer_fn(unsigned long __data)
  39. {
  40. struct delayed_work *dwork = (struct delayed_work *)__data;
  41.  
  42. + if (dwork == mdogwork_struct)
  43. + pr_info("%s: %llu\n", __func__, sched_clock());
  44. +
  45. /* should have been called from irqsafe timer with irq already off */
  46. __queue_work(dwork->cpu, dwork->wq, &dwork->work);
  47. }
  48. @@ -1454,6 +1458,9 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,
  49. dwork->cpu = cpu;
  50. timer->expires = jiffies + delay;
  51.  
  52. + if (dwork == mdogwork_struct)
  53. + pr_info("%s: %lu, %lu, %lu\n", __func__, delay, jiffies, timer->expires);
  54. +
  55. if (unlikely(cpu != WORK_CPU_UNBOUND))
  56. add_timer_on(timer, cpu);
  57. else
Add Comment
Please, Sign In to add comment