summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/intel_rdt.h
diff options
context:
space:
mode:
authorVikas Shivappa <vikas.shivappa@linux.intel.com>2017-07-25 14:14:44 -0700
committerThomas Gleixner <tglx@linutronix.de>2017-08-01 22:41:28 +0200
commit895c663ecef16c8138e20a7d5c052e0fcc400241 (patch)
tree73db0eee0642e938a2eb90e7456542d8354bedf9 /arch/x86/kernel/cpu/intel_rdt.h
parent748b6b881ccdda8f0663c68605f431279e06f49a (diff)
downloadlinux-895c663ecef16c8138e20a7d5c052e0fcc400241.tar.gz
linux-895c663ecef16c8138e20a7d5c052e0fcc400241.tar.bz2
linux-895c663ecef16c8138e20a7d5c052e0fcc400241.zip
x86/intel_rdt/cqm: Add CPU hotplug support
Resource groups have a per domain directory under "mon_data". Add or remove these directories as and when domains come online and go offline. Also update the per cpu rmids and cache upon onlining and offlining cpus. Signed-off-by: Vikas Shivappa <vikas.shivappa@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: peterz@infradead.org Cc: eranian@google.com Cc: vikas.shivappa@intel.com Cc: ak@linux.intel.com Cc: davidcc@google.com Cc: reinette.chatre@intel.com Link: http://lkml.kernel.org/r/1501017287-28083-26-git-send-email-vikas.shivappa@linux.intel.com
Diffstat (limited to 'arch/x86/kernel/cpu/intel_rdt.h')
-rw-r--r--arch/x86/kernel/cpu/intel_rdt.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/intel_rdt.h b/arch/x86/kernel/cpu/intel_rdt.h
index 7fcaa5f82bd0..2660d15d1712 100644
--- a/arch/x86/kernel/cpu/intel_rdt.h
+++ b/arch/x86/kernel/cpu/intel_rdt.h
@@ -301,6 +301,11 @@ enum {
RDT_NUM_RESOURCES,
};
+#define for_each_capable_rdt_resource(r) \
+ for (r = rdt_resources_all; r < rdt_resources_all + RDT_NUM_RESOURCES;\
+ r++) \
+ if (r->alloc_capable || r->mon_capable)
+
#define for_each_alloc_capable_rdt_resource(r) \
for (r = rdt_resources_all; r < rdt_resources_all + RDT_NUM_RESOURCES;\
r++) \
@@ -360,5 +365,9 @@ void free_rmid(u32 rmid);
int rdt_get_mon_l3_config(struct rdt_resource *r);
void mon_event_count(void *info);
int rdtgroup_mondata_show(struct seq_file *m, void *arg);
+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);
#endif /* _ASM_X86_INTEL_RDT_H */