summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/resctrl/core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-20 09:39:11 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-20 09:39:11 +0200
commit6f2c6599ba70da7ca9603f8026c4e3cdc273ee02 (patch)
tree88228298182133d9522be62c8cb3eecfcb595d49 /arch/x86/kernel/cpu/resctrl/core.c
parentea1be1e59b19017e61aa357d524b743ba5602d3c (diff)
parentba47d845d715a010f7b51f6f89bae32845e6acb7 (diff)
downloadlinux-stable-6f2c6599ba70da7ca9603f8026c4e3cdc273ee02.tar.gz
linux-stable-6f2c6599ba70da7ca9603f8026c4e3cdc273ee02.tar.bz2
linux-stable-6f2c6599ba70da7ca9603f8026c4e3cdc273ee02.zip
Merge 5.8-rc6 into tty-next
We need the serial/tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/kernel/cpu/resctrl/core.c')
-rw-r--r--arch/x86/kernel/cpu/resctrl/core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
index 12f967c6b603..6a9df71c1b9e 100644
--- a/arch/x86/kernel/cpu/resctrl/core.c
+++ b/arch/x86/kernel/cpu/resctrl/core.c
@@ -981,10 +981,10 @@ void resctrl_cpu_detect(struct cpuinfo_x86 *c)
c->x86_cache_max_rmid = ecx;
c->x86_cache_occ_scale = ebx;
- if (c->x86_vendor == X86_VENDOR_INTEL)
- c->x86_cache_mbm_width_offset = eax & 0xff;
- else
- c->x86_cache_mbm_width_offset = -1;
+ c->x86_cache_mbm_width_offset = eax & 0xff;
+
+ if (c->x86_vendor == X86_VENDOR_AMD && !c->x86_cache_mbm_width_offset)
+ c->x86_cache_mbm_width_offset = MBM_CNTR_WIDTH_OFFSET_AMD;
}
}