Fix not loading acpi-cpufreq driver regression
PATCH 1/1 Fix not loading acpi-cpufreq driver regression
ACPI processor: Only blindly return apic id 0 for real UP systems
This fixes a "not loading acpi-cpufreq driver" regression introduced by git commit d640113fe80e45ebd4a5b4 on SMP systems where the processor core with ACPI id zero is disabled
(typically should be the case because of hyperthreading). The regression got spread through stable kernels.
On 3.0.X it got introduced via 3.0.18.
Such platforms may be rare, but do exist. This problem has been observed on a:
HP Proliant BL280c G6 blade
This patch restricts the introduced workaround to platforms with nr_cpu_ids <= 1.
--- drivers/acpi/processor_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/acpi/processor_core.c +4 -2
@@ -201,10 +201,12 @@ int acpi_get_cpuid(acpi_handle handle, i* Processor (CPU3, 0x03, 0x00000410, 0x06) {} * } * -* Ignores apic_id and always return 0 for CPU0's handle. +* Ignores apic_id and always returns 0 for the processor +* handle with apic id 0 if nr_cpu_ids is 1. +* This should be the case if SMP tables are not found. * Return -1 for other CPU's handle. */ -if (acpi_id ==0 ) +if (nr_cpu_ids <=1 && acpi_id ==0 )return acpi_id;else return apic_id;
Quoted 9 lines · Thomas Renninger
ACPI processor: Only blindly return apic id 0 for real UP systems
This fixes a "not loading acpi-cpufreq driver" regression introduced by git commit
d640113fe80e45ebd4a5b4on SMP systems where the processor core with ACPI id zero is disabled
(typically should be the case because of hyperthreading). The regression got spread through stable kernels.
On 3.0.X it got introduced via 3.0.18.
Quoted 5 lines
Such platforms may be rare, but do exist. This problem has been observed on a:
HP Proliant BL280c G6 blade
This patch restricts the introduced workaround to platforms withnr_cpu_ids<= 1.
Wallak:
Can you give this patch a try and double check whether things still work for you.
If I understand it correctly you tried a UP compiled kernel? On this one I expect nr_cpu_ids to be statically set to 1 and the patch should be fine for you.
The only other candidate I can think of which needs this, are platforms with only 1 core available and no SMP APIC/ACPI mapping table, but a
Processor (...)
ACPI object.
Those should also still be covered with my patch.
Thanks,
Thomas
Quoted 9 lines · Thomas Renninger
ACPI processor: Only blindly return apic id 0 for real UP systems
This fixes a "not loading acpi-cpufreq driver" regression introduced by git commit
d640113fe80e45ebd4a5b4on SMP systems where the processor core with ACPI id zero is disabled
(typically should be the case because of hyperthreading). The regression got spread through stable kernels.
On 3.0.X it got introduced via 3.0.18.
Quoted 5 lines
Such platforms may be rare, but do exist. This problem has been observed on a:
HP Proliant BL280c G6 blade
This patch restricts the introduced workaround to platforms withnr_cpu_ids<= 1.
This is not the correct way to submit a patch to stable. See Documentation/stable_kernel_rules.txt.
Also, patches to mainline should be made against mainline, not the distribution branch you have to hand.
[...]
drivers/acpi/processor_core.c int acpi_get_cpuid(acpi_handle handle, i · line 206
Quoted 4 lines
drivers/acpi/processor_core.c +3
-1-* Ignores apic_id and always return 0 for CPU0's handle. +* Ignores apic_id and always returns 0 for the processor +* handle with apic id 0 if nr_cpu_ids is 1. +* This should be the case if SMP tables are not found.
[...]
Second 'apic id' should be 'acpi_id'.
Ben.
Signature · 3 lines
Ben Hutchings
Lowery's Law:
If it jams, force it. If it breaks, it needed replacing anyway....
Quoted 8 lines
Quoted 5 lines
Such platforms may be rare, but do exist. This problem has been observed on a:
HP Proliant BL280c G6 blade
This patch restricts the introduced workaround to platforms withnr_cpu_ids<= 1.This is not the correct way to submit a patch to stable. See
Documentation/stable_kernel_rules.txt.
I guess I should add
CC: [email protected]
in the signed-off area, not in the mail header?
Quoted 2 lines
Also, patches to mainline should be made against mainline, not the distribution branch you have to hand.
Wow, the diff patched with offset only against a reasonable recent kernel (3.5-rcX). But yes: It does not anymore after doing a git pull. I'll resend.
Quoted 9 lines
[...]
drivers/acpi/processor_core.c int acpi_get_cpuid(acpi_handle handle, i · line 206
Quoted 4 lines
drivers/acpi/processor_core.c +3
-1-* Ignores apic_id and always return 0 for CPU0's handle. +* Ignores apic_id and always returns 0 for the processor +* handle with apic id 0 if nr_cpu_ids is 1. +* This should be the case if SMP tables are not found. [...]
Second 'apic id' should be '
acpi_id'.
Correct.
Thanks,
Thomas
Quoted 7 lines · Thomas Renninger
...
Quoted 6 lines
Quoted 5 lines
Such platforms may be rare, but do exist. This problem has been observed on a:
HP Proliant BL280c G6 blade
This patch restricts the introduced workaround to platforms withnr_cpu_ids<= 1.
Quoted 5 lines
Quoted 2 lines
This is not the correct way to submit a patch to stable. See
Documentation/stable_kernel_rules.txt.I guess I should add
CC: [email protected]
in the signed-off area, not in the mail header?
[...]
Right. You may put it in the mail header, but it *must* be in the commit message so that it can be picked up after it lands in Linus's tree.
Ben.
Signature · 3 lines
Ben Hutchings
Lowery's Law:
If it jams, force it. If it breaks, it needed replacing anyway.Re: [PATCH] Fix not loading acpi-cpufreq driver regression - V2
In reply to Thomas RenningerACPI processor: Only blindly return apic id 0 for real UP systems
Commit d640113fe80e45ebd4a5b420b introduced a regression on SMP systems where the processor core with ACPI id zero is disabled (typically should be the case because of hyperthreading). The regression got spread through stable kernels.
On 3.0.X it got introduced via 3.0.18.
Such platforms may be rare, but do exist.
Look out for a disabled processor with acpi_id 0 in dmesg:
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x10] disabled)
This problem has been observed on a:
HP Proliant BL280c G6 blade
This patch restricts the introduced workaround to platforms with nr_cpu_ids <= 1.
--- drivers/acpi/processor_core.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/acpi/processor_core.c +4 -2
@@ -189,10 +189,12 @@ int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id)* Processor (CPU3, 0x03, 0x00000410, 0x06) {} * } * -* Ignores apic_id and always return 0 for CPU0's handle. +* Ignores apic_id and always returns 0 for the processor +* handle with acpi id 0 if nr_cpu_ids is 1. +* This should be the case if SMP tables are not found. * Return -1 for other CPU's handle. */ -if (acpi_id ==0 ) +if (nr_cpu_ids <=1 && acpi_id ==0 )return acpi_id;else return apic_id;
Re: [PATCH] Fix not loading acpi-cpufreq driver regression - V2
Hi,
Quoted 1 line · Thomas Renninger
ACPI processor: Only blindly return apic id 0 for real UP systems
what is the state here?
I expect it needs to go mainline (3.5-rc6?) via Len first before showing up in stable?
Len: Can you push this one please, it fixes a regression which got spread through stable kernels.
Thanks,
Thomas
Quoted 17 lines
Commit
d640113fe80e45ebd4a5b420bintroduced a regression on SMP systems where the processor core with ACPI id zero is disabled (typically should be the case because of hyperthreading). The regression got spread through stable kernels.
On 3.0.X it got introduced via 3.0.18.Such platforms may be rare, but do exist.
Look out for a disabled processor withacpi_id0 in dmesg:
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x10] disabled)This problem has been observed on a:
HP Proliant BL280c G6 bladeThis patch restricts the introduced workaround to platforms with
nr_cpu_ids<= 1.
Review
Quoted 8 lines
Signed-off-by Thomas Renninger <[email protected]>--- drivers/acpi/processor_core.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/acpi/processor_core.c
drivers/acpi/processor_core.c int acpi_get_cpuid(acpi_handle handle, int type,
Quoted 4 lines
index c850de4..eff7222 100644
drivers/acpi/processor_core.c +0
-0@@ -189,10 +189,12 @@ int acpi_get_cpuid(acpi_handle handle, int type,
u32 acpi_id)
Quoted 15 lines
drivers/acpi/processor_core.c +4
-2* Processor (CPU3, 0x03, 0x00000410, 0x06) {} * } * -* Ignores apic_id and always return 0 for CPU0's handle. +* Ignores apic_id and always returns 0 for the processor +* handle with acpi id 0 if nr_cpu_ids is 1. +* This should be the case if SMP tables are not found. * Return -1 for other CPU's handle. */ -if (acpi_id ==0 ) +if (nr_cpu_ids <=1 && acpi_id ==0 )return acpi_id;else return apic_id;