[PATCH v9 08/13] x86/resctrl: Rename config parameter INTEL_RDT to RESCTRL

From: Moger, Babu
Date: Wed Nov 21 2018 - 15:29:29 EST


Resource control feature is supported by both Intel and AMD.
So, rename the INTEL_RDT to vendor neutral RESCTRL.

Now CONFIG_RESCTRL will be used for both Intel and AMD to enable
Resource Control support. Update the texts in config and condition
accordingly.

Signed-off-by: Babu Moger <babu.moger@xxxxxxx>
---
arch/x86/Kconfig | 23 ++++++++++++++++-------
arch/x86/include/asm/resctrl_sched.h | 4 ++--
arch/x86/kernel/cpu/Makefile | 2 +-
arch/x86/kernel/cpu/resctrl/Makefile | 4 ++--
include/linux/sched.h | 2 +-
5 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1a0be022f91d..36aad997caf8 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -445,16 +445,25 @@ config RETPOLINE
code are eliminated. Since this includes the syscall entry path,
it is not entirely pointless.

-config INTEL_RDT
- bool "Intel Resource Director Technology support"
+config RESCTRL
+ bool "Resource Control support"
default n
- depends on X86 && CPU_SUP_INTEL
+ depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD)
select KERNFS
help
- Select to enable resource allocation and monitoring which are
- sub-features of Intel Resource Director Technology(RDT). More
- information about RDT can be found in the Intel x86
- Architecture Software Developer Manual.
+ Select to enable Resource Control feature support.
+
+ These features are intended to provide the support for the allocation
+ and monitoring of the usage of certain system resources by one or more
+ processors.
+
+ Intel refers to this feature as Intel Resource Director Technology
+ (Intel(R) RDT). More information about RDT can be found in the
+ Intel x86 Architecture Software Developer Manual.
+
+ AMD refers to this feature as AMD Platform Quality of Service(AMD QoS).
+ More information about AMD QoS can be found in AMD64 Technology
+ Platform Quality of Service Extensions manual.

Say N if unsure.

diff --git a/arch/x86/include/asm/resctrl_sched.h b/arch/x86/include/asm/resctrl_sched.h
index 6e082697a613..54990fe2a3ae 100644
--- a/arch/x86/include/asm/resctrl_sched.h
+++ b/arch/x86/include/asm/resctrl_sched.h
@@ -2,7 +2,7 @@
#ifndef _ASM_X86_RESCTRL_SCHED_H
#define _ASM_X86_RESCTRL_SCHED_H

-#ifdef CONFIG_INTEL_RDT
+#ifdef CONFIG_RESCTRL

#include <linux/sched.h>
#include <linux/jump_label.h>
@@ -88,6 +88,6 @@ static inline void resctrl_sched_in(void)

static inline void resctrl_sched_in(void) {}

-#endif /* CONFIG_INTEL_RDT */
+#endif /* CONFIG_RESCTRL */

#endif /* _ASM_X86_RESCTRL_SCHED_H */
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 7dba9d611541..88d00e2224a7 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -38,7 +38,7 @@ obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o
obj-$(CONFIG_X86_MCE) += mcheck/
obj-$(CONFIG_MTRR) += mtrr/
obj-$(CONFIG_MICROCODE) += microcode/
-obj-$(CONFIG_INTEL_RDT) += resctrl/
+obj-$(CONFIG_RESCTRL) += resctrl/

obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o

diff --git a/arch/x86/kernel/cpu/resctrl/Makefile b/arch/x86/kernel/cpu/resctrl/Makefile
index 04c9fd67fb3e..86a98e52e22a 100644
--- a/arch/x86/kernel/cpu/resctrl/Makefile
+++ b/arch/x86/kernel/cpu/resctrl/Makefile
@@ -2,6 +2,6 @@
# Makefile for resource control feature code
#

-obj-$(CONFIG_INTEL_RDT) += core.o rdtgroup.o monitor.o
-obj-$(CONFIG_INTEL_RDT) += ctrlmondata.o pseudo_lock.o
+obj-$(CONFIG_RESCTRL) += core.o rdtgroup.o monitor.o
+obj-$(CONFIG_RESCTRL) += ctrlmondata.o pseudo_lock.o
CFLAGS_pseudo_lock.o = -I$(src)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 977cb57d7bc9..c4cf94c447b2 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -985,7 +985,7 @@ struct task_struct {
/* cg_list protected by css_set_lock and tsk->alloc_lock: */
struct list_head cg_list;
#endif
-#ifdef CONFIG_INTEL_RDT
+#ifdef CONFIG_RESCTRL
u32 closid;
u32 rmid;
#endif
--
2.17.1