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
a48ecc77
Commit
a48ecc77
authored
Jun 12, 2010
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'acpi_pad' into release
parents
92634825
8aa4b14e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
drivers/acpi/acpi_pad.c
drivers/acpi/acpi_pad.c
+24
-12
No files found.
drivers/acpi/acpi_pad.c
View file @
a48ecc77
...
@@ -46,6 +46,8 @@ static unsigned long power_saving_mwait_eax;
...
@@ -46,6 +46,8 @@ static unsigned long power_saving_mwait_eax;
static
unsigned
char
tsc_detected_unstable
;
static
unsigned
char
tsc_detected_unstable
;
static
unsigned
char
tsc_marked_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
)
static
void
power_saving_mwait_init
(
void
)
{
{
...
@@ -75,9 +77,6 @@ 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
)
|
power_saving_mwait_eax
=
(
highest_cstate
<<
MWAIT_SUBSTATE_SIZE
)
|
(
highest_subcstate
-
1
);
(
highest_subcstate
-
1
);
for_each_online_cpu
(
i
)
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_ON
,
&
i
);
#if defined(CONFIG_GENERIC_TIME) && defined(CONFIG_X86)
#if defined(CONFIG_GENERIC_TIME) && defined(CONFIG_X86)
switch
(
boot_cpu_data
.
x86_vendor
)
{
switch
(
boot_cpu_data
.
x86_vendor
)
{
case
X86_VENDOR_AMD
:
case
X86_VENDOR_AMD
:
...
@@ -86,13 +85,15 @@ static void power_saving_mwait_init(void)
...
@@ -86,13 +85,15 @@ static void power_saving_mwait_init(void)
* 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_NONSTOP_TSC
))
if
(
!
boot_cpu_has
(
X86_FEATURE_NONSTOP_TSC
))
return
;
tsc_detected_unstable
=
1
;
if
(
!
boot_cpu_has
(
X86_FEATURE_ARAT
))
/*FALL THROUGH*/
lapic_detected_unstable
=
1
;
break
;
default:
default:
/* TSC could halt in idle */
/* TSC
& LAPIC
could halt in idle */
tsc_detected_unstable
=
1
;
tsc_detected_unstable
=
1
;
lapic_detected_unstable
=
1
;
}
}
#endif
#endif
}
}
...
@@ -180,10 +181,20 @@ static int power_saving_thread(void *data)
...
@@ -180,10 +181,20 @@ static int power_saving_thread(void *data)
mark_tsc_unstable
(
"TSC halts in idle"
);
mark_tsc_unstable
(
"TSC halts in idle"
);
tsc_marked_unstable
=
1
;
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
();
local_irq_disable
();
cpu
=
smp_processor_id
();
cpu
=
smp_processor_id
();
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_ENTER
,
if
(
lapic_marked_unstable
)
&
cpu
);
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_ENTER
,
&
cpu
);
stop_critical_timings
();
stop_critical_timings
();
__monitor
((
void
*
)
&
current_thread_info
()
->
flags
,
0
,
0
);
__monitor
((
void
*
)
&
current_thread_info
()
->
flags
,
0
,
0
);
...
@@ -192,8 +203,9 @@ static int power_saving_thread(void *data)
...
@@ -192,8 +203,9 @@ static int power_saving_thread(void *data)
__mwait
(
power_saving_mwait_eax
,
1
);
__mwait
(
power_saving_mwait_eax
,
1
);
start_critical_timings
();
start_critical_timings
();
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_EXIT
,
if
(
lapic_marked_unstable
)
&
cpu
);
clockevents_notify
(
CLOCK_EVT_NOTIFY_BROADCAST_EXIT
,
&
cpu
);
local_irq_enable
();
local_irq_enable
();
if
(
jiffies
>
expire_time
)
{
if
(
jiffies
>
expire_time
)
{
...
...
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