diff options
author | Vikas Shivappa | 2017-04-08 02:33:56 +0200 |
---|---|---|
committer | Thomas Gleixner | 2017-04-14 16:10:09 +0200 |
commit | c6ea67de52c29a8b45e5fc7569fc4336bfd557b0 (patch) | |
tree | f65a107cf1500fa4671d43ced5a1b8ce491f2187 /arch/x86/include/asm/intel_rdt.h | |
parent | x86/intel_rdt/mba: Add info directory files for Memory Bandwidth Allocation (diff) | |
download | kernel-qcow2-linux-c6ea67de52c29a8b45e5fc7569fc4336bfd557b0.tar.gz kernel-qcow2-linux-c6ea67de52c29a8b45e5fc7569fc4336bfd557b0.tar.xz kernel-qcow2-linux-c6ea67de52c29a8b45e5fc7569fc4336bfd557b0.zip |
x86/intel_rdt: Make schemata file parsers resource specific
The schemata files are the user space interface to update resource
controls. The parser is hardwired to support only cache resources, which do
not fit the requirements of memory resources.
Add a function pointer for a parser to the struct rdt_resource and switch
the cache parsing over.
[ tglx: Massaged changelog ]
Signed-off-by: Vikas Shivappa <vikas.shivappa@linux.intel.com>
Cc: ravi.v.shankar@intel.com
Cc: tony.luck@intel.com
Cc: fenghua.yu@intel.com
Cc: vikas.shivappa@intel.com
Link: http://lkml.kernel.org/r/1491611637-20417-8-git-send-email-vikas.shivappa@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/include/asm/intel_rdt.h')
-rw-r--r-- | arch/x86/include/asm/intel_rdt.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/intel_rdt.h b/arch/x86/include/asm/intel_rdt.h index 167fe10f00b9..4a9005766d96 100644 --- a/arch/x86/include/asm/intel_rdt.h +++ b/arch/x86/include/asm/intel_rdt.h @@ -152,6 +152,8 @@ struct rdt_membw { * @cache: Cache allocation related data * @info_files: resctrl info files for the resource * @nr_info_files: Number of info files + * @format_str: Per resource format string to show domain value + * @parse_ctrlval: Per resource function pointer to parse control values */ struct rdt_resource { bool enabled; @@ -171,10 +173,14 @@ struct rdt_resource { }; struct rftype *info_files; int nr_info_files; + const char *format_str; + int (*parse_ctrlval) (char *buf, struct rdt_resource *r, + struct rdt_domain *d); }; void rdt_get_cache_infofile(struct rdt_resource *r); void rdt_get_mba_infofile(struct rdt_resource *r); +int parse_cbm(char *buf, struct rdt_resource *r, struct rdt_domain *d); extern struct mutex rdtgroup_mutex; |