Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1696526

[PATCH 14/28] x86/intel_rdt: Change closid type from int to u32

From Vikas Shivappa <vikas.shivappa@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH 14/28] x86/intel_rdt: Change closid type from int to u32
Date 2017-07-25 23:20 +0200
Message-ID <u7fph-86t-69@gated-at.bofh.it> (permalink)
References <u7fpf-86t-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


OS associates a CLOSid(Class of service id) to a task by writing the
high 32 bits of per CPU IA32_PQR_ASSOC MSR when a task is scheduled in.
CPUID.(EAX=10H, ECX=1):EDX[15:0] enumerates the max CLOSID supported and
it is zero indexed. Hence change the type to u32 from int.

Signed-off-by: Vikas Shivappa <vikas.shivappa@linux.intel.com>
---
 arch/x86/include/asm/intel_rdt_sched.h   | 2 +-
 arch/x86/kernel/cpu/intel_rdt.h          | 2 +-
 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 2 +-
 include/linux/sched.h                    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/intel_rdt_sched.h b/arch/x86/include/asm/intel_rdt_sched.h
index 4dee77b..1d8d45a 100644
--- a/arch/x86/include/asm/intel_rdt_sched.h
+++ b/arch/x86/include/asm/intel_rdt_sched.h
@@ -46,7 +46,7 @@ static inline void intel_rdt_sched_in(void)
 {
 	if (static_branch_likely(&rdt_alloc_enable_key)) {
 		struct intel_pqr_state *state = this_cpu_ptr(&pqr_state);
-		int closid;
+		u32 closid;
 
 		/*
 		 * If this task has a closid assigned, use it.
diff --git a/arch/x86/kernel/cpu/intel_rdt.h b/arch/x86/kernel/cpu/intel_rdt.h
index e8fb08f..b2a2de3 100644
--- a/arch/x86/kernel/cpu/intel_rdt.h
+++ b/arch/x86/kernel/cpu/intel_rdt.h
@@ -72,7 +72,7 @@ struct mongroup {
 struct rdtgroup {
 	struct kernfs_node	*kn;
 	struct list_head	rdtgroup_list;
-	int			closid;
+	u32			closid;
 	struct cpumask		cpu_mask;
 	int			flags;
 	atomic_t		waitcount;
diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
index cfb2a89..843a131 100644
--- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
+++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
@@ -77,7 +77,7 @@ static void closid_init(void)
 
 static int closid_alloc(void)
 {
-	int closid = ffs(closid_free_map);
+	u32 closid = ffs(closid_free_map);
 
 	if (closid == 0)
 		return -ENOSPC;
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 9e31b3d..b8d0d5c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -865,7 +865,7 @@ struct task_struct {
 	struct list_head		cg_list;
 #endif
 #ifdef CONFIG_INTEL_RDT
-	int				closid;
+	u32				closid;
 #endif
 #ifdef CONFIG_FUTEX
 	struct robust_list_head __user	*robust_list;
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/28 V2] Cqm3 patch series(along with MBM support) Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH 03/28] x86/intel_rdt: Introduce a common compile option for RDT Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH 05/28] x86/intel_rdt: Mark rdt_root and closid_alloc as static Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH 07/28] x86/intel_rdt: make rdt_resources_all more readable Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH 04/28] x86/intel_rdt: Change file names to accommodate RDT monitor code Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH 21/28] x86/intel_rdt/cqm: Add rmdir support Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH 06/28] x86/intel_rdt: Cleanup namespace to support RDT monitoring Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH 14/28] x86/intel_rdt: Change closid type from int to u32 Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH 20/28] x86/intel_rdt: Separate the ctrl bits from rmdir Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH 22/28] x86/intel_rdt/cqm: Add mount,umount support Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH 09/28] x86/intel_rdt/cqm: Add RMID(Resource monitoring ID) management Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH 16/28] x86/intel_rdt: Prepare to add RDT monitor cpus file support Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH 13/28] x86/intel_rdt/cqm: Add mkdir support for RDT monitoring Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-07-25 23:20 +0200
  [PATCH] x86/intel_rdt: Show bitmask of shareable resource with other executing units "Luck, Tony" <tony.luck@intel.com> - 2017-07-26 00:40 +0200
  [RFC PATCH] Add "-f" and "-F" flags to watch a "/sys? style file (single number) "Luck, Tony" <tony.luck@intel.com> - 2017-07-26 00:50 +0200

csiph-web