x86/apic/numachip: Fix sibling map with NumaChip
authorDaniel J Blueman <daniel@numascale.com>
Thu, 12 Mar 2015 15:55:13 +0000 (16:55 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 12 Mar 2015 15:58:59 +0000 (16:58 +0100)
commitc8a470cab030bae8f9e6e5cfff72b047b7c627a7
tree4c6cadb039612253b8edeaed83757138fcced523
parent7486341a98f26857f383aec88ffa10950087c3a1
x86/apic/numachip: Fix sibling map with NumaChip

On NumaChip systems, the physical processor ID assignment wasn't
accounting for the number of nodes in AMD multi-module
processors, giving an incorrect sibling map:

  $ cd /sys/devices/system/cpu/cpu29/topology
  $ grep . *
  core_id:5
  core_siblings:00000000,ff000000
  core_siblings_list:24-31
  physical_package_id:3
  thread_siblings:00000000,30000000
  thread_siblings_list:28-29

This fixes it:

  $ cd /sys/devices/system/cpu/cpu29/topology
  $ grep . *
  core_id:5
  core_siblings:00000000,ffff0000
  core_siblings_list:16-31
  physical_package_id:1
  thread_siblings:00000000,30000000
  thread_siblings_list:28-29

Signed-off-by: Daniel J Blueman <daniel@numascale.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Steffen Persvold <sp@numascale.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1426135950-10110-1-git-send-email-daniel@numascale.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/apic/apic_numachip.c