Commit-ID: 580ebb66cbb3de979adb4becbad7bd383746f162 Gitweb: https://git.kernel.org/tip/580ebb66cbb3de979adb4becbad7bd383746f162 Author: Babu Moger <Babu.Moger@xxxxxxx> AuthorDate: Wed, 21 Nov 2018 20:28:37 +0000 Committer: Borislav Petkov <bp@xxxxxxx> CommitDate: Thu, 22 Nov 2018 20:16:19 +0100 x86/resctrl: Add vendor check for the MBA software controller MBA software controller support is available only on Intel. Suggested-by: Fenghua Yu <fenghua.yu@xxxxxxxxx> Signed-off-by: Babu Moger <babu.moger@xxxxxxx> Signed-off-by: Borislav Petkov <bp@xxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Andy Lutomirski <luto@xxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Brijesh Singh <brijesh.singh@xxxxxxx> Cc: "Chang S. Bae" <chang.seok.bae@xxxxxxxxx> Cc: David Miller <davem@xxxxxxxxxxxxx> Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx> Cc: Dmitry Safonov <dima@xxxxxxxxxx> Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Jann Horn <jannh@xxxxxxxxxx> Cc: Joerg Roedel <jroedel@xxxxxxx> Cc: Jonathan Corbet <corbet@xxxxxxx> Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx> Cc: Kate Stewart <kstewart@xxxxxxxxxxxxxxxxxxx> Cc: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: <linux-doc@xxxxxxxxxxxxxxx> Cc: Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Philippe Ombredanne <pombredanne@xxxxxxxx> Cc: Pu Wen <puwen@xxxxxxxx> Cc: <qianyue.zj@xxxxxxxxxxxxxxx> Cc: "Rafael J. Wysocki" <rafael@xxxxxxxxxx> Cc: Reinette Chatre <reinette.chatre@xxxxxxxxx> Cc: Rian Hunter <rian@xxxxxxxxxxxx> Cc: Sherry Hurwitz <sherry.hurwitz@xxxxxxx> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Thomas Lendacky <Thomas.Lendacky@xxxxxxx> Cc: Tony Luck <tony.luck@xxxxxxxxx> Cc: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> Cc: <xiaochen.shen@xxxxxxxxx> Link: https://lkml.kernel.org/r/20181121202811.4492-8-babu.moger@xxxxxxx --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c index cf159095b612..fada488069cb 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -1878,7 +1878,10 @@ static int parse_rdtgroupfs_options(char *data) if (ret) goto out; } else if (!strcmp(token, "mba_MBps")) { - ret = set_mba_sc(true); + if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) + ret = set_mba_sc(true); + else + ret = -EINVAL; if (ret) goto out; } else {