lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <200802210258.45011.yinghai.lu@sun.com>
Date:	Thu, 21 Feb 2008 02:58:44 -0800
From:	Yinghai Lu <Yinghai.Lu@....COM>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH] x86_64: make amd quad core 8 socket system not be clustered_box


quad core 8 socket system will have apic id lifting.the apic id range could
be [4, 0x23]. or [8, 0x27]. apic_is_clustered_box will think that need to three clusters
and that is large than 2. So it is treated as clustered_box.

and will get

Marking TSC unstable due to TSCs unsynchronized

even the CPUs have X86_FEATURE_CONSTANT_TSC set.

this patch offset back the apic before get apic clusterid.

or use dmi to get apic_is_clustered?

Signed-off-by: Yinghai Lu <yinghai.lu@....com>

diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 9b2be3d..5bdf1bc 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -1223,8 +1223,11 @@ __cpuinit int apic_is_clustered_box(void)
 		else
 			break;
 
-		if (id != BAD_APICID)
+		if (id != BAD_APICID) {
+			if (id >= boot_cpu_id)
+				id -= boot_cpu_id;
 			__set_bit(APIC_CLUSTERID(id), clustermap);
+		}
 	}
 
 	/* Problem:  Partially populated chassis may not have CPUs in some of
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