ACPI patches for 2.6.25-rc7
Subsystems (4)
Len Brown
reviewerHere is the queue for 2.6.25-rc7
thanks,
-Len
Len Brown
reviewerPATCH 1/6 ACPI: SBS: remove typo from sbchc.c
From: Alexey Starikovskiy <[email protected]>
--- drivers/acpi/sbshc.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/acpi/sbshc.c +0 -1
@@ -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)
Signature · 1 line
1.5.5.rc1.6.g5cc8f
Len Brown
reviewerPATCH 2/6 ACPI: fix Medion _PRT quirk (use "ISA_", not "ISA")
In reply to Len BrownFrom: Bjorn Helgaas <[email protected]>
This fixes the builtin RTL8139 NIC on the Medion MD9580-F laptop. The BIOS reports the interrupt routing incorrectly. I recently added a quirk to work around this, and this patch fixes a typo in the quirk.
We pad every ACPI pathname component to four characters, so ".ISA." will never match anything. We need ".ISA_." instead.
Thank you Johann-Nikolaus Andreae for patiently testing this patch.
See http://bugzilla.kernel.org/show_bug.cgi?id=4773
--- drivers/acpi/pci_irq.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/pci_irq.c +2 -2
@@ -131,8 +131,8 @@ struct prt_quirk {*/ static struct prt_quirk prt_quirks[] = { { medion_md9580,0 ,0 ,9 ,'A' , -"\\_SB_.PCI0.ISA.LNKA" , -"\\_SB_.PCI0.ISA.LNKB" }, +"\\_SB_.PCI0.ISA_.LNKA" , +"\\_SB_.PCI0.ISA_.LNKB" }, { dell_optiplex,0 ,0 ,0xd ,'A' ,"\\_SB_.LNKB" ,"\\_SB_.LNKA" },
Signature · 1 line
1.5.5.rc1.6.g5cc8f
Re: [PATCH 2/6] ACPI: fix Medion _PRT quirk (use "ISA_", not "ISA")
Quoted 6 lines · Len Brown
From: Bjorn Helgaas <[email protected]>
This fixes the builtin RTL8139 NIC on the Medion MD9580-F laptop. The BIOS reports the interrupt routing incorrectly. I recently added a quirk to work around this, and this patch fixes a typo in the quirk.
Quoted 6 lines
We pad every ACPI pathname component to four characters, so ".ISA." will never match anything. We need ".ISA_." instead.
Thank you Johann-Nikolaus Andreae for patiently testing this patch.
This seems to have been applied already:
Quoted 13 lines
Signed-off-by Bjorn Helgaas <[email protected]>Cc Johann-Nikolaus Andreae <[email protected]>Signed-off-by Andrew Morton <[email protected]>Signed-off-by Len Brown <[email protected]>--- drivers/acpi/pci_irq.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/acpi/pci_irq.c +0
-0
drivers/acpi/pci_irq.c struct prt_quirk { · line 138
Quoted 10 lines
drivers/acpi/pci_irq.c +2
-2@@ -131,8 +131,8 @@ struct prt_quirk {*/ static struct prt_quirk prt_quirks[] = { { medion_md9580,0 ,0 ,9 ,'A' , -"\\_SB_.PCI0.ISA.LNKA" , -"\\_SB_.PCI0.ISA.LNKB" }, +"\\_SB_.PCI0.ISA_.LNKA" , +"\\_SB_.PCI0.ISA_.LNKB" }, { dell_optiplex,0 ,0 ,0xd ,'A' ,"\\_SB_.LNKB" ,"\\_SB_.LNKA" },
Thanks,
Rafael
Len Brown
reviewerPATCH 3/6 ACPI: fix a regression of ACPI device driver autoloading
In reply to Len BrownFrom: Zhang Rui <[email protected]>
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:"
--- drivers/acpi/scan.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-)
drivers/acpi/scan.c +12 -6
@@ -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++) {
Signature · 1 line
1.5.5.rc1.6.g5cc8f
Len Brown
reviewerPATCH 4/6 ACPI: fix mis-merge -- invoke acpi_unlazy_tlb() only on C3 entry
In reply to Len BrownFrom: Venki Pallipadi <[email protected]>
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().
--- drivers/acpi/processor_idle.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/acpi/processor_idle.c +2 -1
@@ -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 ();/*
Signature · 1 line
1.5.5.rc1.6.g5cc8f
Len Brown
reviewerPATCH 5/6 cpuidle: fix cpuidle time and usage overflow
In reply to Len BrownFrom: Yi Yang <[email protected]>
cpuidle C-state sysfs node time and usage are very easy to overflow because they are all of unsigned int type, time will overflow within about two hours, usage will take longer time to overflow, but they are increasing for ever.
This patch will convert them to unsigned long long.
--- drivers/cpuidle/cpuidle.c | 2 +- drivers/cpuidle/sysfs.c | 10 ++++++++-- include/linux/cpuidle.h | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-)
drivers/cpuidle/cpuidle.c +1 -1
@@ -67,7 +67,7 @@ static void cpuidle_idle_call(void)/* enter the state and update stats */ dev->last_residency = target_state->enter (dev, target_state); dev->last_state = target_state; - target_state->time += dev->last_residency; + target_state->time += (unsigned long long )dev->last_residency; target_state->usage++;/* give the governor an opportunity to reflect on the outcome */
drivers/cpuidle/sysfs.c +8 -2
@@ -218,6 +218,12 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \return sprintf (buf,"%u\n" , state->_name);\ } +#define define_show_state_ull_function (_name) \ +static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \ +{ \ + return sprintf(buf, "%llu\n", state->_name);\ +} +#define define_show_state_str_function (_name) \ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \ { \
@@ -228,8 +234,8 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \ define_show_state_function(exit_latency) define_show_state_function(power_usage) -define_show_state_function(usage) -define_show_state_function(time) +define_show_state_ull_function(usage) +define_show_state_ull_function(time) define_show_state_str_function(name) define_show_state_str_function(desc)
include/linux/cpuidle.h +2 -2
@@ -38,8 +38,8 @@ struct cpuidle_state {unsigned int power_usage;/* in mW */ unsigned int target_residency;/* in US */ -unsigned int usage; -unsigned int time;/* in US */ +unsigned long long usage; +unsigned long long time;/* in US */ int (*enter) (struct cpuidle_device *dev,struct cpuidle_state *state);
Signature · 1 line
1.5.5.rc1.6.g5cc8f
Len Brown
reviewerPATCH 6/6 cpuidle: fix 100% C0 statistics regression
In reply to Len BrownFrom: Venki Pallipadi <[email protected]>
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.
--- drivers/acpi/processor_idle.c | 4 +++- drivers/cpuidle/cpuidle.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/acpi/processor_idle.c +3 -1
@@ -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 ;
drivers/cpuidle/cpuidle.c +1 -1
@@ -224,7 +224,7 @@ static void poll_idle_init(struct cpuidle_device *dev) state->exit_latency =0 ; state->target_residency =0 ; state->power_usage =-1 ; - state->flags =CPUIDLE_FLAG_POLL |CPUIDLE_FLAG_TIME_VALID ; + state->flags =CPUIDLE_FLAG_POLL ; state->enter = poll_idle; }#else
Signature · 1 line
1.5.5.rc1.6.g5cc8f
Len Brown
reviewer[PATCH 7/6] pnpacpi: reduce printk severity for "pnpacpi: exceeded the max number of ..."
In reply to Len BrownFrom: Len Brown <[email protected]>
We have been printing these messages at KERN_ERR since 2.6.24, per http://bugzilla.kernel.org/show_bug.cgi?id=9535
But KERN_ERR pops up on a console booted with "quiet" and causes users to get alarmed and file bugs about the message itself:
https://bugzilla.redhat.com/show_bug.cgi?id=436589
So reduce the severity of these messages to KERN_WARNING, which is not printed by "quiet".
This message will still be seen without "quiet", but a lot of messages are printed in that mode and it will be less likely to cause undue alarm.
We could go all the way to KERN_DEBUG, but this is a real warning after all, so it seems prudent not to require "debug" to see it.
--- drivers/pnp/pnpacpi/rsparser.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/pnp/pnpacpi/rsparser.c +4 -4
@@ -85,7 +85,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, i < PNP_MAX_IRQ) i++;if (i >=PNP_MAX_IRQ && !warned) { -printk (KERN_ERR "pnpacpi: exceeded the max number of IRQ " +printk (KERN_WARNING "pnpacpi: exceeded the max number of IRQ " "resources: %d \n" ,PNP_MAX_IRQ ); warned =1 ;return ;
@@ -187,7 +187,7 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res, res->dma_resource[i].start = dma; res->dma_resource[i].end = dma; }else if (!warned) { -printk (KERN_ERR "pnpacpi: exceeded the max number of DMA " +printk (KERN_WARNING "pnpacpi: exceeded the max number of DMA " "resources: %d \n" ,PNP_MAX_DMA ); warned =1 ; }
@@ -213,7 +213,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res, res->port_resource[i].start = io; res->port_resource[i].end = io + len -1 ; }else if (!warned) { -printk (KERN_ERR "pnpacpi: exceeded the max number of IO " +printk (KERN_WARNING "pnpacpi: exceeded the max number of IO " "resources: %d \n" ,PNP_MAX_PORT ); warned =1 ; }
@@ -241,7 +241,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res, res->mem_resource[i].start = mem; res->mem_resource[i].end = mem + len -1 ; }else if (!warned) { -printk (KERN_ERR "pnpacpi: exceeded the max number of mem " +printk (KERN_WARNING "pnpacpi: exceeded the max number of mem " "resources: %d\n" ,PNP_MAX_MEM ); warned =1 ; }
Signature · 1 line
1.5.5.rc1.6.g5cc8f