Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
be9a1d3c
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
be9a1d3c
编写于
12月 23, 2008
作者:
I
Ingo Molnar
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'x86/tsc' into x86/core
上级
fa623d1b
7e3cbc3f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
36 addition
and
7 deletion
+36
-7
arch/x86/kernel/cpu/addon_cpuid_features.c
arch/x86/kernel/cpu/addon_cpuid_features.c
+8
-0
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/amd.c
+7
-2
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/cpu/intel.c
+17
-1
arch/x86/kernel/process.c
arch/x86/kernel/process.c
+1
-1
drivers/acpi/processor_idle.c
drivers/acpi/processor_idle.c
+3
-3
未找到文件。
arch/x86/kernel/cpu/addon_cpuid_features.c
浏览文件 @
be9a1d3c
...
@@ -120,9 +120,17 @@ void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c)
...
@@ -120,9 +120,17 @@ void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c)
c
->
cpu_core_id
=
phys_pkg_id
(
c
->
initial_apicid
,
ht_mask_width
)
c
->
cpu_core_id
=
phys_pkg_id
(
c
->
initial_apicid
,
ht_mask_width
)
&
core_select_mask
;
&
core_select_mask
;
c
->
phys_proc_id
=
phys_pkg_id
(
c
->
initial_apicid
,
core_plus_mask_width
);
c
->
phys_proc_id
=
phys_pkg_id
(
c
->
initial_apicid
,
core_plus_mask_width
);
/*
* Reinit the apicid, now that we have extended initial_apicid.
*/
c
->
apicid
=
phys_pkg_id
(
c
->
initial_apicid
,
0
);
#else
#else
c
->
cpu_core_id
=
phys_pkg_id
(
ht_mask_width
)
&
core_select_mask
;
c
->
cpu_core_id
=
phys_pkg_id
(
ht_mask_width
)
&
core_select_mask
;
c
->
phys_proc_id
=
phys_pkg_id
(
core_plus_mask_width
);
c
->
phys_proc_id
=
phys_pkg_id
(
core_plus_mask_width
);
/*
* Reinit the apicid, now that we have extended initial_apicid.
*/
c
->
apicid
=
phys_pkg_id
(
0
);
#endif
#endif
c
->
x86_max_cores
=
(
core_level_siblings
/
smp_num_siblings
);
c
->
x86_max_cores
=
(
core_level_siblings
/
smp_num_siblings
);
...
...
arch/x86/kernel/cpu/amd.c
浏览文件 @
be9a1d3c
...
@@ -283,9 +283,14 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c)
...
@@ -283,9 +283,14 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c)
{
{
early_init_amd_mc
(
c
);
early_init_amd_mc
(
c
);
/* c->x86_power is 8000_0007 edx. Bit 8 is constant TSC */
/*
if
(
c
->
x86_power
&
(
1
<<
8
))
* c->x86_power is 8000_0007 edx. Bit 8 is TSC runs at constant rate
* with P/T states and does not stop in deep C-states
*/
if
(
c
->
x86_power
&
(
1
<<
8
))
{
set_cpu_cap
(
c
,
X86_FEATURE_CONSTANT_TSC
);
set_cpu_cap
(
c
,
X86_FEATURE_CONSTANT_TSC
);
set_cpu_cap
(
c
,
X86_FEATURE_NONSTOP_TSC
);
}
#ifdef CONFIG_X86_64
#ifdef CONFIG_X86_64
set_cpu_cap
(
c
,
X86_FEATURE_SYSCALL32
);
set_cpu_cap
(
c
,
X86_FEATURE_SYSCALL32
);
...
...
arch/x86/kernel/cpu/intel.c
浏览文件 @
be9a1d3c
...
@@ -41,6 +41,16 @@ static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
...
@@ -41,6 +41,16 @@ static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
if
(
c
->
x86
==
15
&&
c
->
x86_cache_alignment
==
64
)
if
(
c
->
x86
==
15
&&
c
->
x86_cache_alignment
==
64
)
c
->
x86_cache_alignment
=
128
;
c
->
x86_cache_alignment
=
128
;
#endif
#endif
/*
* c->x86_power is 8000_0007 edx. Bit 8 is TSC runs at constant rate
* with P/T states and does not stop in deep C-states
*/
if
(
c
->
x86_power
&
(
1
<<
8
))
{
set_cpu_cap
(
c
,
X86_FEATURE_CONSTANT_TSC
);
set_cpu_cap
(
c
,
X86_FEATURE_NONSTOP_TSC
);
}
}
}
#ifdef CONFIG_X86_32
#ifdef CONFIG_X86_32
...
@@ -242,6 +252,13 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
...
@@ -242,6 +252,13 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
intel_workarounds
(
c
);
intel_workarounds
(
c
);
/*
* Detect the extended topology information if available. This
* will reinitialise the initial_apicid which will be used
* in init_intel_cacheinfo()
*/
detect_extended_topology
(
c
);
l2
=
init_intel_cacheinfo
(
c
);
l2
=
init_intel_cacheinfo
(
c
);
if
(
c
->
cpuid_level
>
9
)
{
if
(
c
->
cpuid_level
>
9
)
{
unsigned
eax
=
cpuid_eax
(
10
);
unsigned
eax
=
cpuid_eax
(
10
);
...
@@ -312,7 +329,6 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
...
@@ -312,7 +329,6 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
if
(
cpu_has_bts
)
if
(
cpu_has_bts
)
ptrace_bts_init_intel
(
c
);
ptrace_bts_init_intel
(
c
);
detect_extended_topology
(
c
);
if
(
!
cpu_has
(
c
,
X86_FEATURE_XTOPOLOGY
))
{
if
(
!
cpu_has
(
c
,
X86_FEATURE_XTOPOLOGY
))
{
/*
/*
* let's use the legacy cpuid vector 0x1 and 0x4 for topology
* let's use the legacy cpuid vector 0x1 and 0x4 for topology
...
...
arch/x86/kernel/process.c
浏览文件 @
be9a1d3c
...
@@ -287,7 +287,7 @@ static void c1e_idle(void)
...
@@ -287,7 +287,7 @@ static void c1e_idle(void)
rdmsr
(
MSR_K8_INT_PENDING_MSG
,
lo
,
hi
);
rdmsr
(
MSR_K8_INT_PENDING_MSG
,
lo
,
hi
);
if
(
lo
&
K8_INTP_C1E_ACTIVE_MASK
)
{
if
(
lo
&
K8_INTP_C1E_ACTIVE_MASK
)
{
c1e_detected
=
1
;
c1e_detected
=
1
;
if
(
!
boot_cpu_has
(
X86_FEATURE_
CONSTANT
_TSC
))
if
(
!
boot_cpu_has
(
X86_FEATURE_
NONSTOP
_TSC
))
mark_tsc_unstable
(
"TSC halt in AMD C1E"
);
mark_tsc_unstable
(
"TSC halt in AMD C1E"
);
printk
(
KERN_INFO
"System has AMD C1E enabled
\n
"
);
printk
(
KERN_INFO
"System has AMD C1E enabled
\n
"
);
set_cpu_cap
(
&
boot_cpu_data
,
X86_FEATURE_AMDC1E
);
set_cpu_cap
(
&
boot_cpu_data
,
X86_FEATURE_AMDC1E
);
...
...
drivers/acpi/processor_idle.c
浏览文件 @
be9a1d3c
...
@@ -374,15 +374,15 @@ static int tsc_halts_in_c(int state)
...
@@ -374,15 +374,15 @@ static int tsc_halts_in_c(int state)
{
{
switch
(
boot_cpu_data
.
x86_vendor
)
{
switch
(
boot_cpu_data
.
x86_vendor
)
{
case
X86_VENDOR_AMD
:
case
X86_VENDOR_AMD
:
case
X86_VENDOR_INTEL
:
/*
/*
* AMD Fam10h TSC will tick in all
* AMD Fam10h TSC will tick in all
* C/P/S0/S1 states when this bit is set.
* C/P/S0/S1 states when this bit is set.
*/
*/
if
(
boot_cpu_has
(
X86_FEATURE_
CONSTANT
_TSC
))
if
(
boot_cpu_has
(
X86_FEATURE_
NONSTOP
_TSC
))
return
0
;
return
0
;
/*FALL THROUGH*/
/*FALL THROUGH*/
case
X86_VENDOR_INTEL
:
/* Several cases known where TSC halts in C2 too */
default:
default:
return
state
>
ACPI_STATE_C1
;
return
state
>
ACPI_STATE_C1
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录