Merge tag 'x86_cache_updates_for_5.8' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 1 Jun 2020 19:24:14 +0000 (12:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 1 Jun 2020 19:24:14 +0000 (12:24 -0700)
Pull x86 cache resource control updates from Borislav Petkov:
 "Add support for wider Memory Bandwidth Monitoring counters by querying
  their width from CPUID.

  As a prerequsite for that, streamline and unify the CPUID detection of
  the respective resource control attributes.

  By Reinette Chatre"

* tag 'x86_cache_updates_for_5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/resctrl: Support wider MBM counters
  x86/resctrl: Support CPUID enumeration of MBM counter width
  x86/resctrl: Maintain MBM counter width per resource
  x86/resctrl: Query LLC monitoring properties once during boot
  x86/resctrl: Remove unnecessary RMID checks
  x86/cpu: Move resctrl CPUID code to resctrl/
  x86/resctrl: Rename asm/resctrl_sched.h to asm/resctrl.h

15 files changed:
MAINTAINERS
arch/x86/include/asm/processor.h
arch/x86/include/asm/resctrl.h [new file with mode: 0644]
arch/x86/include/asm/resctrl_sched.h [deleted file]
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/cpu/resctrl/core.c
arch/x86/kernel/cpu/resctrl/ctrlmondata.c
arch/x86/kernel/cpu/resctrl/internal.h
arch/x86/kernel/cpu/resctrl/monitor.c
arch/x86/kernel/cpu/resctrl/pseudo_lock.c
arch/x86/kernel/cpu/resctrl/rdtgroup.c
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c

index f439407..110ac19 100644 (file)
@@ -14269,7 +14269,7 @@ M:      Reinette Chatre <reinette.chatre@intel.com>
 L:     linux-kernel@vger.kernel.org
 S:     Supported
 F:     Documentation/x86/resctrl*
-F:     arch/x86/include/asm/resctrl_sched.h
+F:     arch/x86/include/asm/resctrl.h
 F:     arch/x86/kernel/cpu/resctrl/
 F:     tools/testing/selftests/resctrl/
 
index 3bcf27c..c4e8fd7 100644 (file)
@@ -113,9 +113,10 @@ struct cpuinfo_x86 {
        /* in KB - valid for CPUS which support this call: */
        unsigned int            x86_cache_size;
        int                     x86_cache_alignment;    /* In bytes */
-       /* Cache QoS architectural values: */
+       /* Cache QoS architectural values, valid only on the BSP: */
        int                     x86_cache_max_rmid;     /* max index */
        int                     x86_cache_occ_scale;    /* scale to bytes */
+       int                     x86_cache_mbm_width_offset;
        int                     x86_power;
        unsigned long           loops_per_jiffy;
        /* cpuid returned max cores value: */
diff --git a/arch/x86/include/asm/resctrl.h b/arch/x86/include/asm/resctrl.h
new file mode 100644 (file)
index 0000000..0760306
--- /dev/null
@@ -0,0 +1,96 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_RESCTRL_H
+#define _ASM_X86_RESCTRL_H
+
+#ifdef CONFIG_X86_CPU_RESCTRL
+
+#include <linux/sched.h>
+#include <linux/jump_label.h>
+
+#define IA32_PQR_ASSOC 0x0c8f
+
+/**
+ * struct resctrl_pqr_state - State cache for the PQR MSR
+ * @cur_rmid:          The cached Resource Monitoring ID
+ * @cur_closid:        The cached Class Of Service ID
+ * @default_rmid:      The user assigned Resource Monitoring ID
+ * @default_closid:    The user assigned cached Class Of Service ID
+ *
+ * The upper 32 bits of IA32_PQR_ASSOC contain closid and the
+ * lower 10 bits rmid. The update to IA32_PQR_ASSOC always
+ * contains both parts, so we need to cache them. This also
+ * stores the user configured per cpu CLOSID and RMID.
+ *
+ * The cache also helps to avoid pointless updates if the value does
+ * not change.
+ */
+struct resctrl_pqr_state {
+       u32                     cur_rmid;
+       u32                     cur_closid;
+       u32                     default_rmid;
+       u32                     default_closid;
+};
+
+DECLARE_PER_CPU(struct resctrl_pqr_state, pqr_state);
+
+DECLARE_STATIC_KEY_FALSE(rdt_enable_key);
+DECLARE_STATIC_KEY_FALSE(rdt_alloc_enable_key);
+DECLARE_STATIC_KEY_FALSE(rdt_mon_enable_key);
+
+/*
+ * __resctrl_sched_in() - Writes the task's CLOSid/RMID to IA32_PQR_MSR
+ *
+ * Following considerations are made so that this has minimal impact
+ * on scheduler hot path:
+ * - This will stay as no-op unless we are running on an Intel SKU
+ *   which supports resource control or monitoring and we enable by
+ *   mounting the resctrl file system.
+ * - Caches the per cpu CLOSid/RMID values and does the MSR write only
+ *   when a task with a different CLOSid/RMID is scheduled in.
+ * - We allocate RMIDs/CLOSids globally in order to keep this as
+ *   simple as possible.
+ * Must be called with preemption disabled.
+ */
+static void __resctrl_sched_in(void)
+{
+       struct resctrl_pqr_state *state = this_cpu_ptr(&pqr_state);
+       u32 closid = state->default_closid;
+       u32 rmid = state->default_rmid;
+
+       /*
+        * If this task has a closid/rmid assigned, use it.
+        * Else use the closid/rmid assigned to this cpu.
+        */
+       if (static_branch_likely(&rdt_alloc_enable_key)) {
+               if (current->closid)
+                       closid = current->closid;
+       }
+
+       if (static_branch_likely(&rdt_mon_enable_key)) {
+               if (current->rmid)
+                       rmid = current->rmid;
+       }
+
+       if (closid != state->cur_closid || rmid != state->cur_rmid) {
+               state->cur_closid = closid;
+               state->cur_rmid = rmid;
+               wrmsr(IA32_PQR_ASSOC, rmid, closid);
+       }
+}
+
+static inline void resctrl_sched_in(void)
+{
+       if (static_branch_likely(&rdt_enable_key))
+               __resctrl_sched_in();
+}
+
+void resctrl_cpu_detect(struct cpuinfo_x86 *c);
+
+#else
+
+static inline void resctrl_sched_in(void) {}
+static inline void resctrl_cpu_detect(struct cpuinfo_x86 *c) {}
+
+#endif /* CONFIG_X86_CPU_RESCTRL */
+
+#endif /* _ASM_X86_RESCTRL_H */
diff --git a/arch/x86/include/asm/resctrl_sched.h b/arch/x86/include/asm/resctrl_sched.h
deleted file mode 100644 (file)
index f6b7fe2..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_X86_RESCTRL_SCHED_H
-#define _ASM_X86_RESCTRL_SCHED_H
-
-#ifdef CONFIG_X86_CPU_RESCTRL
-
-#include <linux/sched.h>
-#include <linux/jump_label.h>
-
-#define IA32_PQR_ASSOC 0x0c8f
-
-/**
- * struct resctrl_pqr_state - State cache for the PQR MSR
- * @cur_rmid:          The cached Resource Monitoring ID
- * @cur_closid:        The cached Class Of Service ID
- * @default_rmid:      The user assigned Resource Monitoring ID
- * @default_closid:    The user assigned cached Class Of Service ID
- *
- * The upper 32 bits of IA32_PQR_ASSOC contain closid and the
- * lower 10 bits rmid. The update to IA32_PQR_ASSOC always
- * contains both parts, so we need to cache them. This also
- * stores the user configured per cpu CLOSID and RMID.
- *
- * The cache also helps to avoid pointless updates if the value does
- * not change.
- */
-struct resctrl_pqr_state {
-       u32                     cur_rmid;
-       u32                     cur_closid;
-       u32                     default_rmid;
-       u32                     default_closid;
-};
-
-DECLARE_PER_CPU(struct resctrl_pqr_state, pqr_state);
-
-DECLARE_STATIC_KEY_FALSE(rdt_enable_key);
-DECLARE_STATIC_KEY_FALSE(rdt_alloc_enable_key);
-DECLARE_STATIC_KEY_FALSE(rdt_mon_enable_key);
-
-/*
- * __resctrl_sched_in() - Writes the task's CLOSid/RMID to IA32_PQR_MSR
- *
- * Following considerations are made so that this has minimal impact
- * on scheduler hot path:
- * - This will stay as no-op unless we are running on an Intel SKU
- *   which supports resource control or monitoring and we enable by
- *   mounting the resctrl file system.
- * - Caches the per cpu CLOSid/RMID values and does the MSR write only
- *   when a task with a different CLOSid/RMID is scheduled in.
- * - We allocate RMIDs/CLOSids globally in order to keep this as
- *   simple as possible.
- * Must be called with preemption disabled.
- */
-static void __resctrl_sched_in(void)
-{
-       struct resctrl_pqr_state *state = this_cpu_ptr(&pqr_state);
-       u32 closid = state->default_closid;
-       u32 rmid = state->default_rmid;
-
-       /*
-        * If this task has a closid/rmid assigned, use it.
-        * Else use the closid/rmid assigned to this cpu.
-        */
-       if (static_branch_likely(&rdt_alloc_enable_key)) {
-               if (current->closid)
-                       closid = current->closid;
-       }
-
-       if (static_branch_likely(&rdt_mon_enable_key)) {
-               if (current->rmid)
-                       rmid = current->rmid;
-       }
-
-       if (closid != state->cur_closid || rmid != state->cur_rmid) {
-               state->cur_closid = closid;
-               state->cur_rmid = rmid;
-               wrmsr(IA32_PQR_ASSOC, rmid, closid);
-       }
-}
-
-static inline void resctrl_sched_in(void)
-{
-       if (static_branch_likely(&rdt_enable_key))
-               __resctrl_sched_in();
-}
-
-#else
-
-static inline void resctrl_sched_in(void) {}
-
-#endif /* CONFIG_X86_CPU_RESCTRL */
-
-#endif /* _ASM_X86_RESCTRL_SCHED_H */
index 547ad7b..c36e899 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/pci-direct.h>
 #include <asm/delay.h>
 #include <asm/debugreg.h>
+#include <asm/resctrl.h>
 
 #ifdef CONFIG_X86_64
 # include <asm/mmconfig.h>
@@ -597,6 +598,8 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
                        x86_amd_ls_cfg_ssbd_mask = 1ULL << bit;
                }
        }
