aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFenghua Yu <fenghua.yu@intel.com>2017-12-20 17:57:24 -0500
committerThomas Gleixner <tglx@linutronix.de>2018-01-18 03:33:32 -0500
commit31516de306c0c9235156cdc7acb976ea21f1f646 (patch)
treeb73826a7261c23bf6ca79459a83460f765abc130
parent99adde9b370de8e07ef76630c6f60dbf586cdf0e (diff)
x86/intel_rdt: Add command line parameter to control L2_CDP
L2 CDP can be controlled by kernel parameter "rdt=". If "rdt=l2cdp", L2 CDP is turned on. If "rdt=!l2cdp", L2 CDP is turned off. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: "Ravi V Shankar" <ravi.v.shankar@intel.com> Cc: "Tony Luck" <tony.luck@intel.com> Cc: Vikas" <vikas.shivappa@intel.com> Cc: Sai Praneeth" <sai.praneeth.prakhya@intel.com> Cc: Reinette" <reinette.chatre@intel.com> Link: https://lkml.kernel.org/r/1513810644-78015-7-git-send-email-fenghua.yu@intel.com
-rw-r--r--Documentation/admin-guide/kernel-parameters.txt3
-rw-r--r--arch/x86/kernel/cpu/intel_rdt.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 46b26bfee27b..fde058ca8419 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3682,7 +3682,8 @@
3682 3682
3683 rdt= [HW,X86,RDT] 3683 rdt= [HW,X86,RDT]
3684 Turn on/off individual RDT features. List is: 3684 Turn on/off individual RDT features. List is:
3685 cmt, mbmtotal, mbmlocal, l3cat, l3cdp, l2cat, mba. 3685 cmt, mbmtotal, mbmlocal, l3cat, l3cdp, l2cat, l2cdp,
3686 mba.
3686 E.g. to turn on cmt and turn off mba use: 3687 E.g. to turn on cmt and turn off mba use:
3687 rdt=cmt,!mba 3688 rdt=cmt,!mba
3688 3689
diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c
index 5202da08fd6f..410629f10ad3 100644
--- a/arch/x86/kernel/cpu/intel_rdt.c
+++ b/arch/x86/kernel/cpu/intel_rdt.c
@@ -691,6 +691,7 @@ enum {
691 RDT_FLAG_L3_CAT, 691 RDT_FLAG_L3_CAT,
692 RDT_FLAG_L3_CDP, 692 RDT_FLAG_L3_CDP,
693 RDT_FLAG_L2_CAT, 693 RDT_FLAG_L2_CAT,
694 RDT_FLAG_L2_CDP,
694 RDT_FLAG_MBA, 695 RDT_FLAG_MBA,
695}; 696};
696 697
@@ -713,6 +714,7 @@ static struct rdt_options rdt_options[] __initdata = {
713 RDT_OPT(RDT_FLAG_L3_CAT, "l3cat", X86_FEATURE_CAT_L3), 714 RDT_OPT(RDT_FLAG_L3_CAT, "l3cat", X86_FEATURE_CAT_L3),
714 RDT_OPT(RDT_FLAG_L3_CDP, "l3cdp", X86_FEATURE_CDP_L3), 715 RDT_OPT(RDT_FLAG_L3_CDP, "l3cdp", X86_FEATURE_CDP_L3),
715 RDT_OPT(RDT_FLAG_L2_CAT, "l2cat", X86_FEATURE_CAT_L2), 716 RDT_OPT(RDT_FLAG_L2_CAT, "l2cat", X86_FEATURE_CAT_L2),
717 RDT_OPT(RDT_FLAG_L2_CDP, "l2cdp", X86_FEATURE_CDP_L2),
716 RDT_OPT(RDT_FLAG_MBA, "mba", X86_FEATURE_MBA), 718 RDT_OPT(RDT_FLAG_MBA, "mba", X86_FEATURE_MBA),
717}; 719};
718#define NUM_RDT_OPTIONS ARRAY_SIZE(rdt_options) 720#define NUM_RDT_OPTIONS ARRAY_SIZE(rdt_options)