summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/vsmp_64.c
diff options
context:
space:
mode:
authorYinghai Lu <Yinghai.Lu@Sun.COM>2008-02-24 21:36:28 -0800
committerIngo Molnar <mingo@elte.hu>2008-04-17 17:40:50 +0200
commitf8fffa458368ed3d57385698f775880db629bd1a (patch)
tree845bce35fea17284414d973a0fd0ea199d0947a6 /arch/x86/kernel/vsmp_64.c
parent34048c9e927d5ae29c6ba802c826370de2a046d2 (diff)
downloadop-kernel-dev-f8fffa458368ed3d57385698f775880db629bd1a.zip
op-kernel-dev-f8fffa458368ed3d57385698f775880db629bd1a.tar.gz
x86: apic_is_clustered_box for vsmp
quad core 8 socket system will have apic id lifting.the apic id range could be [4, 0x23]. and apic_is_clustered_box will think that need to three clusters and that is larger than 2. So it is treated as a clustered_box. and will get: Marking TSC unstable due to TSCs unsynchronized even if the CPUs have X86_FEATURE_CONSTANT_TSC set. this quick fix will check if the cpu is from AMD. but vsmp still needs that checking... this patch is fix to make sure that vsmp not to be passed. Signed-off-by: Yinghai Lu <yinghai.lu@sun.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/vsmp_64.c')
-rw-r--r--arch/x86/kernel/vsmp_64.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c
index 54202b1..a00961d 100644
--- a/arch/x86/kernel/vsmp_64.c
+++ b/arch/x86/kernel/vsmp_64.c
@@ -72,19 +72,34 @@ static unsigned __init vsmp_patch(u8 type, u16 clobbers, void *ibuf,
}
+static int vsmp = -1;
+
+int is_vsmp_box(void)
+{
+ if (vsmp != -1)
+ return vsmp;
+
+ vsmp = 0;
+ if (!early_pci_allowed())
+ return vsmp;
+
+ /* Check if we are running on a ScaleMP vSMP box */
+ if (read_pci_config(0, 0x1f, 0, PCI_VENDOR_ID) ==
+ (PCI_VENDOR_ID_SCALEMP || (PCI_DEVICE_ID_SCALEMP_VSMP_CTL << 16)))
+ vsmp = 1;
+
+ return vsmp;
+}
+
void __init vsmp_init(void)
{
void *address;
unsigned int cap, ctl, cfg;
- if (!early_pci_allowed())
+ if (!is_vsmp_box())
return;
- /* Check if we are running on a ScaleMP vSMP box */
- if ((read_pci_config_16(0, 0x1f, 0, PCI_VENDOR_ID) !=
- PCI_VENDOR_ID_SCALEMP) ||
- (read_pci_config_16(0, 0x1f, 0, PCI_DEVICE_ID) !=
- PCI_DEVICE_ID_SCALEMP_VSMP_CTL))
+ if (!early_pci_allowed())
return;
/* If we are, use the distinguished irq functions */
OpenPOWER on IntegriCloud