summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/intel_rdt.c
diff options
context:
space:
mode:
authorVikas Shivappa <vikas.shivappa@linux.intel.com>2017-07-25 14:14:35 -0700
committerThomas Gleixner <tglx@linutronix.de>2017-08-01 22:41:25 +0200
commitb09d981b3f346690dafa3e4ebedfcf3e44b68e83 (patch)
tree8bece327378a596dcd913595fafc52bd678f3096 /arch/x86/kernel/cpu/intel_rdt.c
parentd6aaba615a482ce7d3ec218cf7b8d02d0d5753b8 (diff)
x86/intel_rdt: Prepare to add RDT monitor cpus file support
Separate the ctrl cpus file handling from the generic cpus file handling and convert the per cpu closid from u32 to a struct which will be used later to add rmid to the same struct. Also cleanup some name space. 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-17-git-send-email-vikas.shivappa@linux.intel.com
Diffstat (limited to 'arch/x86/kernel/cpu/intel_rdt.c')
-rw-r--r--arch/x86/kernel/cpu/intel_rdt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c
index 7cae4ec75cfe..303b085b969f 100644
--- a/arch/x86/kernel/cpu/intel_rdt.c
+++ b/arch/x86/kernel/cpu/intel_rdt.c
@@ -39,8 +39,6 @@
/* Mutex to protect rdtgroup access. */
DEFINE_MUTEX(rdtgroup_mutex);
-DEFINE_PER_CPU_READ_MOSTLY(int, cpu_closid);
-
/*
* The cached intel_pqr_state is strictly per CPU and can never be
* updated from a remote CPU. Functions which modify the state
@@ -49,6 +47,8 @@ DEFINE_PER_CPU_READ_MOSTLY(int, cpu_closid);
*/
DEFINE_PER_CPU(struct intel_pqr_state, pqr_state);
+DEFINE_PER_CPU_READ_MOSTLY(struct intel_pqr_state, rdt_cpu_default);
+
/*
* Used to store the max resource name width and max resource data width
* to display the schemata in a tabular format
@@ -500,7 +500,7 @@ static void clear_closid(int cpu)
{
struct intel_pqr_state *state = this_cpu_ptr(&pqr_state);
- per_cpu(cpu_closid, cpu) = 0;
+ per_cpu(rdt_cpu_default.closid, cpu) = 0;
state->closid = 0;
wrmsr(IA32_PQR_ASSOC, state->rmid, 0);
}