diff options
Diffstat (limited to 'arch/x86/include/asm/processor.h')
-rw-r--r-- | arch/x86/include/asm/processor.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 24cf5aefb704..4f4a3d98c170 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -942,35 +942,6 @@ extern int set_tsc_mode(unsigned int val); | |||
942 | 942 | ||
943 | extern u16 amd_get_nb_id(int cpu); | 943 | extern u16 amd_get_nb_id(int cpu); |
944 | 944 | ||
945 | struct aperfmperf { | ||
946 | u64 aperf, mperf; | ||
947 | }; | ||
948 | |||
949 | static inline void get_aperfmperf(struct aperfmperf *am) | ||
950 | { | ||
951 | WARN_ON_ONCE(!boot_cpu_has(X86_FEATURE_APERFMPERF)); | ||
952 | |||
953 | rdmsrl(MSR_IA32_APERF, am->aperf); | ||
954 | rdmsrl(MSR_IA32_MPERF, am->mperf); | ||
955 | } | ||
956 | |||
957 | #define APERFMPERF_SHIFT 10 | ||
958 | |||
959 | static inline | ||
960 | unsigned long calc_aperfmperf_ratio(struct aperfmperf *old, | ||
961 | struct aperfmperf *new) | ||
962 | { | ||
963 | u64 aperf = new->aperf - old->aperf; | ||
964 | u64 mperf = new->mperf - old->mperf; | ||
965 | unsigned long ratio = aperf; | ||
966 | |||
967 | mperf >>= APERFMPERF_SHIFT; | ||
968 | if (mperf) | ||
969 | ratio = div64_u64(aperf, mperf); | ||
970 | |||
971 | return ratio; | ||
972 | } | ||
973 | |||
974 | extern unsigned long arch_align_stack(unsigned long sp); | 945 | extern unsigned long arch_align_stack(unsigned long sp); |
975 | extern void free_init_pages(char *what, unsigned long begin, unsigned long end); | 946 | extern void free_init_pages(char *what, unsigned long begin, unsigned long end); |
976 | 947 | ||