x86: unify/rewrite SMP TSC sync code
PATCH 1/1 x86: unify/rewrite SMP TSC sync code
Andrew,
could we try this one in -mm? It unifies (and simplifies) the TSC sync code between i386 and x86_64, and also offers a stronger guarantee that we'll only activate the TSC clock on CPU where the TSC is synced correctly by the hardware.
Ingo
---------------->
From: Ingo Molnar <[email protected]>
[patch] x86: unify/rewrite SMP TSC sync code
make the TSC synchronization code more robust, and unify it between x86_64 and i386.
The biggest change is the removal of the 'fix up TSCs' code on x86_64 and i386, in some rare cases it was /causing/ time-warps on SMP systems.
The new code only checks for TSC asynchronity - and if it can prove a time-warp (if it can observe the TSC going backwards when going from one CPU to another within a critical section), then the TSC clock-source is turned off.
The TSC synchronization-checking code also got moved into a separate file.
--- arch/i386/kernel/Makefile | 2 arch/i386/kernel/smpboot.c | 178 ++------------------------------ arch/i386/kernel/tsc.c | 4 arch/i386/kernel/tsc_sync.c | 1 arch/x86_64/kernel/Makefile | 2 arch/x86_64/kernel/smpboot.c | 230 ++---------------------------------------- arch/x86_64/kernel/time.c | 11 ++ arch/x86_64/kernel/tsc_sync.c | 187 ++++++++++++++++++++++++++++++++++ include/asm-i386/tsc.h | 49 -------- include/asm-x86_64/proto.h | 2 include/asm-x86_64/timex.h | 26 ---- include/asm-x86_64/tsc.h | 66 ++++++++++++ 12 files changed, 295 insertions(+), 463 deletions(-)
arch/i386/kernel/Makefile +1 -1
@@ -18,7 +18,7 @@ obj-$(CONFIG_X86_MSR) += msr.o obj-$(CONFIG_X86_CPUID) += cpuid.o obj-$(CONFIG_MICROCODE) += microcode.o obj-$(CONFIG_APM) += apm.o -obj-$(CONFIG_X86_SMP) += smp.o smpboot.o +obj-$(CONFIG_X86_SMP) += smp.o smpboot.o tsc_sync.o obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o obj-$(CONFIG_X86_MPPARSE) += mpparse.o obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o
arch/i386/kernel/smpboot.c +12 -166
229 lines not on this page · raw message
arch/i386/kernel/tsc.c +3 -1
@@ -434,8 +434,10 @@ out:* Make an educated guess if the TSC is trustworthy and synchronized * over all CPUs. */ -static __init int unsynchronized_tsc (void ) +__init int unsynchronized_tsc (void ) { +if (!cpu_has_tsc || tsc_unstable) +return 1 ;/* * Intel systems are normally all synchronized. * Exceptions must mark TSC as unstable:
arch/i386/kernel/tsc_sync.c new file +1 -0
@@ -0,0 +1 @@ +#include "../../x86_64/kernel/tsc_sync.c"
arch/x86_64/kernel/Makefile +1 -1
@@ -19,7 +19,7 @@ obj-$(CONFIG_ACPI) += acpi/ obj-$(CONFIG_X86_MSR) += msr.o obj-$(CONFIG_MICROCODE) += microcode.o obj-$(CONFIG_X86_CPUID) += cpuid.o -obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o +obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o tsc_sync.o obj-y += apic.o nmi.o obj-y += io_apic.o mpparse.o \ genapic.o genapic_cluster.o genapic_flat.o
arch/x86_64/kernel/smpboot.c +11 -219
260 lines not on this page · raw message
arch/x86_64/kernel/time.c +11 -0
@@ -922,12 +922,23 @@ void __init time_init(void)#endif } +static int tsc_unstable =0 ; + +void mark_tsc_unstable (void ) +{ + tsc_unstable =1 ; +} +EXPORT_SYMBOL_GPL (mark_tsc_unstable); +/* * Make an educated guess if the TSC is trustworthy and synchronized * over all CPUs. */ __cpuinit int unsynchronized_tsc (void ) { +if (tsc_unstable) +return 1 ; +#ifdef CONFIG_SMP if (apic_is_clustered_box ())return 1 ;
arch/x86_64/kernel/tsc_sync.c new file +187 -0
187 lines not on this page · raw message
include/asm-i386/tsc.h +1 -48
49 lines not on this page · raw message
include/asm-x86_64/proto.h +0 -2
@@ -92,8 +92,6 @@ extern void check_efer(void);extern int unhandled_signal (struct task_struct *tsk,int sig); -extern int unsynchronized_tsc (void ); -extern void select_idle_routine (const struct cpuinfo_x86 *c);extern unsigned long table_start, table_end;
include/asm-x86_64/timex.h +1 -25
@@ -12,35 +12,11 @@#include <asm/hpet.h> #include <asm/system.h> #include <asm/processor.h> +#include <asm/tsc.h> #include <linux/compiler.h> #define CLOCK_TICK_RATE PIT_TICK_RATE/* Underlying HZ */ -typedef unsigned long long cycles_t ; - -static inline cycles_t get_cycles (void ) -{ -unsigned long long ret; - -rdtscll (ret); -return ret; -} - -/* Like get_cycles, but make sure the CPU is synchronized. */ -static __always_inline cycles_t get_cycles_sync(void) -{ -unsigned long long ret; -unsigned eax; -/* Don't do an additional sync on CPUs where we know -RDTSC is already synchronous. */ -alternative_io ("cpuid" ,ASM_NOP2 ,X86_FEATURE_SYNC_RDTSC , - "=a" (eax), "0" (1) : "ebx","ecx","edx","memory"); -rdtscll (ret); -return ret; -} - -extern unsigned int cpu_khz; -extern int read_current_timer (unsigned long *timer_value);#define ARCH_HAS_READ_CURRENT_TIMER 1
include/asm-x86_64/tsc.h new file +66 -0
66 lines not on this page · raw message
Quoted 6 lines
make the TSC synchronization code more robust, and unify it between
x86_64and i386.The biggest change is the removal of the 'fix up TSCs' code on
x86_64and i386, in some rare cases it was /causing/ time-warps on SMP systems.
On x86-64 I don't think it can since it doesn't check anymore on sync Intel.
Quoted 4 lines
The new code only checks for TSC asynchronity - and if it can prove a time-warp (if it can observe the TSC going backwards when going from one CPU to another within a critical section), then the TSC clock-source is turned off.
The trouble is that people are using the RDTSC anyways even if the kernel doesn't. So some synchronization is probably a good idea.
-Andi
Quoted 9 lines · Andi Kleen
Quoted 6 lines
make the TSC synchronization code more robust, and unify it between
x86_64and i386.The biggest change is the removal of the 'fix up TSCs' code on
x86_64and i386, in some rare cases it was /causing/ time-warps on SMP systems.On x86-64 I don't think it can since it doesn't check anymore on sync Intel.
yeah - the main new bit for x86-64 is the unconditional check for time warps. We shouldnt (and cannot) really trust the CPU and the board/BIOS getting it right. There were always some motherboards using Intel CPUs that had the TSCs wrong.
Quoted 7 lines
Quoted 4 lines
The new code only checks for TSC asynchronity - and if it can prove a time-warp (if it can observe the TSC going backwards when going from one CPU to another within a critical section), then the TSC clock-source is turned off.
The trouble is that people are using the RDTSC anyways even if the kernel doesn't. So some synchronization is probably a good idea.
which apps are using it? It might be safer in terms of app compatibility if we removed the TSC bit in the case where we know it doesnt work, and if we turned the feature off in the CPU in this case. We could also try to 'approximately' sync up the TSC, but that obviously cannot be used for kernel timekeeping - and by offering an 'almost' good TSC to userspace we'd lure them towards using something we /cannot/ fix.
nor can the TSC really be synced up properly in the hotplug CPU case, after the fact - what if the app already read out an older TSC value and a new CPU is added. If the TSC isnt sync on SMP then it quickly gets pretty messy, and we should rather take a look at /why/ these apps are using RDTSC.
Ingo
Quoted 5 lines
yeah - the main new bit for x86-64 is the unconditional check for time warps. We shouldnt (and cannot) really trust the CPU and the board/BIOS getting it right. There were always some motherboards using Intel CPUs that had the TSCs wrong.
In the 64bit capable generation I don't know of any run in spec (except for multinode systems and there was one overclocked system where the cores got unsync, but overclocking is an operator error)
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
The new code only checks for TSC asynchronity - and if it can prove a time-warp (if it can observe the TSC going backwards when going from one CPU to another within a critical section), then the TSC clock-source is turned off.
Quoted 7 lines
Quoted 2 lines
The trouble is that people are using the RDTSC anyways even if the kernel doesn't. So some synchronization is probably a good idea.
which apps are using it? It might be safer in terms of app compatibility if we removed the TSC bit in the case where we know it doesnt work, and if we turned the feature off in the CPU in this case. We could also try to 'approximately' sync up the TSC,
There was a patch from google for trap -- trapping RDTSC for syncing on demand. I'm not sure that was the right strategy though.
Quoted 3 lines
but that obviously cannot be used
for kernel timekeeping - and by offering an 'almost' good TSC to userspace we'd lure them towards using something we /cannot/ fix.
The trouble is that it's good enough on many systems, probably on those that are being developed on.
Anyways I don't feel very strongly about this -- i guess taking it out would be fine.
Quoted 5 lines
nor can the TSC really be synced up properly in the hotplug CPU case, after the fact - what if the app already read out an older TSC value and a new CPU is added. If the TSC isnt sync on SMP then it quickly gets pretty messy, and we should rather take a look at /why/ these apps are using RDTSC.
Because gettimeofday is too slow.
-Andi
Quoted 9 lines · Andi Kleen
Quoted 5 lines
yeah - the main new bit for x86-64 is the unconditional check for time warps. We shouldnt (and cannot) really trust the CPU and the board/BIOS getting it right. There were always some motherboards using Intel CPUs that had the TSCs wrong.
In the 64bit capable generation I don't know of any run in spec (except for multinode systems and there was one overclocked system where the cores got unsync, but overclocking is an operator error)
i have one (Intel based), 64-bit, fully in spec, which is off by ~3000-4000 cycles. So it happens. But it's a no-brainer thing, this area is historically so bad that it would be crazy /not/ to spend this 20 msecs bootup time per CPU to check whether its TSC is in sync.
I was in fact surprised when i noticed that you removed the unconditional TSC check that i put there years ago - with this we started a ride into the dark with lights off. If the situation gets better in say 2 years and no system ever produces the warning message we can remove it. (but i doubt it will ever get 100% correct.) [The patch will need some cooking in -mm, because it touches code that is fragile to begin with, but it's a necessity i'm quite sure.]
Quoted 10 lines
Quoted 7 lines
Quoted 2 lines
The trouble is that people are using the RDTSC anyways even if the kernel doesn't. So some synchronization is probably a good idea.
which apps are using it? It might be safer in terms of app compatibility if we removed the TSC bit in the case where we know it doesnt work, and if we turned the feature off in the CPU in this case. We could also try to 'approximately' sync up the TSC,
There was a patch from google for trap -- trapping RDTSC for syncing on demand. I'm not sure that was the right strategy though.
but which apps are using RDTSC natively? Trapping isnt too good i agree
- if then we should remove it from the CPU features and hence apps wont (or shouldnt) use it.
Quoted 7 lines
Quoted 5 lines
nor can the TSC really be synced up properly in the hotplug CPU case, after the fact - what if the app already read out an older TSC value and a new CPU is added. If the TSC isnt sync on SMP then it quickly gets pretty messy, and we should rather take a look at /why/ these apps are using RDTSC.
Because gettimeofday is too slow.
as i indicated it in another discussion, i can fix that. Next patch will be that.
Ingo
Quoted 9 lines · Ingo Molnar
Quoted 6 lines · Andi Kleen
Quoted 5 lines
yeah - the main new bit for x86-64 is the unconditional check for time warps. We shouldnt (and cannot) really trust the CPU and the board/BIOS getting it right. There were always some motherboards using Intel CPUs that had the TSCs wrong.
Quoted 6 lines
Quoted 3 lines
In the 64bit capable generation I don't know of any run in spec (except for multinode systems and there was one overclocked system where the cores got unsync, but overclocking is an operator error)
i have one (Intel based), 64-bit, fully in spec, which is off by ~3000-4000 cycles. So it happens.
More details?
Quoted 2 lines
I was in fact surprised when i noticed that you removed the unconditional TSC check that i put there years ago
I removed it because you pointed out that it usually caused
trouble on Intel systems: we would always detect errors due to measurement errors and then make things worse by trying to fix it.
But you're right it might have been better to keep a check with a threshold to catch totally broken cases.
Quoted 1 line
but which apps are using RDTSC natively? Trapping isnt too good i agree
The only sure way would be to trap+printk -- but from previous user complaints it's a substantial number.
Quoted 2 lines
- if then we should remove it from the CPU features and hence apps wont (or shouldnt) use it.
I doubt the majority checks any cpu features first ...
Quoted 11 lines
Quoted 8 lines
Quoted 6 lines
nor can the TSC really be synced up properly in the hotplug CPU case, after the fact - what if the app already read out an older TSC value and a new CPU is added. If the TSC isnt sync on SMP then it quickly gets pretty messy, and we should rather take a look at /why/ these apps are using RDTSC.
Because gettimeofday is too slow.
as i indicated it in another discussion, i can fix that. Next patch will be that.
Well I hope it's not making it HZ resolution. As noted earlier we tried that already and it didn't work (it violates the "forward monotonity" that is commonly expected)
Ok I could imagine it making sense as a new CLOCK_FASTBUTLOUSYRESOLUTION timer in clock_gettime() [together with the new vdso fastpath], but not as default.
-Andi
Quoted 2 lines · Ingo Molnar
nor can the TSC really be synced up properly in the hotplug CPU case, after the fact - what if the app already read out an older TSC value and a new CPU is added. If the TSC isnt sync on SMP then it quickly gets pretty messy, and we should rather take a look at /why/ these apps are using RDTSC.
I've been using RDTSC in pktgen. For my app, I am just trying to find a quick way to determine if X nano-seconds have elapsed. If it's occasionally off by a small amount, that is OK as I have higher-level control logic that will correct long-term trends.
After poking around, I ended up just exporting sched_clock() and using that instead of directly using RDTSC, but that was mostly just for convenience.
If RDTSC is not a good choice for the use I describe above, is there a better method that is still very fast (as compared to do_gettimeofday())?
Thanks,
Ben
Signature · 1 line
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
Quoted 6 lines · Ingo Molnar
* Andi Kleen <[email protected]> wrote:
a new CPU is added. If the TSC isnt sync on SMP then it quickly gets pretty messy, and we should rather take a look at /why/ these apps are using RDTSC.
Ingo
-
I use RDTSC in get a cheap method of measuring time. What other choices are there for a low overhead high frequency time source?
By low overhead a kernel call is way to expensive, I want to minimally impact the code and have many of these calls through out the code. One of the ways I use it is to instrument multi-threaded applications and then use the TSC to compare when actions occur between threads. i.e. I use it as a time stamp counter and neither precision or accuracy is too important. On the other hand the more precise and accurate the better:)
Cheers,
Wink Saville
Quoted 13 lines · Wink Saville
Quoted 8 lines · Ingo Molnar
* Andi Kleen <[email protected]> wrote:
a new CPU is added. If the TSC isnt sync on SMP then it quickly gets pretty messy, and we should rather take a look at /why/ these apps are using RDTSC.
Ingo
-I use RDTSC in get a cheap method of measuring time. What other choices are there for a low overhead high frequency time source?
Quoted 6 lines
By low overhead a kernel call is way to expensive, I want to minimally impact the code and have many of these calls through out the code. One of the ways I use it is to instrument multi-threaded applications and then use the TSC to compare when actions occur between threads. i.e. I use it as a time stamp counter and neither precision or accuracy is too important. On the other hand the more precise and accurate the better:)
so you can live with an occasional jump of seconds/minutes between threads? Or when a thread moves to another cpu?
(yes on many PCs you won't see minutes, but on others you will)
Signature · 2 lines
if you want to mail me at work (you don't), use arjan (at) linux.intel.com Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org
Arjan van de Ven wrote:
<snip/>
Quoted 5 lines
so you can live with an occasional jump of seconds/minutes between threads? Or when a thread moves to another cpu?
(yes on many PCs you won't see minutes, but on others you will)
No that probably wouldn't be acceptable a few thousand ticks might be Ok. How hard would be it possible to detect post facto what corrections might be needed when? Maybe an event or FIFO that would provide correction information.
I would also assume we could request that a thread not migrate between CPU's if it was critical and that could be a solution.
Would another alternative be to allow the thread to indicate when it was ready to migrate and at these points the correction information could be supplied/retrieved if desired.
Actually, we need to ask the CPU/System makers to provide a system wide timer that is independent of the given CPU. I would expect it quite simple for the coming generations of multi-core CPU's to provide a shared TSC. For the multi-processor embedded work I have done we provided a memory mapped counter that all processors could read, that worked quite well:)
Wink
Quoted 3 lines
Actually, we need to ask the CPU/System makers to provide a system wide timer that is independent of the given CPU. I would expect it quite simple
they exist. They're called pmtimer and hpet.
pmtimer is port io. hpet is memory mapped io.
Signature · 2 lines
if you want to mail me at work (you don't), use arjan (at) linux.intel.com Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org
Quoted 5 lines · Arjan van de Ven
Quoted 2 lines
Actually, we need to ask the CPU/System makers to provide a system wide timer that is independent of the given CPU. I would expect it quite simple
they exist. They're called pmtimer and hpet.
pmtimer is port io. hpet is memory mapped io.
Thanks for the info. I took a look at Documentation/hpet.txt and drivers/char/hpet.c and see that hpet_mmap is implemented in the driver but nothing hpet.txt indicates what is being mapped.
Could you point me to any other documentation? I did find the following:
http://www.intel.com/hardwaredesign/hpetspec_1.pdf
Are you aware of any example user code that uses the mmap capability of hpet?
Thanks,
Wink
Quoted 2 lines · Andi Kleen
The trouble is that people are using the RDTSC anyways even if the kernel doesn't. So some synchronization is probably a good idea.
It is better to simply leave TSC alone if unsynchronized. If TSCs appear to be in sync (through some sporadic "synchronization") then people will be tempted to use RDTSC because it seems to work/ However, RDTSC will sporadically yield incoherent values (i.e. time earlier than last TSC read) if we have no full synchronization.
Quoted 6 lines · Ingo Molnar
Andrew,
could we try this one in -mm? It unifies (and simplifies) the TSC sync code between i386 and
x86_64, and also offers a stronger guarantee that we'll only activate the TSC clock on CPU where the TSC is synced correctly by the hardware.
updated patch below. (Mike Galbraith reported that suspend broke on -rt kernels, it was due to an __init/__cpuinit mismatch)
Ingo
------------->
Subject: x86: rewrite SMP TSC sync code
From: Ingo Molnar <[email protected]>
make the TSC synchronization code more robust, and unify it between x86_64 and i386.
The biggest change is the removal of the 'fix up TSCs' code on x86_64 and i386, in some rare cases it was /causing/ time-warps on SMP systems.
The new code only checks for TSC asynchronity - and if it can prove a time-warp (if it can observe the TSC going backwards when going from one CPU to another within a critical section), then the TSC clock-source is turned off.
The TSC synchronization-checking code also got moved into a separate file.
--- arch/i386/kernel/Makefile | 2 arch/i386/kernel/smpboot.c | 178 ++------------------------------ arch/i386/kernel/tsc.c | 4 arch/i386/kernel/tsc_sync.c | 1 arch/x86_64/kernel/Makefile | 2 arch/x86_64/kernel/smpboot.c | 230 ++---------------------------------------- arch/x86_64/kernel/time.c | 11 ++ arch/x86_64/kernel/tsc_sync.c | 187 ++++++++++++++++++++++++++++++++++ include/asm-i386/tsc.h | 49 -------- include/asm-x86_64/proto.h | 2 include/asm-x86_64/timex.h | 26 ---- include/asm-x86_64/tsc.h | 66 ++++++++++++ 12 files changed, 295 insertions(+), 463 deletions(-)
arch/i386/kernel/Makefile +1 -1
@@ -18,7 +18,7 @@ obj-$(CONFIG_X86_MSR) += msr.o obj-$(CONFIG_X86_CPUID) += cpuid.o obj-$(CONFIG_MICROCODE) += microcode.o obj-$(CONFIG_APM) += apm.o -obj-$(CONFIG_X86_SMP) += smp.o smpboot.o +obj-$(CONFIG_X86_SMP) += smp.o smpboot.o tsc_sync.o obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o obj-$(CONFIG_X86_MPPARSE) += mpparse.o obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o
arch/i386/kernel/smpboot.c +12 -166
229 lines not on this page · raw message
arch/i386/kernel/tsc.c +3 -1
@@ -434,8 +434,10 @@ out:* Make an educated guess if the TSC is trustworthy and synchronized * over all CPUs. */ -static __init int unsynchronized_tsc (void ) +__cpuinit int unsynchronized_tsc (void ) { +if (!cpu_has_tsc || tsc_unstable) +return 1 ;/* * Intel systems are normally all synchronized. * Exceptions must mark TSC as unstable:
arch/i386/kernel/tsc_sync.c new file +1 -0
@@ -0,0 +1 @@ +#include "../../x86_64/kernel/tsc_sync.c"
arch/x86_64/kernel/Makefile +1 -1
@@ -19,7 +19,7 @@ obj-$(CONFIG_ACPI) += acpi/ obj-$(CONFIG_X86_MSR) += msr.o obj-$(CONFIG_MICROCODE) += microcode.o obj-$(CONFIG_X86_CPUID) += cpuid.o -obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o +obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o tsc_sync.o obj-y += apic.o nmi.o obj-y += io_apic.o mpparse.o \ genapic.o genapic_cluster.o genapic_flat.o
arch/x86_64/kernel/smpboot.c +11 -219
260 lines not on this page · raw message
arch/x86_64/kernel/time.c +11 -0
@@ -922,12 +922,23 @@ void __init time_init(void)#endif } +static int tsc_unstable =0 ; + +void mark_tsc_unstable (void ) +{ + tsc_unstable =1 ; +} +EXPORT_SYMBOL_GPL (mark_tsc_unstable); +/* * Make an educated guess if the TSC is trustworthy and synchronized * over all CPUs. */ __cpuinit int unsynchronized_tsc (void ) { +if (tsc_unstable) +return 1 ; +#ifdef CONFIG_SMP if (apic_is_clustered_box ())return 1 ;
arch/x86_64/kernel/tsc_sync.c new file +187 -0
187 lines not on this page · raw message
include/asm-i386/tsc.h +1 -48
49 lines not on this page · raw message
include/asm-x86_64/proto.h +0 -2
@@ -92,8 +92,6 @@ extern void check_efer(void);extern int unhandled_signal (struct task_struct *tsk,int sig); -extern int unsynchronized_tsc (void ); -extern void select_idle_routine (const struct cpuinfo_x86 *c);extern unsigned long table_start, table_end;
include/asm-x86_64/timex.h +1 -25
@@ -12,35 +12,11 @@#include <asm/hpet.h> #include <asm/system.h> #include <asm/processor.h> +#include <asm/tsc.h> #include <linux/compiler.h> #define CLOCK_TICK_RATE PIT_TICK_RATE/* Underlying HZ */ -typedef unsigned long long cycles_t ; - -static inline cycles_t get_cycles (void ) -{ -unsigned long long ret; - -rdtscll (ret); -return ret; -} - -/* Like get_cycles, but make sure the CPU is synchronized. */ -static __always_inline cycles_t get_cycles_sync(void) -{ -unsigned long long ret; -unsigned eax; -/* Don't do an additional sync on CPUs where we know -RDTSC is already synchronous. */ -alternative_io ("cpuid" ,ASM_NOP2 ,X86_FEATURE_SYNC_RDTSC , - "=a" (eax), "0" (1) : "ebx","ecx","edx","memory"); -rdtscll (ret); -return ret; -} - -extern unsigned int cpu_khz; -extern int read_current_timer (unsigned long *timer_value);#define ARCH_HAS_READ_CURRENT_TIMER 1
include/asm-x86_64/tsc.h new file +66 -0
66 lines not on this page · raw message