From 7642d2113098f1270e9f9f0120f44d0035091636 Mon Sep 17 00:00:00 2001 From: Alexey Starikovskiy Date: Thu, 28 Feb 2008 19:17:39 +0300 Subject: ACPI: SBS: remove typo from sbchc.c Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown --- drivers/acpi/sbshc.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c index a2cf3008ce6..bcf2c70fca8 100644 --- a/drivers/acpi/sbshc.c +++ b/drivers/acpi/sbshc.c @@ -130,7 +130,6 @@ static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol, goto end; } smb_hc_write(hc, ACPI_SMB_COMMAND, command); - smb_hc_write(hc, ACPI_SMB_COMMAND, command); if (!(protocol & 0x01)) { smb_hc_write(hc, ACPI_SMB_BLOCK_COUNT, length); for (i = 0; i < length; ++i) -- cgit v1.2.3 From 5c9fcb5deef4d3a49798d76c48b726d2e3c7df72 Mon Sep 17 00:00:00 2001 From: Zhang Rui Date: Thu, 20 Mar 2008 16:40:32 +0800 Subject: ACPI: fix a regression of ACPI device driver autoloading commit 3620f2f2f39e7870cf1a4fb2e34063a142f28716 sets the cid of ACPI video/dock/bay device and leaves the hid empty. As a result, "modalias" should export the cid for devices which don't have a hid. ACPI Video driver is not autoloaded with commit 3620f2f2f39e7870cf1a4fb2e34063a142f28716 applied. "cat /sys/.../device:03(acpi video bus)/modalias" shows nothing. ACPI Video driver is autoloaded after revert that commit. "cat /sys/.../LNXVIDEO:0x/modalias" shows "acpi:LNXVIDEO:" ACPI Video driver is autoloaded with commit 3620f2f2f39e7870cf1a4fb2e34063a142f28716 and this patch applied. "cat /sys/.../device:03(acpi video bus)/modalias" shows "acpi:LNXVIDEO:" Signed-off-by: Zhang Rui Acked-by: Thomas Renninger Signed-off-by: Len Brown --- drivers/acpi/scan.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 57570ac4780..e6ce262b5d4 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -39,20 +39,26 @@ static int create_modalias(struct acpi_device *acpi_dev, char *modalias, int size) { int len; + int count; - if (!acpi_dev->flags.hardware_id) + if (!acpi_dev->flags.hardware_id && !acpi_dev->flags.compatible_ids) return -ENODEV; - len = snprintf(modalias, size, "acpi:%s:", - acpi_dev->pnp.hardware_id); - if (len < 0 || len >= size) - return -EINVAL; + len = snprintf(modalias, size, "acpi:"); size -= len; + if (acpi_dev->flags.hardware_id) { + count = snprintf(&modalias[len], size, "%s:", + acpi_dev->pnp.hardware_id); + if (count < 0 || count >= size) + return -EINVAL; + len += count; + size -= count; + } + if (acpi_dev->flags.compatible_ids) { struct acpi_compatible_id_list *cid_list; int i; - int count; cid_list = acpi_dev->pnp.cid_list; for (i = 0; i < cid_list->count; i++) { -- cgit v1.2.3 From 996520c1fdd2948addb629be56c9febf2967e02b Mon Sep 17 00:00:00 2001 From: Venki Pallipadi Date: Mon, 24 Mar 2008 14:24:10 -0700 Subject: ACPI: fix mis-merge -- invoke acpi_unlazy_tlb() only on C3 entry This original patch http://ussg.iu.edu/hypermail/linux/kernel/0712.2/1451.html was intending to add acpi_unlazy_tlb() to acpi_idle_enter_bm(), which is used for C3 entry. But it was merged incorrectly as commmit bde6f5f59c2b2b48a7a849c129d5b48838fe77ee 'x86: voluntary leave_mm before entering ACPI C3' so the call was instead added to acpi_idle_enter_simple() (which is C2 entry routine), probably due to identical context in that function. Move the call back to acpi_idle_enter_bm(). Signed-off-by: Venkatesh Pallipadi Signed-off-by: Len Brown --- drivers/acpi/processor_idle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index e8e2d886923..1468f1e92ca 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -1487,7 +1487,6 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, return 0; } - acpi_unlazy_tlb(smp_processor_id()); /* * Must be done before busmaster disable as we might need to * access HPET ! @@ -1577,6 +1576,8 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, return 0; } + acpi_unlazy_tlb(smp_processor_id()); + /* Tell the scheduler that we are going deep-idle: */ sched_clock_idle_sleep_event(); /* -- cgit v1.2.3 From 8e92b6605da989c0aa8ff7e33306f36f0efd957c Mon Sep 17 00:00:00 2001 From: Venki Pallipadi Date: Fri, 29 Feb 2008 10:24:32 -0800 Subject: cpuidle: fix 100% C0 statistics regression commit 9b12e18cdc1553de62d931e73443c806347cd974 'ACPI: cpuidle: Support C1 idle time accounting' was implicated in a 100% C0 idle regression. http://bugzilla.kernel.org/show_bug.cgi?id=10076 It pointed out a potential problem where the menu governor may get confused by the C-state residency time from poll idle or C1 idle, where this timing info is not accurate. This inaccuracy is due to interrupts being handled before we account for C-state exit. Do not mark TIME_VALID for CO poll state. Mark C1 time as valid only with the MWAIT (CSTATE_FFH) entry method. This makes governors use the timing information only when it is correct and eliminates any wrong policy decisions that may result from invalid timing information. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Len Brown --- drivers/acpi/processor_idle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 1468f1e92ca..788da9781f8 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -1693,7 +1693,9 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) switch (cx->type) { case ACPI_STATE_C1: state->flags |= CPUIDLE_FLAG_SHALLOW; - state->flags |= CPUIDLE_FLAG_TIME_VALID; + if (cx->entry_method == ACPI_CSTATE_FFH) + state->flags |= CPUIDLE_FLAG_TIME_VALID; + state->enter = acpi_idle_enter_c1; dev->safe_state = state; break; -- cgit v1.2.3