Resctrl is a filesystem interface to hardware that provides cache
allocation policy and bandwidth control for groups of tasks or CPUs.
To support more than one architecture, resctrl needs to live in /fs/.
Move the code that is concerned with the filesystem interface to
/fs/resctrl.
Signed-off-by: James Morse <james.morse@xxxxxxx>
---
Changes since *:
* This patch is generated by a script.
---
arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 636 ---
arch/x86/kernel/cpu/resctrl/internal.h | 380 +-
arch/x86/kernel/cpu/resctrl/monitor.c | 902 +---
arch/x86/kernel/cpu/resctrl/monitor_trace.h | 18 +-
arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 1080 +---
.../kernel/cpu/resctrl/pseudo_lock_trace.h | 2 +
arch/x86/kernel/cpu/resctrl/rdtgroup.c | 4556 +----------------
fs/resctrl/ctrlmondata.c | 660 +++
fs/resctrl/internal.h | 442 ++
fs/resctrl/monitor.c | 932 ++++
fs/resctrl/monitor_trace.h | 33 +
fs/resctrl/pseudo_lock.c | 1115 ++++
fs/resctrl/pseudo_lock_trace.h | 17 +
fs/resctrl/rdtgroup.c | 4313 ++++++++++++++++
14 files changed, 7668 insertions(+), 7418 deletions(-)
diff --git a/fs/resctrl/pseudo_lock.c b/fs/resctrl/pseudo_lock.c
index e69de29bb2d1..29682dd46871 100644
--- a/fs/resctrl/pseudo_lock.c
+++ b/fs/resctrl/pseudo_lock.c
@@ -0,0 +1,1115 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Resource Director Technology (RDT)
+ *
+ * Pseudo-locking support built on top of Cache Allocation Technology (CAT)
+ *
+ * Copyright (C) 2018 Intel Corporation
+ *
+ * Author: Reinette Chatre <reinette.chatre@xxxxxxxxx>
+ */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#include <linux/cacheflush.h>
+#include <linux/cacheinfo.h>
+#include <linux/cpu.h>
+#include <linux/cpumask.h>
+#include <linux/debugfs.h>
+#include <linux/kthread.h>
+#include <linux/mman.h>
+#include <linux/perf_event.h>
+#include <linux/pm_qos.h>
+#include <linux/resctrl.h>
+#include <linux/slab.h>
+#include <linux/uaccess.h>
+
+#include <asm/cpu_device_id.h>
+#include <asm/perf_event.h>
+
+#include "../../events/perf_event.h" /* For X86_CONFIG() */
+#include "internal.h"
+
+#define CREATE_TRACE_POINTS
+
+#include "pseudo_lock_trace.h"
+}
diff --git a/fs/resctrl/pseudo_lock_trace.h b/fs/resctrl/pseudo_lock_trace.h
index e69de29bb2d1..7a6a1983953a 100644
--- a/fs/resctrl/pseudo_lock_trace.h
+++ b/fs/resctrl/pseudo_lock_trace.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM resctrl
+
+#if !defined(_X86_RESCTRL_PSEUDO_LOCK_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _X86_RESCTRL_PSEUDO_LOCK_TRACE_H
+
+#include <linux/tracepoint.h>
+
+#endif /* _X86_RESCTRL_PSEUDO_LOCK_TRACE_H */
+
+#undef TRACE_INCLUDE_PATH
+#define TRACE_INCLUDE_PATH .
+
+#define TRACE_INCLUDE_FILE pseudo_lock_trace
+
+#include <trace/define_trace.h>