Commit f27b4a2f authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Tim Gardner
Browse files

x86/topology: Fix logical package mapping

BugLink: http://bugs.launchpad.net/bugs/1570441



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: 1f12e32f ("x86/topology: Create logical package id")
Reported-by: default avatarXiong Zhou <jencce.kernel@gmail.com>
Signed-off-by: default avatarPeter 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: default avatarThomas Gleixner <tglx@linutronix.de>

(cherry picked from commit b5d5f27d)
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarColin King <colin.king@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent a6915829
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment