Skip to content

Commit 9e0cae9

Browse files
lenbIngo Molnar
authored andcommitted
x86/tsc_msr: Update comments, expand definitions
Syntax only, no functional change. Signed-off-by: Len Brown <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/8653a2dba21fef122fc7b29eafb750e2004d3976.1466138954.git.len.brown@intel.com Signed-off-by: Ingo Molnar <[email protected]>
1 parent 14bb4e3 commit 9e0cae9

File tree

1 file changed

+10
-26
lines changed

1 file changed

+10
-26
lines changed

arch/x86/kernel/tsc_msr.c

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
/*
2-
* tsc_msr.c - MSR based TSC calibration on Intel Atom SoC platforms.
3-
*
4-
* TSC in Intel Atom SoC runs at a constant rate which can be figured
5-
* by this formula:
6-
* <maximum core-clock to bus-clock ratio> * <maximum resolved frequency>
7-
* See Intel 64 and IA-32 System Programming Guid section 16.12 and 30.11.5
8-
* for details.
9-
* Especially some Intel Atom SoCs don't have PIT(i8254) or HPET, so MSR
10-
* based calibration is the only option.
11-
*
2+
* tsc_msr.c - TSC frequency enumeration via MSR
123
*
134
* Copyright (C) 2013 Intel Corporation
145
* Author: Bin Gao <[email protected]>
@@ -22,17 +13,10 @@
2213
#include <asm/apic.h>
2314
#include <asm/param.h>
2415

25-
/* CPU reference clock frequency: in KHz */
26-
#define FREQ_83 83200
27-
#define FREQ_100 99840
28-
#define FREQ_133 133200
29-
#define FREQ_166 166400
30-
3116
#define MAX_NUM_FREQS 8
3217

3318
/*
34-
* According to Intel 64 and IA-32 System Programming Guide,
35-
* if MSR_PERF_STAT[31] is set, the maximum resolved bus ratio can be
19+
* If MSR_PERF_STAT[31] is set, the maximum resolved bus ratio can be
3620
* read in MSR_PLATFORM_ID[12:8], otherwise in MSR_PERF_STAT[44:40].
3721
* Unfortunately some Intel Atom SoCs aren't quite compliant to this,
3822
* so we need manually differentiate SoC families. This is what the
@@ -47,15 +31,15 @@ struct freq_desc {
4731

4832
static struct freq_desc freq_desc_tables[] = {
4933
/* PNW */
50-
{ 6, 0x27, 0, { 0, 0, 0, 0, 0, FREQ_100, 0, FREQ_83 } },
34+
{ 6, 0x27, 0, { 0, 0, 0, 0, 0, 99840, 0, 83200 } },
5135
/* CLV+ */
52-
{ 6, 0x35, 0, { 0, FREQ_133, 0, 0, 0, FREQ_100, 0, FREQ_83 } },
53-
/* TNG */
54-
{ 6, 0x4a, 1, { 0, FREQ_100, FREQ_133, 0, 0, 0, 0, 0 } },
55-
/* VLV2 */
56-
{ 6, 0x37, 1, { FREQ_83, FREQ_100, FREQ_133, FREQ_166, 0, 0, 0, 0 } },
57-
/* ANN */
58-
{ 6, 0x5a, 1, { FREQ_83, FREQ_100, FREQ_133, FREQ_100, 0, 0, 0, 0 } },
36+
{ 6, 0x35, 0, { 0, 133200, 0, 0, 0, 99840, 0, 83200 } },
37+
/* TNG - Intel Atom processor Z3400 series */
38+
{ 6, 0x4a, 1, { 0, 99840, 133200, 0, 0, 0, 0, 0 } },
39+
/* VLV2 - Intel Atom processor E3000, Z3600, Z3700 series */
40+
{ 6, 0x37, 1, { 83200, 99840, 133200, 166400, 0, 0, 0, 0 } },
41+
/* ANN - Intel Atom processor Z3500 series */
42+
{ 6, 0x5a, 1, { 83200, 99840, 133200, 99840, 0, 0, 0, 0 } },
5943
};
6044

6145
static int match_cpu(u8 family, u8 model)

0 commit comments

Comments
 (0)