diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_uncore.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index 7d755d2e1c9c..4fecbd00ee75 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c | |||
@@ -1605,8 +1605,9 @@ static void __init uncore_cpu_setup(void *dummy) | |||
1605 | 1605 | ||
1606 | static int __init uncore_cpu_init(void) | 1606 | static int __init uncore_cpu_init(void) |
1607 | { | 1607 | { |
1608 | int ret, cpu; | 1608 | int ret, cpu, max_cores; |
1609 | 1609 | ||
1610 | max_cores = boot_cpu_data.x86_max_cores; | ||
1610 | switch (boot_cpu_data.x86_model) { | 1611 | switch (boot_cpu_data.x86_model) { |
1611 | case 26: /* Nehalem */ | 1612 | case 26: /* Nehalem */ |
1612 | case 30: | 1613 | case 30: |
@@ -1615,9 +1616,13 @@ static int __init uncore_cpu_init(void) | |||
1615 | msr_uncores = nhm_msr_uncores; | 1616 | msr_uncores = nhm_msr_uncores; |
1616 | break; | 1617 | break; |
1617 | case 42: /* Sandy Bridge */ | 1618 | case 42: /* Sandy Bridge */ |
1619 | if (snb_uncore_cbox.num_boxes > max_cores) | ||
1620 | snb_uncore_cbox.num_boxes = max_cores; | ||
1618 | msr_uncores = snb_msr_uncores; | 1621 | msr_uncores = snb_msr_uncores; |
1619 | break; | 1622 | break; |
1620 | case 45: /* Sandy Birdge-EP */ | 1623 | case 45: /* Sandy Birdge-EP */ |
1624 | if (snbep_uncore_cbox.num_boxes > max_cores) | ||
1625 | snbep_uncore_cbox.num_boxes = max_cores; | ||
1621 | msr_uncores = snbep_msr_uncores; | 1626 | msr_uncores = snbep_msr_uncores; |
1622 | break; | 1627 | break; |
1623 | default: | 1628 | default: |