Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145060
b: refs/heads/master
c: 520daf7
h: refs/heads/master
v: v3
  • Loading branch information
Len Brown committed May 16, 2009
1 parent e08a24f commit 7e1e56d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 29321357ac6db54eeb8574da1f6c3e0ce8cfbb60
refs/heads/master: 520daf7217bc1806c02eb4cfa7805447a3da2f66
17 changes: 9 additions & 8 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ int acpi_processor_resume(struct acpi_device * device)
}

#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
static int tsc_halts_in_c(int state)
static void tsc_check_state(int state)
{
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_AMD:
Expand All @@ -226,13 +226,17 @@ static int tsc_halts_in_c(int state)
* C/P/S0/S1 states when this bit is set.
*/
if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC))
return 0;
return;

/*FALL THROUGH*/
default:
return state > ACPI_STATE_C1;
/* TSC could halt in idle, so notify users */
if (state > ACPI_STATE_C1)
mark_tsc_unstable("TSC halts in idle");
}
}
#else
static void tsc_check_state(int state) { return; }
#endif

static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
Expand Down Expand Up @@ -581,11 +585,6 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
struct acpi_processor_cx *cx = &pr->power.states[i];

#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
/* TSC could halt in idle, so notify users */
if (tsc_halts_in_c(cx->type))
mark_tsc_unstable("TSC halts in idle");;
#endif
switch (cx->type) {
case ACPI_STATE_C1:
cx->valid = 1;
Expand All @@ -603,6 +602,8 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
acpi_timer_check_state(i, pr, cx);
break;
}
if (cx->valid)
tsc_check_state(cx->type);

if (cx->valid)
working++;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/thermal/thermal_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)

switch (trip_type) {
case THERMAL_TRIP_CRITICAL:
if (temp >= trip_temp) {
if (temp > trip_temp) {
if (tz->ops->notify)
ret = tz->ops->notify(tz, count,
trip_type);
Expand All @@ -974,7 +974,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
}
break;
case THERMAL_TRIP_HOT:
if (temp >= trip_temp)
if (temp > trip_temp)
if (tz->ops->notify)
tz->ops->notify(tz, count, trip_type);
break;
Expand All @@ -986,14 +986,14 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)

cdev = instance->cdev;

if (temp >= trip_temp)
if (temp > trip_temp)
cdev->ops->set_cur_state(cdev, 1);
else
cdev->ops->set_cur_state(cdev, 0);
}
break;
case THERMAL_TRIP_PASSIVE:
if (temp >= trip_temp || tz->passive)
if (temp > trip_temp || tz->passive)
thermal_zone_device_passive(tz, temp,
trip_temp, count);
break;
Expand Down

0 comments on commit 7e1e56d

Please sign in to comment.