Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
edbe77ba
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
edbe77ba
编写于
5月 28, 2010
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'misc-2.6.35' into release
上级
64a4222f
0dc698b9
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
30 addition
and
39 deletion
+30
-39
drivers/acpi/acpi_pad.c
drivers/acpi/acpi_pad.c
+11
-2
drivers/acpi/ec.c
drivers/acpi/ec.c
+1
-2
drivers/acpi/processor_idle.c
drivers/acpi/processor_idle.c
+13
-17
drivers/acpi/sleep.h
drivers/acpi/sleep.h
+1
-1
drivers/acpi/video.c
drivers/acpi/video.c
+4
-4
include/acpi/processor.h
include/acpi/processor.h
+0
-13
未找到文件。
drivers/acpi/acpi_pad.c
浏览文件 @
edbe77ba
...
...
@@ -43,6 +43,10 @@ static DEFINE_MUTEX(isolated_cpus_lock);
#define CPUID5_ECX_EXTENSIONS_SUPPORTED (0x1)
#define CPUID5_ECX_INTERRUPT_BREAK (0x2)
static
unsigned
long
power_saving_mwait_eax
;
static
unsigned
char
tsc_detected_unstable
;
static
unsigned
char
tsc_marked_unstable
;
static
void
power_saving_mwait_init
(
void
)
{
unsigned
int
eax
,
ebx
,
ecx
,
edx
;
...
...
@@ -87,8 +91,8 @@ static void power_saving_mwait_init(void)
/*FALL THROUGH*/
default:
/* TSC could halt in idle
, so notify users
*/
mark_tsc_unstable
(
"TSC halts in idle"
)
;
/* TSC could halt in idle */
tsc_detected_unstable
=
1
;
}
#endif
}
...
...
@@ -178,6 +182,11 @@ static int power_saving_thread(void *data)
expire_time
=
jiffies
+
HZ
*
(
100
-
idle_pct
)
/
100
;
while
(
!
need_resched
())
{
if
(
tsc_detected_unstable
&&
!
tsc_marked_unstable
)
{
/* TSC could halt in idle, so notify users */
mark_tsc_unstable
(
"TSC halts in idle"
);
tsc_marked_unstable
=
1
;
}
local_irq_disable
();
cpu
=
smp_processor_id
();
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_ENTER
,
...
...
drivers/acpi/ec.c
浏览文件 @
edbe77ba
...
...
@@ -1027,10 +1027,9 @@ int __init acpi_ec_ecdt_probe(void)
/* Don't trust ECDT, which comes from ASUSTek */
if
(
!
EC_FLAGS_VALIDATE_ECDT
)
goto
install
;
saved_ec
=
km
alloc
(
sizeof
(
struct
acpi_ec
),
GFP_KERNEL
);
saved_ec
=
km
emdup
(
boot_ec
,
sizeof
(
struct
acpi_ec
),
GFP_KERNEL
);
if
(
!
saved_ec
)
return
-
ENOMEM
;
memcpy
(
saved_ec
,
boot_ec
,
sizeof
(
struct
acpi_ec
));
/* fall through */
}
...
...
drivers/acpi/processor_idle.c
浏览文件 @
edbe77ba
...
...
@@ -727,19 +727,9 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
break
;
}
if
(
pr
->
power
.
states
[
i
].
promotion
.
state
)
seq_printf
(
seq
,
"promotion[C%zd] "
,
(
pr
->
power
.
states
[
i
].
promotion
.
state
-
pr
->
power
.
states
));
else
seq_puts
(
seq
,
"promotion[--] "
);
if
(
pr
->
power
.
states
[
i
].
demotion
.
state
)
seq_printf
(
seq
,
"demotion[C%zd] "
,
(
pr
->
power
.
states
[
i
].
demotion
.
state
-
pr
->
power
.
states
));
else
seq_puts
(
seq
,
"demotion[--] "
);
seq_puts
(
seq
,
"promotion[--] "
);
seq_puts
(
seq
,
"demotion[--] "
);
seq_printf
(
seq
,
"latency[%03d] usage[%08d] duration[%020llu]
\n
"
,
pr
->
power
.
states
[
i
].
latency
,
...
...
@@ -869,6 +859,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
struct
acpi_processor
*
pr
;
struct
acpi_processor_cx
*
cx
=
cpuidle_get_statedata
(
state
);
ktime_t
kt1
,
kt2
;
s64
idle_time_ns
;
s64
idle_time
;
s64
sleep_ticks
=
0
;
...
...
@@ -910,12 +901,14 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
sched_clock_idle_sleep_event
();
acpi_idle_do_entry
(
cx
);
kt2
=
ktime_get_real
();
idle_time
=
ktime_to_us
(
ktime_sub
(
kt2
,
kt1
));
idle_time_ns
=
ktime_to_ns
(
ktime_sub
(
kt2
,
kt1
));
idle_time
=
idle_time_ns
;
do_div
(
idle_time
,
NSEC_PER_USEC
);
sleep_ticks
=
us_to_pm_timer_ticks
(
idle_time
);
/* Tell the scheduler how much we idled: */
sched_clock_idle_wakeup_event
(
sleep_ticks
*
PM_TIMER_TICK_NS
);
sched_clock_idle_wakeup_event
(
idle_time_ns
);
local_irq_enable
();
current_thread_info
()
->
status
|=
TS_POLLING
;
...
...
@@ -943,6 +936,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
struct
acpi_processor
*
pr
;
struct
acpi_processor_cx
*
cx
=
cpuidle_get_statedata
(
state
);
ktime_t
kt1
,
kt2
;
s64
idle_time_ns
;
s64
idle_time
;
s64
sleep_ticks
=
0
;
...
...
@@ -1025,11 +1019,13 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
spin_unlock
(
&
c3_lock
);
}
kt2
=
ktime_get_real
();
idle_time
=
ktime_to_us
(
ktime_sub
(
kt2
,
kt1
));
idle_time_ns
=
ktime_to_us
(
ktime_sub
(
kt2
,
kt1
));
idle_time
=
idle_time_ns
;
do_div
(
idle_time
,
NSEC_PER_USEC
);
sleep_ticks
=
us_to_pm_timer_ticks
(
idle_time
);
/* Tell the scheduler how much we idled: */
sched_clock_idle_wakeup_event
(
sleep_ticks
*
PM_TIMER_TICK_NS
);
sched_clock_idle_wakeup_event
(
idle_time_ns
);
local_irq_enable
();
current_thread_info
()
->
status
|=
TS_POLLING
;
...
...
drivers/acpi/sleep.h
浏览文件 @
edbe77ba
extern
u8
sleep_states
[];
extern
int
acpi_suspend
(
u32
state
);
extern
int
acpi_suspend
(
u32
state
);
extern
void
acpi_enable_wakeup_device_prep
(
u8
sleep_state
);
extern
void
acpi_enable_wakeup_device
(
u8
sleep_state
);
...
...
drivers/acpi/video.c
浏览文件 @
edbe77ba
...
...
@@ -1003,11 +1003,11 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
result
=
acpi_video_init_brightness
(
device
);
if
(
result
)
return
;
name
=
k
zalloc
(
MAX_NAME_LEN
,
GFP_KERNEL
);
name
=
k
asprintf
(
GFP_KERNEL
,
"acpi_video%d"
,
count
);
if
(
!
name
)
return
;
count
++
;
sprintf
(
name
,
"acpi_video%d"
,
count
++
);
memset
(
&
props
,
0
,
sizeof
(
struct
backlight_properties
));
props
.
max_brightness
=
device
->
brightness
->
count
-
3
;
device
->
backlight
=
backlight_device_register
(
name
,
NULL
,
device
,
...
...
@@ -1063,10 +1063,10 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
if
(
device
->
cap
.
_DCS
&&
device
->
cap
.
_DSS
)
{
static
int
count
;
char
*
name
;
name
=
k
zalloc
(
MAX_NAME_LEN
,
GFP_KERNEL
);
name
=
k
asprintf
(
GFP_KERNEL
,
"acpi_video%d"
,
count
);
if
(
!
name
)
return
;
sprintf
(
name
,
"acpi_video%d"
,
count
++
)
;
count
++
;
device
->
output_dev
=
video_output_register
(
name
,
NULL
,
device
,
&
acpi_output_properties
);
kfree
(
name
);
...
...
include/acpi/processor.h
浏览文件 @
edbe77ba
...
...
@@ -52,17 +52,6 @@ struct acpi_power_register {
u64
address
;
}
__attribute__
((
packed
));
struct
acpi_processor_cx_policy
{
u32
count
;
struct
acpi_processor_cx
*
state
;
struct
{
u32
time
;
u32
ticks
;
u32
count
;
u32
bm
;
}
threshold
;
};
struct
acpi_processor_cx
{
u8
valid
;
u8
type
;
...
...
@@ -74,8 +63,6 @@ struct acpi_processor_cx {
u32
power
;
u32
usage
;
u64
time
;
struct
acpi_processor_cx_policy
promotion
;
struct
acpi_processor_cx_policy
demotion
;
char
desc
[
ACPI_CX_DESC_LEN
];
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录