Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
edbe77ba
Commit
edbe77ba
authored
May 28, 2010
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'misc-2.6.35' into release
parents
64a4222f
0dc698b9
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
39 deletions
+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
No files found.
drivers/acpi/acpi_pad.c
View file @
edbe77ba
...
@@ -43,6 +43,10 @@ static DEFINE_MUTEX(isolated_cpus_lock);
...
@@ -43,6 +43,10 @@ static DEFINE_MUTEX(isolated_cpus_lock);
#define CPUID5_ECX_EXTENSIONS_SUPPORTED (0x1)
#define CPUID5_ECX_EXTENSIONS_SUPPORTED (0x1)
#define CPUID5_ECX_INTERRUPT_BREAK (0x2)
#define CPUID5_ECX_INTERRUPT_BREAK (0x2)
static
unsigned
long
power_saving_mwait_eax
;
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
)
static
void
power_saving_mwait_init
(
void
)
{
{
unsigned
int
eax
,
ebx
,
ecx
,
edx
;
unsigned
int
eax
,
ebx
,
ecx
,
edx
;
...
@@ -87,8 +91,8 @@ static void power_saving_mwait_init(void)
...
@@ -87,8 +91,8 @@ static void power_saving_mwait_init(void)
/*FALL THROUGH*/
/*FALL THROUGH*/
default:
default:
/* TSC could halt in idle
, so notify users
*/
/* TSC could halt in idle */
mark_tsc_unstable
(
"TSC halts in idle"
)
;
tsc_detected_unstable
=
1
;
}
}
#endif
#endif
}
}
...
@@ -178,6 +182,11 @@ static int power_saving_thread(void *data)
...
@@ -178,6 +182,11 @@ static int power_saving_thread(void *data)
expire_time
=
jiffies
+
HZ
*
(
100
-
idle_pct
)
/
100
;
expire_time
=
jiffies
+
HZ
*
(
100
-
idle_pct
)
/
100
;
while
(
!
need_resched
())
{
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
();
local_irq_disable
();
cpu
=
smp_processor_id
();
cpu
=
smp_processor_id
();
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_ENTER
,
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_ENTER
,
...
...
drivers/acpi/ec.c
View file @
edbe77ba
...
@@ -1027,10 +1027,9 @@ int __init acpi_ec_ecdt_probe(void)
...
@@ -1027,10 +1027,9 @@ int __init acpi_ec_ecdt_probe(void)
/* Don't trust ECDT, which comes from ASUSTek */
/* Don't trust ECDT, which comes from ASUSTek */
if
(
!
EC_FLAGS_VALIDATE_ECDT
)
if
(
!
EC_FLAGS_VALIDATE_ECDT
)
goto
install
;
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
)
if
(
!
saved_ec
)
return
-
ENOMEM
;
return
-
ENOMEM
;
memcpy
(
saved_ec
,
boot_ec
,
sizeof
(
struct
acpi_ec
));
/* fall through */
/* fall through */
}
}
...
...
drivers/acpi/processor_idle.c
View file @
edbe77ba
...
@@ -727,18 +727,8 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
...
@@ -727,18 +727,8 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
break
;
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[--] "
);
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
,
"demotion[--] "
);
seq_printf
(
seq
,
"latency[%03d] usage[%08d] duration[%020llu]
\n
"
,
seq_printf
(
seq
,
"latency[%03d] usage[%08d] duration[%020llu]
\n
"
,
...
@@ -869,6 +859,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
...
@@ -869,6 +859,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
struct
acpi_processor
*
pr
;
struct
acpi_processor
*
pr
;
struct
acpi_processor_cx
*
cx
=
cpuidle_get_statedata
(
state
);
struct
acpi_processor_cx
*
cx
=
cpuidle_get_statedata
(
state
);
ktime_t
kt1
,
kt2
;
ktime_t
kt1
,
kt2
;
s64
idle_time_ns
;
s64
idle_time
;
s64
idle_time
;
s64
sleep_ticks
=
0
;
s64
sleep_ticks
=
0
;
...
@@ -910,12 +901,14 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
...
@@ -910,12 +901,14 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
sched_clock_idle_sleep_event
();
sched_clock_idle_sleep_event
();
acpi_idle_do_entry
(
cx
);
acpi_idle_do_entry
(
cx
);
kt2
=
ktime_get_real
();
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
);
sleep_ticks
=
us_to_pm_timer_ticks
(
idle_time
);
/* Tell the scheduler how much we idled: */
/* 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
();
local_irq_enable
();
current_thread_info
()
->
status
|=
TS_POLLING
;
current_thread_info
()
->
status
|=
TS_POLLING
;
...
@@ -943,6 +936,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
...
@@ -943,6 +936,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
struct
acpi_processor
*
pr
;
struct
acpi_processor
*
pr
;
struct
acpi_processor_cx
*
cx
=
cpuidle_get_statedata
(
state
);
struct
acpi_processor_cx
*
cx
=
cpuidle_get_statedata
(
state
);
ktime_t
kt1
,
kt2
;
ktime_t
kt1
,
kt2
;
s64
idle_time_ns
;
s64
idle_time
;
s64
idle_time
;
s64
sleep_ticks
=
0
;
s64
sleep_ticks
=
0
;
...
@@ -1025,11 +1019,13 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
...
@@ -1025,11 +1019,13 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
spin_unlock
(
&
c3_lock
);
spin_unlock
(
&
c3_lock
);
}
}
kt2
=
ktime_get_real
();
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
);
sleep_ticks
=
us_to_pm_timer_ticks
(
idle_time
);
/* Tell the scheduler how much we idled: */
/* 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
();
local_irq_enable
();
current_thread_info
()
->
status
|=
TS_POLLING
;
current_thread_info
()
->
status
|=
TS_POLLING
;
...
...
drivers/acpi/sleep.h
View file @
edbe77ba
extern
u8
sleep_states
[];
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_prep
(
u8
sleep_state
);
extern
void
acpi_enable_wakeup_device
(
u8
sleep_state
);
extern
void
acpi_enable_wakeup_device
(
u8
sleep_state
);
...
...
drivers/acpi/video.c
View file @
edbe77ba
...
@@ -1003,11 +1003,11 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
...
@@ -1003,11 +1003,11 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
result
=
acpi_video_init_brightness
(
device
);
result
=
acpi_video_init_brightness
(
device
);
if
(
result
)
if
(
result
)
return
;
return
;
name
=
k
zalloc
(
MAX_NAME_LEN
,
GFP_KERNEL
);
name
=
k
asprintf
(
GFP_KERNEL
,
"acpi_video%d"
,
count
);
if
(
!
name
)
if
(
!
name
)
return
;
return
;
count
++
;
sprintf
(
name
,
"acpi_video%d"
,
count
++
);
memset
(
&
props
,
0
,
sizeof
(
struct
backlight_properties
));
memset
(
&
props
,
0
,
sizeof
(
struct
backlight_properties
));
props
.
max_brightness
=
device
->
brightness
->
count
-
3
;
props
.
max_brightness
=
device
->
brightness
->
count
-
3
;
device
->
backlight
=
backlight_device_register
(
name
,
NULL
,
device
,
device
->
backlight
=
backlight_device_register
(
name
,
NULL
,
device
,
...
@@ -1063,10 +1063,10 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
...
@@ -1063,10 +1063,10 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
if
(
device
->
cap
.
_DCS
&&
device
->
cap
.
_DSS
)
{
if
(
device
->
cap
.
_DCS
&&
device
->
cap
.
_DSS
)
{
static
int
count
;
static
int
count
;
char
*
name
;
char
*
name
;
name
=
k
zalloc
(
MAX_NAME_LEN
,
GFP_KERNEL
);
name
=
k
asprintf
(
GFP_KERNEL
,
"acpi_video%d"
,
count
);
if
(
!
name
)
if
(
!
name
)
return
;
return
;
sprintf
(
name
,
"acpi_video%d"
,
count
++
)
;
count
++
;
device
->
output_dev
=
video_output_register
(
name
,
device
->
output_dev
=
video_output_register
(
name
,
NULL
,
device
,
&
acpi_output_properties
);
NULL
,
device
,
&
acpi_output_properties
);
kfree
(
name
);
kfree
(
name
);
...
...
include/acpi/processor.h
View file @
edbe77ba
...
@@ -52,17 +52,6 @@ struct acpi_power_register {
...
@@ -52,17 +52,6 @@ struct acpi_power_register {
u64
address
;
u64
address
;
}
__attribute__
((
packed
));
}
__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
{
struct
acpi_processor_cx
{
u8
valid
;
u8
valid
;
u8
type
;
u8
type
;
...
@@ -74,8 +63,6 @@ struct acpi_processor_cx {
...
@@ -74,8 +63,6 @@ struct acpi_processor_cx {
u32
power
;
u32
power
;
u32
usage
;
u32
usage
;
u64
time
;
u64
time
;
struct
acpi_processor_cx_policy
promotion
;
struct
acpi_processor_cx_policy
demotion
;
char
desc
[
ACPI_CX_DESC_LEN
];
char
desc
[
ACPI_CX_DESC_LEN
];
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment