Re: [PATCH RESEND] x86: Fix sibling map with NumaChip

Borislav Petkov
2015-03-03T16:30:56Z

On Tue, Mar 03, 2015 at 11:18:13PM +0800, Daniel J Blueman wrote:
> @@ -180,11 +180,15 @@ static int __init numachip_probe(void)
>
> static void fixup_cpu_id(struct cpuinfo_x86 *c, int node)
> {
> -
> - if (c->phys_proc_id != node) {
> - c->phys_proc_id = node;
> - per_cpu(cpu_llc_id, smp_processor_id()) = node;
> - }
> + u64 val;
> + u32 nodes;
> +
> + per_cpu(cpu_llc_id, smp_processor_id()) = node;
> +
> + /* Account for nodes per socket in multi-core-module processors */
> + rdmsrl(MSR_FAM10H_NODE_ID, val);

You need to check a CPUID bit before accessing that MSR, see
amd_get_topology(). get_apic_id() in apic_numachip.c should be corrected
too.

Thanks.

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--