diff options
Diffstat (limited to 'arch/x86_64/kernel/time.c')
-rw-r--r-- | arch/x86_64/kernel/time.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index b9ff75992c16..7a9b18224182 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/acpi.h> | 28 | #include <linux/acpi.h> |
29 | #ifdef CONFIG_ACPI | 29 | #ifdef CONFIG_ACPI |
30 | #include <acpi/achware.h> /* for PM timer frequency */ | 30 | #include <acpi/achware.h> /* for PM timer frequency */ |
31 | #include <acpi/acpi_bus.h> | ||
31 | #endif | 32 | #endif |
32 | #include <asm/8253pit.h> | 33 | #include <asm/8253pit.h> |
33 | #include <asm/pgtable.h> | 34 | #include <asm/pgtable.h> |
@@ -193,7 +194,7 @@ unsigned long profile_pc(struct pt_regs *regs) | |||
193 | is just accounted to the spinlock function. | 194 | is just accounted to the spinlock function. |
194 | Better would be to write these functions in assembler again | 195 | Better would be to write these functions in assembler again |
195 | and check exactly. */ | 196 | and check exactly. */ |
196 | if (in_lock_functions(pc)) { | 197 | if (!user_mode(regs) && in_lock_functions(pc)) { |
197 | char *v = *(char **)regs->rsp; | 198 | char *v = *(char **)regs->rsp; |
198 | if ((v >= _stext && v <= _etext) || | 199 | if ((v >= _stext && v <= _etext) || |
199 | (v >= _sinittext && v <= _einittext) || | 200 | (v >= _sinittext && v <= _einittext) || |
@@ -953,11 +954,18 @@ __cpuinit int unsynchronized_tsc(void) | |||
953 | #ifdef CONFIG_SMP | 954 | #ifdef CONFIG_SMP |
954 | if (apic_is_clustered_box()) | 955 | if (apic_is_clustered_box()) |
955 | return 1; | 956 | return 1; |
956 | /* Intel systems are normally all synchronized. Exceptions | ||
957 | are handled in the check above. */ | ||
958 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) | ||
959 | return 0; | ||
960 | #endif | 957 | #endif |
958 | /* Most intel systems have synchronized TSCs except for | ||
959 | multi node systems */ | ||
960 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) { | ||
961 | #ifdef CONFIG_ACPI | ||
962 | /* But TSC doesn't tick in C3 so don't use it there */ | ||
963 | if (acpi_fadt.length > 0 && acpi_fadt.plvl3_lat < 100) | ||
964 | return 1; | ||
965 | #endif | ||
966 | return 0; | ||
967 | } | ||
968 | |||
961 | /* Assume multi socket systems are not synchronized */ | 969 | /* Assume multi socket systems are not synchronized */ |
962 | return num_present_cpus() > 1; | 970 | return num_present_cpus() > 1; |
963 | } | 971 | } |