]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/x86/kernel/cpu/common.c
perf/x86/mbm: Add Intel Memory B/W Monitoring enumeration and init
[mirror_ubuntu-artful-kernel.git] / arch / x86 / kernel / cpu / common.c
index 249461f958516a5a281af53532e771c9d55e8189..e601c1286e29ab23e09239272584c31957219806 100644 (file)
@@ -649,7 +649,9 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
                        cpuid_count(0x0000000F, 1, &eax, &ebx, &ecx, &edx);
                        c->x86_capability[CPUID_F_1_EDX] = edx;
 
-                       if (cpu_has(c, X86_FEATURE_CQM_OCCUP_LLC)) {
+                       if ((cpu_has(c, X86_FEATURE_CQM_OCCUP_LLC)) ||
+                             ((cpu_has(c, X86_FEATURE_CQM_MBM_TOTAL)) ||
+                              (cpu_has(c, X86_FEATURE_CQM_MBM_LOCAL)))) {
                                c->x86_cache_max_rmid = ecx;
                                c->x86_cache_occ_scale = ebx;
                        }
@@ -925,7 +927,7 @@ static void identify_cpu(struct cpuinfo_x86 *c)
        if (this_cpu->c_identify)
                this_cpu->c_identify(c);
 
-       /* Clear/Set all flags overriden by options, after probe */
+       /* Clear/Set all flags overridden by options, after probe */
        for (i = 0; i < NCAPINTS; i++) {
                c->x86_capability[i] &= ~cpu_caps_cleared[i];
                c->x86_capability[i] |= cpu_caps_set[i];
@@ -984,7 +986,7 @@ static void identify_cpu(struct cpuinfo_x86 *c)
        x86_init_cache_qos(c);
 
        /*
-        * Clear/Set all flags overriden by options, need do it
+        * Clear/Set all flags overridden by options, need do it
         * before following smp all cpus cap AND.
         */
        for (i = 0; i < NCAPINTS; i++) {