Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
a48ecc77
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a48ecc77
编写于
6月 12, 2010
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'acpi_pad' into release
上级
92634825
8aa4b14e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
24 addition
and
12 deletion
+24
-12
drivers/acpi/acpi_pad.c
drivers/acpi/acpi_pad.c
+24
-12
未找到文件。
drivers/acpi/acpi_pad.c
浏览文件 @
a48ecc77
...
...
@@ -46,6 +46,8 @@ static unsigned long power_saving_mwait_eax;
static
unsigned
char
tsc_detected_unstable
;
static
unsigned
char
tsc_marked_unstable
;
static
unsigned
char
lapic_detected_unstable
;
static
unsigned
char
lapic_marked_unstable
;
static
void
power_saving_mwait_init
(
void
)
{
...
...
@@ -75,9 +77,6 @@ static void power_saving_mwait_init(void)
power_saving_mwait_eax
=
(
highest_cstate
<<
MWAIT_SUBSTATE_SIZE
)
|
(
highest_subcstate
-
1
);
for_each_online_cpu
(
i
)
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_ON
,
&
i
);
#if defined(CONFIG_GENERIC_TIME) && defined(CONFIG_X86)
switch
(
boot_cpu_data
.
x86_vendor
)
{
case
X86_VENDOR_AMD
:
...
...
@@ -86,13 +85,15 @@ static void power_saving_mwait_init(void)
* AMD Fam10h TSC will tick in all
* C/P/S0/S1 states when this bit is set.
*/
if
(
boot_cpu_has
(
X86_FEATURE_NONSTOP_TSC
))
return
;
/*FALL THROUGH*/
if
(
!
boot_cpu_has
(
X86_FEATURE_NONSTOP_TSC
))
tsc_detected_unstable
=
1
;
if
(
!
boot_cpu_has
(
X86_FEATURE_ARAT
))
lapic_detected_unstable
=
1
;
break
;
default:
/* TSC could halt in idle */
/* TSC
& LAPIC
could halt in idle */
tsc_detected_unstable
=
1
;
lapic_detected_unstable
=
1
;
}
#endif
}
...
...
@@ -180,10 +181,20 @@ static int power_saving_thread(void *data)
mark_tsc_unstable
(
"TSC halts in idle"
);
tsc_marked_unstable
=
1
;
}
if
(
lapic_detected_unstable
&&
!
lapic_marked_unstable
)
{
int
i
;
/* LAPIC could halt in idle, so notify users */
for_each_online_cpu
(
i
)
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_ON
,
&
i
);
lapic_marked_unstable
=
1
;
}
local_irq_disable
();
cpu
=
smp_processor_id
();
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_ENTER
,
&
cpu
);
if
(
lapic_marked_unstable
)
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_ENTER
,
&
cpu
);
stop_critical_timings
();
__monitor
((
void
*
)
&
current_thread_info
()
->
flags
,
0
,
0
);
...
...
@@ -192,8 +203,9 @@ static int power_saving_thread(void *data)
__mwait
(
power_saving_mwait_eax
,
1
);
start_critical_timings
();
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_EXIT
,
&
cpu
);
if
(
lapic_marked_unstable
)
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_EXIT
,
&
cpu
);
local_irq_enable
();
if
(
jiffies
>
expire_time
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录