cregit-Linux how code gets into the kernel

Release 4.9 arch/x86/include/asm/tsc.h

/*
 * x86 TSC related functions
 */
#ifndef _ASM_X86_TSC_H

#define _ASM_X86_TSC_H

#include <asm/processor.h>


#define NS_SCALE	10 
/* 2^10, carefully chosen */

#define US_SCALE	32 
/* 2^32, arbitralrily chosen */

/*
 * Standard way to access the cycle counter.
 */

typedef unsigned long long cycles_t;

extern unsigned int cpu_khz;
extern unsigned int tsc_khz;

extern void disable_TSC(void);


static inline cycles_t get_cycles(void) { #ifndef CONFIG_X86_TSC if (!boot_cpu_has(X86_FEATURE_TSC)) return 0; #endif return rdtsc(); }

Contributors

PersonTokensPropCommitsCommitProp
andi kleenandi kleen1034.48%228.57%
andres salomonandres salomon827.59%114.29%
glauber de oliveira costaglauber de oliveira costa517.24%114.29%
borislav petkovborislav petkov413.79%114.29%
ingo molnaringo molnar13.45%114.29%
andy lutomirskiandy lutomirski13.45%114.29%
Total29100.00%7100.00%

extern struct system_counterval_t convert_art_to_tsc(cycle_t art); extern void tsc_init(void); extern void mark_tsc_unstable(char *reason); extern int unsynchronized_tsc(void); extern int check_tsc_unstable(void); extern unsigned long native_calibrate_cpu(void); extern unsigned long native_calibrate_tsc(void); extern unsigned long long native_sched_clock_from_tsc(u64 tsc); extern int tsc_clocksource_reliable; /* * Boot-time check whether the TSCs are synchronized across * all CPUs/cores: */ extern void check_tsc_sync_source(int cpu); extern void check_tsc_sync_target(void); extern int notsc_setup(char *); extern void tsc_save_sched_clock_state(void); extern void tsc_restore_sched_clock_state(void); unsigned long cpu_khz_from_msr(void); #endif /* _ASM_X86_TSC_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
andres salomonandres salomon6835.79%14.00%
thomas gleixnerthomas gleixner3015.79%520.00%
andi kleenandi kleen2010.53%312.00%
suresh siddhasuresh siddha168.42%28.00%
glauber de oliveira costaglauber de oliveira costa126.32%28.00%
christopher s. hallchristopher s. hall94.74%14.00%
len brownlen brown94.74%28.00%
rusty russellrusty russell63.16%14.00%
john stultzjohn stultz52.63%28.00%
borislav petkovborislav petkov42.11%14.00%
bin gaobin gao42.11%14.00%
h. peter anvinh. peter anvin31.58%14.00%
marcelo tosattimarcelo tosatti21.05%14.00%
ingo molnaringo molnar10.53%14.00%
andy lutomirskiandy lutomirski10.53%14.00%
Total190100.00%25100.00%