Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31448
b: refs/heads/master
c: a3c6598
h: refs/heads/master
v: v3
  • Loading branch information
Dominik Brodowski authored and Len Brown committed Jun 28, 2006
1 parent e5c7b8c commit 06c839c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 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: a51a69c0ed955f4fa6f64b4377378c744f9b737b
refs/heads/master: a3c6598f92cf27d3d201a2a5b052563148156837
7 changes: 2 additions & 5 deletions trunk/drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static int acpi_ec_intr_wait(union acpi_ec *ec, unsigned int event)

switch (event) {
case ACPI_EC_EVENT_IBE:
if (~acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) {
if (~acpi_ec_read_status(ec) & event) {
ec->intr.expect_event = 0;
return 0;
}
Expand Down Expand Up @@ -782,15 +782,12 @@ static u32 acpi_ec_gpe_intr_handler(void *data)
case ACPI_EC_EVENT_OBF:
if (!(value & ACPI_EC_FLAG_OBF))
break;
ec->intr.expect_event = 0;
wake_up(&ec->intr.wait);
break;
case ACPI_EC_EVENT_IBE:
if ((value & ACPI_EC_FLAG_IBF))
break;
ec->intr.expect_event = 0;
wake_up(&ec->intr.wait);
break;
return ACPI_INTERRUPT_HANDLED;
default:
break;
}
Expand Down
19 changes: 8 additions & 11 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ static int set_max_cstate(struct dmi_system_id *id)
/* Actually this shouldn't be __cpuinitdata, would be better to fix the
callers to only run once -AK */
static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = {
{ set_max_cstate, "IBM ThinkPad R40e", {
DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
DMI_MATCH(DMI_BIOS_VERSION,"1SET70WW")}, (void *)1},
{ set_max_cstate, "IBM ThinkPad R40e", {
DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW")}, (void *)1},
Expand Down Expand Up @@ -325,8 +322,6 @@ static void acpi_processor_idle(void)
cx = &pr->power.states[ACPI_STATE_C1];
#endif

cx->usage++;

/*
* Sleep:
* ------
Expand Down Expand Up @@ -368,9 +363,7 @@ static void acpi_processor_idle(void)
t1 = inl(acpi_fadt.xpm_tmr_blk.address);
/* Invoke C2 */
inb(cx->address);
/* Dummy wait op - must do something useless after P_LVL2 read
because chipsets cannot guarantee that STPCLK# signal
gets asserted in time to freeze execution properly. */
/* Dummy op - must do something useless after P_LVL2 read */
t2 = inl(acpi_fadt.xpm_tmr_blk.address);
/* Get end time (ticks) */
t2 = inl(acpi_fadt.xpm_tmr_blk.address);
Expand Down Expand Up @@ -408,7 +401,7 @@ static void acpi_processor_idle(void)
t1 = inl(acpi_fadt.xpm_tmr_blk.address);
/* Invoke C3 */
inb(cx->address);
/* Dummy wait op (see above) */
/* Dummy op - must do something useless after P_LVL3 read */
t2 = inl(acpi_fadt.xpm_tmr_blk.address);
/* Get end time (ticks) */
t2 = inl(acpi_fadt.xpm_tmr_blk.address);
Expand All @@ -435,6 +428,9 @@ static void acpi_processor_idle(void)
local_irq_enable();
return;
}
cx->usage++;
if ((cx->type != ACPI_STATE_C1) && (sleep_ticks > 0))
cx->time += sleep_ticks;

next_state = pr->power.state;

Expand Down Expand Up @@ -1058,9 +1054,10 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
else
seq_puts(seq, "demotion[--] ");

seq_printf(seq, "latency[%03d] usage[%08d]\n",
seq_printf(seq, "latency[%03d] usage[%08d] duration[%020llu]\n",
pr->power.states[i].latency,
pr->power.states[i].usage);
pr->power.states[i].usage,
pr->power.states[i].time);
}

end:
Expand Down
1 change: 1 addition & 0 deletions trunk/include/acpi/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ struct acpi_processor_cx {
u32 latency_ticks;
u32 power;
u32 usage;
u64 time;
struct acpi_processor_cx_policy promotion;
struct acpi_processor_cx_policy demotion;
};
Expand Down

0 comments on commit 06c839c

Please sign in to comment.