Lines Matching refs:scd
111 notrace static void __scd_stamp(struct sched_clock_data *scd) in __scd_stamp() argument
113 scd->tick_gtod = ktime_get_ns(); in __scd_stamp()
114 scd->tick_raw = sched_clock(); in __scd_stamp()
119 struct sched_clock_data *scd; in __set_sched_clock_stable() local
126 scd = this_scd(); in __set_sched_clock_stable()
130 __sched_clock_offset = (scd->tick_gtod + __gtod_offset) - (scd->tick_raw); in __set_sched_clock_stable()
134 scd->tick_gtod, __gtod_offset, in __set_sched_clock_stable()
135 scd->tick_raw, __sched_clock_offset); in __set_sched_clock_stable()
154 struct sched_clock_data *scd; in __sched_clock_work() local
159 scd = this_scd(); in __sched_clock_work()
160 __scd_stamp(scd); in __sched_clock_work()
161 scd->clock = scd->tick_gtod + __gtod_offset; in __sched_clock_work()
166 per_cpu(sched_clock_data, cpu) = *scd; in __sched_clock_work()
170 scd->tick_gtod, __gtod_offset, in __sched_clock_work()
171 scd->tick_raw, __sched_clock_offset); in __sched_clock_work()
199 struct sched_clock_data *scd = this_scd(); in __sched_clock_gtod_offset() local
201 __scd_stamp(scd); in __sched_clock_gtod_offset()
202 __gtod_offset = (scd->tick_raw + __sched_clock_offset) - scd->tick_gtod; in __sched_clock_gtod_offset()
263 notrace static u64 sched_clock_local(struct sched_clock_data *scd) in sched_clock_local() argument
270 delta = now - scd->tick_raw; in sched_clock_local()
274 old_clock = scd->clock; in sched_clock_local()
282 gtod = scd->tick_gtod + __gtod_offset; in sched_clock_local()
290 if (!try_cmpxchg64(&scd->clock, &old_clock, clock)) in sched_clock_local()
296 notrace static u64 sched_clock_remote(struct sched_clock_data *scd) in sched_clock_remote() argument
321 remote_clock = cmpxchg64(&scd->clock, 0, 0); in sched_clock_remote()
330 remote_clock = scd->clock; in sched_clock_remote()
340 ptr = &scd->clock; in sched_clock_remote()
365 struct sched_clock_data *scd; in sched_clock_cpu() local
375 scd = cpu_sdc(cpu); in sched_clock_cpu()
378 clock = sched_clock_remote(scd); in sched_clock_cpu()
380 clock = sched_clock_local(scd); in sched_clock_cpu()
389 struct sched_clock_data *scd; in sched_clock_tick() local
399 scd = this_scd(); in sched_clock_tick()
400 __scd_stamp(scd); in sched_clock_tick()
401 sched_clock_local(scd); in sched_clock_tick()