From: Daniel J Blueman Date: Tue, 4 Nov 2014 08:29:41 +0000 (+0800) Subject: x86: numachip: Fix 16-bit APIC ID truncation X-Git-Tag: v3.19-rc1~148^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00e7977dd1bbd46e336d7ef907d0fb6b6a4c294f;p=thirdparty%2Fkernel%2Flinux.git x86: numachip: Fix 16-bit APIC ID truncation Prevent 16-bit APIC IDs being truncated by using correct mask. This fixes booting large systems, where the wrong core would receive the startup and init IPIs, causing hanging. Signed-off-by: Daniel J Blueman Cc: Steffen Persvold Cc: Bjorn Helgaas Link: http://lkml.kernel.org/r/1415089784-28779-1-git-send-email-daniel@numascale.com Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/kernel/apic/apic_numachip.c b/arch/x86/kernel/apic/apic_numachip.c index 4128b5fcb559f..2aaee79fb1291 100644 --- a/arch/x86/kernel/apic/apic_numachip.c +++ b/arch/x86/kernel/apic/apic_numachip.c @@ -40,7 +40,7 @@ static unsigned int get_apic_id(unsigned long x) unsigned int id; rdmsrl(MSR_FAM10H_NODE_ID, value); - id = ((x >> 24) & 0xffU) | ((value << 2) & 0x3f00U); + id = ((x >> 24) & 0xffU) | ((value << 2) & 0xff00U); return id; }