Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / x86 / kernel / cpu / perf_event_intel_uncore.c
index d0f9e5aa2151ba320986546fe024c2995f9d0b24..52441a2af5380d1d44bbee24001b81ea63d53362 100644 (file)
@@ -3093,7 +3093,7 @@ static void __init uncore_types_exit(struct intel_uncore_type **types)
 static int __init uncore_type_init(struct intel_uncore_type *type)
 {
        struct intel_uncore_pmu *pmus;
-       struct attribute_group *events_group;
+       struct attribute_group *attr_group;
        struct attribute **attrs;
        int i, j;
 
@@ -3120,19 +3120,19 @@ static int __init uncore_type_init(struct intel_uncore_type *type)
                while (type->event_descs[i].attr.attr.name)
                        i++;
 
-               events_group = kzalloc(sizeof(struct attribute *) * (i + 1) +
-                                       sizeof(*events_group), GFP_KERNEL);
-               if (!events_group)
+               attr_group = kzalloc(sizeof(struct attribute *) * (i + 1) +
+                                       sizeof(*attr_group), GFP_KERNEL);
+               if (!attr_group)
                        goto fail;
 
-               attrs = (struct attribute **)(events_group + 1);
-               events_group->name = "events";
-               events_group->attrs = attrs;
+               attrs = (struct attribute **)(attr_group + 1);
+               attr_group->name = "events";
+               attr_group->attrs = attrs;
 
                for (j = 0; j < i; j++)
                        attrs[j] = &type->event_descs[j].attr.attr;
 
-               type->events_group = events_group;
+               type->events_group = attr_group;
        }
 
        type->pmu_group = &uncore_pmu_attr_group;
@@ -3545,11 +3545,12 @@ static int __init uncore_cpu_init(void)
                msr_uncores = nhm_msr_uncores;
                break;
        case 42: /* Sandy Bridge */
+       case 58: /* Ivy Bridge */
                if (snb_uncore_cbox.num_boxes > max_cores)
                        snb_uncore_cbox.num_boxes = max_cores;
                msr_uncores = snb_msr_uncores;
                break;
-       case 45: /* Sandy Birdge-EP */
+       case 45: /* Sandy Bridge-EP */
                if (snbep_uncore_cbox.num_boxes > max_cores)
                        snbep_uncore_cbox.num_boxes = max_cores;
                msr_uncores = snbep_msr_uncores;