projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db91e23
)
x86/apic: Fix num_processors value in case of failure
author
Dou Liyang
<
[email protected]
>
Wed, 7 Sep 2016 02:21:33 +0000
(10:21 +0800)
committer
Ingo Molnar
<
[email protected]
>
Thu, 8 Sep 2016 06:11:03 +0000
(08:11 +0200)
If the topology package map check of the APIC ID and the CPU is a failure,
we don't generate the processor info for that APIC ID yet we increase
disabled_cpus by one - which is buggy.
Only increase num_processors once we are sure we don't fail.
Signed-off-by: Dou Liyang <
[email protected]
>
Acked-by: David Rientjes <
[email protected]
>
Cc: Linus Torvalds <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Thomas Gleixner <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
[ Rewrote the changelog. ]
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/kernel/apic/apic.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/apic/apic.c
b/arch/x86/kernel/apic/apic.c
index 50c95af0f017d7ab73a5cad5dc226b1bf5d9cf60..f3e9b2df4b165d9d1a31322960778a2e9ef68bf3 100644
(file)
--- a/
arch/x86/kernel/apic/apic.c
+++ b/
arch/x86/kernel/apic/apic.c
@@
-2093,7
+2093,6
@@
int generic_processor_info(int apicid, int version)
return -EINVAL;
}
- num_processors++;
if (apicid == boot_cpu_physical_apicid) {
/*
* x86_bios_cpu_apicid is required to have processors listed
@@
-2116,10
+2115,13
@@
int generic_processor_info(int apicid, int version)
pr_warning("APIC: Package limit reached. Processor %d/0x%x ignored.\n",
thiscpu, apicid);
+
disabled_cpus++;
return -ENOSPC;
}
+ num_processors++;
+
/*
* Validate version
*/