summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/intel_rdt.h
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2018-06-22 15:42:27 -0700
committerThomas Gleixner <tglx@linutronix.de>2018-06-24 15:35:48 +0200
commit746e08590b864cf730d7bd23394e2d3fbb0f22b6 (patch)
tree082202481a7fdd26b6f9724345cbfb1538332437 /arch/x86/kernel/cpu/intel_rdt.h
parent443810fe6160542c78e24c66047edd7a3cc830c6 (diff)
downloadlinux-746e08590b864cf730d7bd23394e2d3fbb0f22b6.tar.gz
linux-746e08590b864cf730d7bd23394e2d3fbb0f22b6.tar.bz2
linux-746e08590b864cf730d7bd23394e2d3fbb0f22b6.zip
x86/intel_rdt: Create character device exposing pseudo-locked region
After a pseudo-locked region is created it needs to be made available to user space for usage. A character device supporting mmap() is created for each pseudo-locked region. A user space application can now use mmap() system call to map pseudo-locked region into its virtual address space. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: vikas.shivappa@linux.intel.com Cc: gavin.hindman@intel.com Cc: jithu.joseph@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/fccbb9b20f07655ab0a4df9fa1c1babc0288aea0.1529706536.git.reinette.chatre@intel.com
Diffstat (limited to 'arch/x86/kernel/cpu/intel_rdt.h')
-rw-r--r--arch/x86/kernel/cpu/intel_rdt.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/x86/kernel/cpu/intel_rdt.h b/arch/x86/kernel/cpu/intel_rdt.h
index 8a7102cfbec7..b8e490a43290 100644
--- a/arch/x86/kernel/cpu/intel_rdt.h
+++ b/arch/x86/kernel/cpu/intel_rdt.h
@@ -138,6 +138,8 @@ struct mongroup {
* @line_size: size of the cache lines
* @size: size of pseudo-locked region in bytes
* @kmem: the kernel memory associated with pseudo-locked region
+ * @minor: minor number of character device associated with this
+ * region
* @debugfs_dir: pointer to this region's directory in the debugfs
* filesystem
*/
@@ -151,6 +153,7 @@ struct pseudo_lock_region {
unsigned int line_size;
unsigned int size;
void *kmem;
+ unsigned int minor;
struct dentry *debugfs_dir;
};
@@ -524,6 +527,8 @@ int rdtgroup_locksetup_enter(struct rdtgroup *rdtgrp);
int rdtgroup_locksetup_exit(struct rdtgroup *rdtgrp);
bool rdtgroup_cbm_overlaps_pseudo_locked(struct rdt_domain *d, u32 _cbm);
bool rdtgroup_pseudo_locked_in_hierarchy(struct rdt_domain *d);
+int rdt_pseudo_lock_init(void);
+void rdt_pseudo_lock_release(void);
int rdtgroup_pseudo_lock_create(struct rdtgroup *rdtgrp);
void rdtgroup_pseudo_lock_remove(struct rdtgroup *rdtgrp);
struct rdt_domain *get_domain_from_cpu(int cpu, struct rdt_resource *r);
@@ -551,13 +556,4 @@ void cqm_handle_limbo(struct work_struct *work);
bool has_busy_rmid(struct rdt_resource *r, struct rdt_domain *d);
void __check_limbo(struct rdt_domain *d, bool force_free);
-/*
- * Define the hooks for Cache Pseudo-Locking to use within rdt_mount().
- * These are no-ops provided for the new kernfs changes to use as a
- * baseline in preparation for a conflict-free merge between it
- * (kernfs changes) and the Cache Pseudo-Locking enabling.
- */
-static inline int rdt_pseudo_lock_init(void) { return 0; }
-static inline void rdt_pseudo_lock_release(void) { }
-
#endif /* _ASM_X86_INTEL_RDT_H */