+
+       resctrl_cpu_detect(c);
 }
 
 static void early_detect_mem_encrypt(struct cpuinfo_x86 *c)
index bed0cb8..d078092 100644 (file)
@@ -854,30 +854,6 @@ static void init_speculation_control(struct cpuinfo_x86 *c)
        }
 }
 
-static void init_cqm(struct cpuinfo_x86 *c)
-{
-       if (!cpu_has(c, X86_FEATURE_CQM_LLC)) {
-               c->x86_cache_max_rmid  = -1;
-               c->x86_cache_occ_scale = -1;
-               return;
-       }
-
-       /* will be overridden if occupancy monitoring exists */
-       c->x86_cache_max_rmid = cpuid_ebx(0xf);
-
-       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)) {
-               u32 eax, ebx, ecx, edx;
-
-               /* QoS sub-leaf, EAX=0Fh, ECX=1 */
-               cpuid_count(0xf, 1, &eax, &ebx, &ecx, &edx);
-
-               c->x86_cache_max_rmid  = ecx;
-               c->x86_cache_occ_scale = ebx;
-       }
-}
-
 void get_cpu_cap(struct cpuinfo_x86 *c)
 {
        u32 eax, ebx, ecx, edx;
@@ -945,7 +921,6 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
 
        init_scattered_cpuid_features(c);
        init_speculation_control(c);
-       init_cqm(c);
 
        /*
         * Clear/Set all flags overridden by options, after probe.
@@ -1377,20 +1352,6 @@ static void generic_identify(struct cpuinfo_x86 *c)
 #endif
 }
 
-static void x86_init_cache_qos(struct cpuinfo_x86 *c)
-{
-       /*
-        * The heavy lifting of max_rmid and cache_occ_scale are handled
-        * in get_cpu_cap().  Here we just set the max_rmid for the boot_cpu
-        * in case CQM bits really aren't there in this CPU.
-        */
-       if (c != &boot_cpu_data) {
-               boot_cpu_data.x86_cache_max_rmid =
-                       min(boot_cpu_data.x86_cache_max_rmid,
-                           c->x86_cache_max_rmid);
-       }
-}
-
 /*
  * Validate that ACPI/mptables have the same information about the
  * effective APIC id and update the package map.
@@ -1503,7 +1464,6 @@ static void identify_cpu(struct cpuinfo_x86 *c)
 #endif
 
        x86_init_rdrand(c);
-       x86_init_cache_qos(c);
        setup_pku(c);
 
        /*
index a19a680..166d7c3 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/cpu_device_id.h>
 #include <asm/cmdline.h>
 #include <asm/traps.h>
+#include <asm/resctrl.h>
 
 #ifdef CONFIG_X86_64
 #include <linux/topology.h>
@@ -322,6 +323,11 @@ static void early_init_intel(struct cpuinfo_x86 *c)
                detect_ht_early(c);
 }
 
+static void bsp_init_intel(struct cpuinfo_x86 *c)
+{
+       resctrl_cpu_detect(c);
+}
+
 #ifdef CONFIG_X86_32
 /*
  *     Early probe support logic for ppro memory erratum #50
@@ -961,6 +967,7 @@ static const struct cpu_dev intel_cpu_dev = {
 #endif
        .c_detect_tlb   = intel_detect_tlb,
        .c_early_init   = early_init_intel,
+       .c_bsp_init     = bsp_init_intel,
        .c_init         = init_intel,
        .c_x86_vendor   = X86_VENDOR_INTEL,
 };
index d8cc522..12f967c 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/cpuhotplug.h>
 
 #include <asm/intel-family.h>
-#include <asm/resctrl_sched.h>
+#include <asm/resctrl.h>
 #include "internal.h"
 
 /* Mutex to protect rdtgroup access. */
