search for: write_rdtscp_aux

Displaying 9 results from an estimated 9 matches for "write_rdtscp_aux".

2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 14/17] paravirt_ops - vsyscall
...c" (p)); } else { /* Load per CPU data from GDT */ asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG)); @@ -256,7 +257,11 @@ static void __cpuinit vsyscall_set_cpu(i node = cpu_to_node[cpu]; #endif if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) - write_rdtscp_aux((node << 12) | cpu); + /* This is write_rdtscp_aux. It cannot be called directly + * due to the paravirt indirection */ + asm("wrmsr" : /* no output */ + : "d"(0), + "a" ((node << 12) | cpu), "c" (0xc0000103)); /* Store cpu nu...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 14/17] paravirt_ops - vsyscall
...c" (p)); } else { /* Load per CPU data from GDT */ asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG)); @@ -256,7 +257,11 @@ static void __cpuinit vsyscall_set_cpu(i node = cpu_to_node[cpu]; #endif if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) - write_rdtscp_aux((node << 12) | cpu); + /* This is write_rdtscp_aux. It cannot be called directly + * due to the paravirt indirection */ + asm("wrmsr" : /* no output */ + : "d"(0), + "a" ((node << 12) | cpu), "c" (0xc0000103)); /* Store cpu nu...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 02/17] paravirt_ops - msr
...9" : "=a" (__a), "=d" (__d), "=c" (aux)); \ (val) = (__d << 32) | __a; \ } while (0) +#define checking_wrmsrl(msr,val) native_write_msr_safe(msr, val) + +#endif /* CONFIG_PARAVIRT */ + #define write_tsc(val1,val2) wrmsr(0x10, val1, val2) #define write_rdtscp_aux(val) wrmsr(0xc0000103, val, 0) -#define rdpmc(counter,low,high) \ - __asm__ __volatile__("rdpmc" \ - : "=a" (low), "=d" (high) \ - : "c" (counter)) - -static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, +static inline void cpu...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 02/17] paravirt_ops - msr
...9" : "=a" (__a), "=d" (__d), "=c" (aux)); \ (val) = (__d << 32) | __a; \ } while (0) +#define checking_wrmsrl(msr,val) native_write_msr_safe(msr, val) + +#endif /* CONFIG_PARAVIRT */ + #define write_tsc(val1,val2) wrmsr(0x10, val1, val2) #define write_rdtscp_aux(val) wrmsr(0xc0000103, val, 0) -#define rdpmc(counter,low,high) \ - __asm__ __volatile__("rdpmc" \ - : "=a" (low), "=d" (high) \ - : "c" (counter)) - -static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, +static inline void cpu...
2019 Mar 30
1
[PATCH 2/5] x86: Convert some slow-path static_cpu_has() callers to boot_cpu_has()
...el/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1668,7 +1668,7 @@ static void setup_getcpu(int cpu) unsigned long cpudata = vdso_encode_cpunode(cpu, early_cpu_to_node(cpu)); struct desc_struct d = { }; - if (static_cpu_has(X86_FEATURE_RDTSCP)) + if (boot_cpu_has(X86_FEATURE_RDTSCP)) write_rdtscp_aux(cpudata); /* Store CPU and node number in limit. */ diff --git a/arch/x86/kernel/cpu/mce/inject.c b/arch/x86/kernel/cpu/mce/inject.c index 3f82afd0f46f..a6026170af92 100644 --- a/arch/x86/kernel/cpu/mce/inject.c +++ b/arch/x86/kernel/cpu/mce/inject.c @@ -526,7 +526,7 @@ static void do_inject(vo...
2007 Apr 18
0
[PATCH] paravirt_ops x86_64 , take 2
...c" (p)); } else { /* Load per CPU data from GDT */ asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG)); @@ -257,7 +258,11 @@ static void __cpuinit vsyscall_set_cpu(i node = cpu_to_node[cpu]; #endif if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) - write_rdtscp_aux((node << 12) | cpu); + /* This is write_rdtscp_aux. It cannot be called directly + * due to the paravirt indirection */ + asm("wrmsr" : /* no output */ + : "d"(0), + "a" ((node << 12) | cpu), "c" (0xc0000103)); /* Store cpu nu...
2007 Apr 18
0
[PATCH] paravirt_ops x86_64 , take 2
...c" (p)); } else { /* Load per CPU data from GDT */ asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG)); @@ -257,7 +258,11 @@ static void __cpuinit vsyscall_set_cpu(i node = cpu_to_node[cpu]; #endif if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) - write_rdtscp_aux((node << 12) | cpu); + /* This is write_rdtscp_aux. It cannot be called directly + * due to the paravirt indirection */ + asm("wrmsr" : /* no output */ + : "d"(0), + "a" ((node << 12) | cpu), "c" (0xc0000103)); /* Store cpu nu...
2007 Apr 18
2
[PATCH] x86_64 paravirt_ops port
...te 0x0f,0x01,0xf9" : "=a" (__a), "=d" (__d), "=c" (aux)); \ (val) = (__d << 32) | __a; \ } while (0) +#define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32)) #define write_tsc(val1,val2) wrmsr(0x10, val1, val2) #define write_rdtscp_aux(val) wrmsr(0xc0000103, val, 0) -#define rdpmc(counter,low,high) \ - __asm__ __volatile__("rdpmc" \ - : "=a" (low), "=d" (high) \ - : "c" (counter)) - -static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, +static inline void cpu...
2007 Apr 18
2
[PATCH] x86_64 paravirt_ops port
...te 0x0f,0x01,0xf9" : "=a" (__a), "=d" (__d), "=c" (aux)); \ (val) = (__d << 32) | __a; \ } while (0) +#define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32)) #define write_tsc(val1,val2) wrmsr(0x10, val1, val2) #define write_rdtscp_aux(val) wrmsr(0xc0000103, val, 0) -#define rdpmc(counter,low,high) \ - __asm__ __volatile__("rdpmc" \ - : "=a" (low), "=d" (high) \ - : "c" (counter)) - -static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, +static inline void cpu...