File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -190,7 +190,11 @@ static void cyclic_tasklet_func(unsigned long arg)
190190 break ;
191191
192192 ptr = & cp -> c_htp ;
193- kt .tv64 = cp -> c_time .cyt_interval ;
193+ #if (LINUX_VERSION_CODE < KERNEL_VERSION (4 ,10 ,0 ))
194+ kt .tv64 = cp -> c_time .cyt_interval ;
195+ #else
196+ kt = cp -> c_time .cyt_interval ;
197+ #endif
194198 /***********************************************/
195199 /* Invoke the callback. */
196200 /***********************************************/
@@ -326,11 +330,15 @@ cyclic_add(cyc_handler_t *hdrl, cyc_time_t *t)
326330 }
327331
328332 cnt_timer_add ++ ;
329- kt .tv64 = t -> cyt_interval ;
333+ #if (LINUX_VERSION_CODE < KERNEL_VERSION (4 ,10 ,0 ))
334+ kt .tv64 = t -> cyt_interval ;
335+ #else
336+ kt = t -> cyt_interval ;
337+ #endif
330338 cp -> c_hdlr = * hdrl ;
331339 cp -> c_time = * t ;
332- cp -> c_sec = kt . tv64 / (1000 * 1000 * 1000 );
333- cp -> c_nsec = kt . tv64 % (1000 * 1000 * 1000 );
340+ cp -> c_sec = ktime_to_ns ( kt ) / (1000 * 1000 * 1000 );
341+ cp -> c_nsec = ktime_to_ns ( kt ) % (1000 * 1000 * 1000 );
334342 cp -> c_state = TMR_ALIVE ;
335343
336344 fn_hrtimer_init (& cp -> c_htp , CLOCK_MONOTONIC , HRTIMER_MODE_REL );
@@ -471,4 +479,3 @@ cyclic_remove(cyclic_id_t id)
471479 }
472480}
473481# endif
474-
Original file line number Diff line number Diff line change @@ -762,7 +762,7 @@ dtrace_linux_init(void)
762762 }
763763# if defined(__arm__ )
764764 ktime_get_ptr = (ktime_t (* )(void )) get_proc_addr ("ktime_get" );
765- # define rdtscll (t ) t = ktime_get_ptr().tv64
765+ # define rdtscll (t ) t = ktime_to_ns( ktime_get_ptr())
766766 # define __flush_tlb_all () local_flush_tlb_all()
767767 # define _PAGE_NX 0
768768 # define _PAGE_RW 0
@@ -3246,4 +3246,3 @@ static void __exit dtracedrv_exit(void)
32463246}
32473247module_init (dtracedrv_init );
32483248module_exit (dtracedrv_exit );
3249-
You can’t perform that action at this time.
0 commit comments