diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 12 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 645183ba..1caecf3d 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -627,8 +627,8 @@ static void gk20a_channel_dump_ref_actions(struct channel_gk20a *ch) | |||
627 | { | 627 | { |
628 | #if GK20A_CHANNEL_REFCOUNT_TRACKING | 628 | #if GK20A_CHANNEL_REFCOUNT_TRACKING |
629 | size_t i, get; | 629 | size_t i, get; |
630 | unsigned long now = jiffies; | 630 | s64 now = nvgpu_current_time_ms(); |
631 | unsigned long prev_jiffies = 0; | 631 | s64 prev = 0; |
632 | struct device *dev = dev_from_gk20a(ch->g); | 632 | struct device *dev = dev_from_gk20a(ch->g); |
633 | 633 | ||
634 | nvgpu_spinlock_acquire(&ch->ref_actions_lock); | 634 | nvgpu_spinlock_acquire(&ch->ref_actions_lock); |
@@ -651,11 +651,11 @@ static void gk20a_channel_dump_ref_actions(struct channel_gk20a *ch) | |||
651 | act->type == channel_gk20a_ref_action_get | 651 | act->type == channel_gk20a_ref_action_get |
652 | ? "GET" : "PUT", | 652 | ? "GET" : "PUT", |
653 | GK20A_CHANNEL_REFCOUNT_TRACKING - 1 - i, | 653 | GK20A_CHANNEL_REFCOUNT_TRACKING - 1 - i, |
654 | jiffies_to_msecs(now - act->jiffies), | 654 | now - act->timestamp_ms, |
655 | jiffies_to_msecs(act->jiffies - prev_jiffies)); | 655 | act->timestamp_ms - prev); |
656 | 656 | ||
657 | print_stack_trace(&act->trace, 0); | 657 | print_stack_trace(&act->trace, 0); |
658 | prev_jiffies = act->jiffies; | 658 | prev = act->timestamp_ms; |
659 | } | 659 | } |
660 | 660 | ||
661 | get = (get + 1) % GK20A_CHANNEL_REFCOUNT_TRACKING; | 661 | get = (get + 1) % GK20A_CHANNEL_REFCOUNT_TRACKING; |
@@ -680,7 +680,7 @@ static void gk20a_channel_save_ref_source(struct channel_gk20a *ch, | |||
680 | act->trace.skip = 3; /* onwards from the caller of this */ | 680 | act->trace.skip = 3; /* onwards from the caller of this */ |
681 | act->trace.entries = act->trace_entries; | 681 | act->trace.entries = act->trace_entries; |
682 | save_stack_trace(&act->trace); | 682 | save_stack_trace(&act->trace); |
683 | act->jiffies = jiffies; | 683 | act->timestamp_ms = nvgpu_current_time_ms(); |
684 | ch->ref_actions_put = (ch->ref_actions_put + 1) % | 684 | ch->ref_actions_put = (ch->ref_actions_put + 1) % |
685 | GK20A_CHANNEL_REFCOUNT_TRACKING; | 685 | GK20A_CHANNEL_REFCOUNT_TRACKING; |
686 | 686 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index ca042883..8cf00e7c 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |||
@@ -152,7 +152,7 @@ enum channel_gk20a_ref_action_type { | |||
152 | 152 | ||
153 | struct channel_gk20a_ref_action { | 153 | struct channel_gk20a_ref_action { |
154 | enum channel_gk20a_ref_action_type type; | 154 | enum channel_gk20a_ref_action_type type; |
155 | unsigned long jiffies; | 155 | s64 timestamp_ms; |
156 | /* | 156 | /* |
157 | * Many of these traces will be similar. Simpler to just capture | 157 | * Many of these traces will be similar. Simpler to just capture |
158 | * duplicates than to have a separate database for the entries. | 158 | * duplicates than to have a separate database for the entries. |