Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752262AbdHAUxy (ORCPT ); Tue, 1 Aug 2017 16:53:54 -0400 Received: from terminus.zytor.com ([65.50.211.136]:50589 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752053AbdHAUxx (ORCPT ); Tue, 1 Aug 2017 16:53:53 -0400 Date: Tue, 1 Aug 2017 13:51:45 -0700 From: tip-bot for Vikas Shivappa Message-ID: Cc: tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, vikas.shivappa@linux.intel.com, hpa@zytor.com Reply-To: tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, vikas.shivappa@linux.intel.com, hpa@zytor.com In-Reply-To: <1501017287-28083-15-git-send-email-vikas.shivappa@linux.intel.com> References: <1501017287-28083-15-git-send-email-vikas.shivappa@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cache] x86/intel_rdt: Change closid type from int to u32 Git-Commit-ID: 0734ded1abee9439b0c5d7b62af1ead78aab895b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3004 Lines: 86 Commit-ID: 0734ded1abee9439b0c5d7b62af1ead78aab895b Gitweb: http://git.kernel.org/tip/0734ded1abee9439b0c5d7b62af1ead78aab895b Author: Vikas Shivappa AuthorDate: Tue, 25 Jul 2017 14:14:33 -0700 Committer: Thomas Gleixner CommitDate: Tue, 1 Aug 2017 22:41:24 +0200 x86/intel_rdt: Change closid type from int to u32 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 Signed-off-by: Thomas Gleixner 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-15-git-send-email-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 bee9f88..8404054 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 20b2ff2..8839fd0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -899,7 +899,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;