summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/resctrl/internal.h
diff options
context:
space:
mode:
authorXiaochen Shen <xiaochen.shen@intel.com>2019-12-12 04:05:05 +0800
committerBorislav Petkov <bp@suse.de>2020-01-17 19:32:32 +0100
commit536a0d8e79fb928f2735db37dda95682b6754f9a (patch)
tree94518299f8858529b18a3d82213989936e8a55bb /arch/x86/kernel/cpu/resctrl/internal.h
parentdc433797c6f639e46824585bbf943578f13d54bf (diff)
x86/resctrl: Check monitoring static key in the MBM overflow handler
Currently, there are three static keys in the resctrl file system: rdt_mon_enable_key and rdt_alloc_enable_key indicate if the monitoring feature and the allocation feature are enabled, respectively. The rdt_enable_key is enabled when either the monitoring feature or the allocation feature is enabled. If no monitoring feature is present (either hardware doesn't support a monitoring feature or the feature is disabled by the kernel command line option "rdt="), rdt_enable_key is still enabled but rdt_mon_enable_key is disabled. MBM is a monitoring feature. The MBM overflow handler intends to check if the monitoring feature is not enabled for fast return. So check the rdt_mon_enable_key in it instead of the rdt_enable_key as former is the more accurate check. [ bp: Massage commit message. ] Fixes: e33026831bdb ("x86/intel_rdt/mbm: Handle counter overflow") Signed-off-by: Xiaochen Shen <xiaochen.shen@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/1576094705-13660-1-git-send-email-xiaochen.shen@intel.com
Diffstat (limited to 'arch/x86/kernel/cpu/resctrl/internal.h')
-rw-r--r--arch/x86/kernel/cpu/resctrl/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
index e49b77283924..181c992f448c 100644
--- a/arch/x86/kernel/cpu/resctrl/internal.h
+++ b/arch/x86/kernel/cpu/resctrl/internal.h
@@ -57,6 +57,7 @@ static inline struct rdt_fs_context *rdt_fc2context(struct fs_context *fc)
}
DECLARE_STATIC_KEY_FALSE(rdt_enable_key);
+DECLARE_STATIC_KEY_FALSE(rdt_mon_enable_key);
/**
* struct mon_evt - Entry in the event list of a resource