@@ -958,6 +958,36 @@ static __init void rdt_init_res_defs(void)
 
 static enum cpuhp_state rdt_online;
 
+/* Runs once on the BSP during boot. */
+void resctrl_cpu_detect(struct cpuinfo_x86 *c)
+{
+       if (!cpu_has(c, X86_FEATURE_CQM_LLC)) {
+               c->x86_cache_max_rmid  = -1;
+               c->x86_cache_occ_scale = -1;
+               c->x86_cache_mbm_width_offset = -1;
+               return;
+       }
+
+       /* will be overridden if occupancy monitoring exists */
+       c->x86_cache_max_rmid = cpuid_ebx(0xf);
+
+       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)) {
+               u32 eax, ebx, ecx, edx;
+
+               /* QoS sub-leaf, EAX=0Fh, ECX=1 */
+               cpuid_count(0xf, 1, &eax, &ebx, &ecx, &edx);
+
+               c->x86_cache_max_rmid  = ecx;
+               c->x86_cache_occ_scale = ebx;
+               if (c->x86_vendor == X86_VENDOR_INTEL)
+                       c->x86_cache_mbm_width_offset = eax & 0xff;
+               else
+                       c->x86_cache_mbm_width_offset = -1;
+       }
+}
+
 static int __init resctrl_late_init(void)
 {
        struct rdt_resource *r;
index 055c861..934c8fb 100644 (file)
@@ -495,14 +495,16 @@ int rdtgroup_schemata_show(struct kernfs_open_file *of,
        return ret;
 }
 
-void mon_event_read(struct rmid_read *rr, struct rdt_domain *d,
-                   struct rdtgroup *rdtgrp, int evtid, int first)
+void mon_event_read(struct rmid_read *rr, struct rdt_resource *r,
+                   struct rdt_domain *d, struct rdtgroup *rdtgrp,
+                   int evtid, int first)
 {
        /*
         * setup the parameters to send to the IPI to read the data.
         */
        rr->rgrp = rdtgrp;
        rr->evtid = evtid;
+       rr->r = r;
        rr->d = d;
        rr->val = 0;
        rr->first = first;
@@ -539,7 +541,7 @@ int rdtgroup_mondata_show(struct seq_file *m, void *arg)
                goto out;
        }
 
-       mon_event_read(&rr, d, rdtgrp, evtid, false);
+       mon_event_read(&rr, r, d, rdtgrp, evtid, false);
 
        if (rr.val & RMID_VAL_ERROR)
                seq_puts(m, "Error\n");
index 3dd13f3..f20a47d 100644 (file)
@@ -31,7 +31,7 @@
 
 #define CQM_LIMBOCHECK_INTERVAL        1000
 
-#define MBM_CNTR_WIDTH                 24
+#define MBM_CNTR_WIDTH_BASE            24
 #define MBM_OVERFLOW_INTERVAL          1000
 #define MAX_MBA_BW                     100u
 #define MBA_IS_LINEAR                  0x4
 
 #define RMID_VAL_ERROR                 BIT_ULL(63)
 #define RMID_VAL_UNAVAIL               BIT_ULL(62)
+/*
+ * With the above fields in use 62 bits remain in MSR_IA32_QM_CTR for
+ * data to be returned. The counter width is discovered from the hardware
+ * as an offset from MBM_CNTR_WIDTH_BASE.
+ */
+#define MBM_CNTR_WIDTH_OFFSET_MAX (62 - MBM_CNTR_WIDTH_BASE)
 
 
 struct rdt_fs_context {
@@ -87,6 +93,7 @@ union mon_data_bits {
 
 struct rmid_read {
        struct rdtgroup         *rgrp;
+       struct rdt_resource     *r;
        struct rdt_domain       *d;
        int                     evtid;
        bool                    first;
@@ -460,6 +467,7 @@ struct rdt_resource {
        struct list_head        evt_list;
        int                     num_rmid;
        unsigned int            mon_scale;
+       unsigned int            mbm_width;
        unsigned long           fflags;
 };
 
@@ -587,8 +595,9 @@ void rmdir_mondata_subdir_allrdtgrp(struct rdt_resource *r,
                                    unsigned int dom_id);
 void mkdir_mondata_subdir_allrdtgrp(struct rdt_resource *r,
                                    struct rdt_domain *d);
-void mon_event_read(struct rmid_read *rr, struct rdt_domain *d,
-                   struct rdtgroup *rdtgrp, int evtid, int first);
+void mon_event_read(struct rmid_read *rr, struct rdt_resource *r,
+                   struct rdt_domain *d, struct rdtgroup *rdtgrp,
+                   int evtid, int first);
 void mbm_setup_overflow_handler(struct rdt_domain *dom,
                                unsigned long delay_ms);
 void mbm_handle_overflow(struct work_struct *work);
index 773124b..837d7d0 100644 (file)
@@ -214,9 +214,9 @@ void free_rmid(u32 rmid)
                list_add_tail(&entry->list, &rmid_free_lru);
 }
 
-static u64 mbm_overflow_count(u64 prev_msr, u64 cur_msr)
+static u64 mbm_overflow_count(u64 prev_msr, u64 cur_msr, unsigned int width)
 {
-       u64 shift = 64 - MBM_CNTR_WIDTH, chunks;
+       u64 shift = 64 - width, chunks;
 
        chunks = (cur_msr << shift) - (prev_msr << shift);
        return chunks >>= shift;
@@ -256,7 +256,7 @@ static int __mon_event_count(u32 rmid, struct rmid_read *rr)
                return 0;
        }
 
-       chunks = mbm_overflow_count(m->prev_msr, tval);
+       chunks = mbm_overflow_count(m->prev_msr, tval, rr->r->mbm_width);
        m->chunks += chunks;
        m->prev_msr = tval;
 
@@ -278,7 +278,7 @@ static void mbm_bw_count(u32 rmid, struct rmid_read *rr)
        if (tval & (RMID_VAL_ERROR | RMID_VAL_UNAVAIL))
                return;
 
-       chunks = mbm_overflow_count(m->prev_bw_msr, tval);
+       chunks = mbm_overflow_count(m->prev_bw_msr, tval, rr->r->mbm_width);
        m->chunks_bw += chunks;
        m->chunks = m->chunks_bw;
        cur_bw = (chunks * r->mon_scale) >> 20;
@@ -433,11 +433,12 @@ static void update_mba_bw(struct rdtgroup *rgrp, struct rdt_domain *dom_mbm)
        }
 }
 
-static void mbm_update(struct rdt_domain *d, int rmid)
+static void mbm_update(struct rdt_resource *r, struct rdt_domain *d, int rmid)
 {
        struct rmid_read rr;
 
        rr.first = false;
+       rr.r = r;
        rr.d = d;
 
        /*
@@ -510,6 +511,7 @@ void mbm_handle_overflow(struct work_struct *work)
        struct rdtgroup *prgrp, *crgrp;
        int cpu = smp_processor_id();
        struct list_head *head;
+       struct rdt_resource *r;
        struct rdt_domain *d;
 
        mutex_lock(&rdtgroup_mutex);
@@ -517,16 +519,18 @@ void mbm_handle_overflow(struct work_struct *work)
        if (!static_branch_likely(&rdt_mon_enable_key))
                goto out_unlock;
 
-       d = get_domain_from_cpu(cpu, &rdt_resources_all[RDT_RESOURCE_L3]);
+       r = &rdt_resources_all[RDT_RESOURCE_L3];
+
+       d = get_domain_from_cpu(cpu, r);
        if (!d)
                goto out_unlock;
 
        list_for_each_entry(prgrp, &rdt_all_groups, rdtgroup_list) {
-               mbm_update(d, prgrp->mon.rmid);
+               mbm_update(r, d, prgrp->mon.rmid);
 
                head = &prgrp->mon.crdtgrp_list;
                list_for_each_entry(crgrp, head, mon.crdtgrp_list)
-                       mbm_update(d, crgrp->mon.rmid);
+                       mbm_update(r, d, crgrp->mon.rmid);
 
                if (is_mba_sc(NULL))
                        update_mba_bw(prgrp, d);
@@ -614,11 +618,18 @@ static void l3_mon_evt_init(struct rdt_resource *r)
 
 int rdt_get_mon_l3_config(struct rdt_resource *r)
 {
+       unsigned int mbm_offset = boot_cpu_data.x86_cache_mbm_width_offset;
        unsigned int cl_size = boot_cpu_data.x86_cache_size;
        int ret;
 
        r->mon_scale = boot_cpu_data.x86_cache_occ_scale;
        r->num_rmid = boot_cpu_data.x86_cache_max_rmid + 1;
+       r->mbm_width = MBM_CNTR_WIDTH_BASE;
+
+       if (mbm_offset > 0 && mbm_offset <= MBM_CNTR_WIDTH_OFFSET_MAX)
+               r->mbm_width += mbm_offset;
+       else if (mbm_offset > MBM_CNTR_WIDTH_OFFSET_MAX)
+               pr_warn("Ignoring impossible MBM counter offset\n");
 
        /*
         * A reasonable upper limit on the max threshold is the number
index d7623e1..4bd28b3 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <asm/cacheflush.h>
 #include <asm/intel-family.h>
-#include <asm/resctrl_sched.h>
+#include <asm/resctrl.h>
 #include <asm/perf_event.h>
 
 #include "../../events/perf_event.h" /* For X86_CONFIG() */
index 5a359d9..d7cb5ab 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <uapi/linux/magic.h>
 
-#include <asm/resctrl_sched.h>
+#include <asm/resctrl.h>
 #include "internal.h"
 
 DEFINE_STATIC_KEY_FALSE(rdt_enable_key);
@@ -2472,7 +2472,7 @@ static int mkdir_mondata_subdir(struct kernfs_node *parent_kn,
                        goto out_destroy;
 
                if (is_mbm_event(mevt->evtid))
-                       mon_event_read(&rr, d, prgrp, mevt->evtid, true);
+                       mon_event_read(&rr, r, d, prgrp, mevt->evtid, true);
        }
        kernfs_activate(kn);
        return 0;
index 954b013..538d4e8 100644 (file)
@@ -52,7 +52,7 @@
 #include <asm/debugreg.h>
 #include <asm/switch_to.h>
 #include <asm/vm86.h>
-#include <asm/resctrl_sched.h>
+#include <asm/resctrl.h>
 #include <asm/proto.h>
 
 #include "process.h"
index 5ef9d8f..0c169a5 100644 (file)
@@ -52,7 +52,7 @@
 #include <asm/switch_to.h>
 #include <asm/xen/hypervisor.h>
 #include <asm/vdso.h>
-#include <asm/resctrl_sched.h>
+#include <asm/resctrl.h>
 #include <asm/unistd.h>
 #include <asm/fsgsbase.h>
 #ifdef CONFIG_IA32_EMULATION