]> git.baikalelectronics.ru Git - kernel.git/commit
x86/topology: Fix logical package mapping
authorPeter Zijlstra <peterz@infradead.org>
Fri, 18 Mar 2016 15:03:46 +0000 (16:03 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 19 Mar 2016 09:26:40 +0000 (10:26 +0100)
commit58354ba9fa760a5cbd46d4578e9a9602e3c4bd7a
tree79298ddfe7f4f8a0a39f66b401d6ddb5bf856a71
parent20d0afa024a489b765bc587d754bab6bcac1edcd
x86/topology: Fix logical package mapping

That first branch testing pkg against __max_logical_packages is wrong,
because if the first pkg id is larger, then the find_first_zero will
find us logical package id 0. However, if the second pkg id is indeed
0, we'll again claim it without testing if it was already taken.

Also, it fails to print the mapping.

Fixes: daf1d64f67e1 ("x86/topology: Create logical package id")
Reported-by: Xiong Zhou <jencce.kernel@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: aherrmann@suse.com
Cc: bp@alien8.de
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
Link: http://lkml.kernel.org/r/20160317095220.GO6344@twins.programming.kicks-ass.net
Link: http://lkml.kernel.org/r/20160318150538.482393396@infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/smpboot.c