Add Intel's PQR as its own build target with no build dependency
on CQM. Add CONFIG_INTEL_RDT as a configuration flag that builds PQR
and related drivers (currently CQM, future: MBM, CAT, CDP).

Reviewed-by: Stephane Eranian <eran...@google.com>
Signed-off-by: David Carrillo-Cisneros <davi...@google.com>
---
 arch/x86/Kconfig               | 7 +++++++
 arch/x86/events/intel/Makefile | 3 ++-
 arch/x86/kernel/cpu/Makefile   | 4 ++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index a494fa3..52a7edc 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -160,6 +160,13 @@ config X86
        select ARCH_USES_HIGH_VMA_FLAGS         if 
X86_INTEL_MEMORY_PROTECTION_KEYS
        select ARCH_HAS_PKEYS                   if 
X86_INTEL_MEMORY_PROTECTION_KEYS
 
+config INTEL_RDT
+       def_bool y
+       depends on PERF_EVENTS && CPU_SUP_INTEL
+       ---help---
+       Enable Resource Director Technology (RDT) for Intel Xeon 
Microprocessors.
+       RDT includes Cache Monitoring Technology (CMT aka CQM).
+
 config INSTRUCTION_DECODER
        def_bool y
        depends on KPROBES || PERF_EVENTS || UPROBES
diff --git a/arch/x86/events/intel/Makefile b/arch/x86/events/intel/Makefile
index 3660b2c..7e610bf 100644
--- a/arch/x86/events/intel/Makefile
+++ b/arch/x86/events/intel/Makefile
@@ -1,4 +1,4 @@
-obj-$(CONFIG_CPU_SUP_INTEL)            += core.o bts.o cqm.o
+obj-$(CONFIG_CPU_SUP_INTEL)            += core.o bts.o
 obj-$(CONFIG_CPU_SUP_INTEL)            += ds.o knc.o
 obj-$(CONFIG_CPU_SUP_INTEL)            += lbr.o p4.o p6.o pt.o
 obj-$(CONFIG_PERF_EVENTS_INTEL_RAPL)   += intel-rapl.o
@@ -7,3 +7,4 @@ obj-$(CONFIG_PERF_EVENTS_INTEL_UNCORE)  += intel-uncore.o
 intel-uncore-objs                      := uncore.o uncore_nhmex.o uncore_snb.o 
uncore_snbep.o
 obj-$(CONFIG_PERF_EVENTS_INTEL_CSTATE) += intel-cstate.o
 intel-cstate-objs                      := cstate.o
+obj-$(CONFIG_INTEL_RDT)                        += cqm.o
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 4a8697f..87e6279 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -34,6 +34,10 @@ obj-$(CONFIG_CPU_SUP_CENTAUR)                += centaur.o
 obj-$(CONFIG_CPU_SUP_TRANSMETA_32)     += transmeta.o
 obj-$(CONFIG_CPU_SUP_UMC_32)           += umc.o
 
+ifdef CONFIG_CPU_SUP_INTEL
+obj-$(CONFIG_INTEL_RDT)                        += pqr_common.o
+endif
+
 obj-$(CONFIG_X86_MCE)                  += mcheck/
 obj-$(CONFIG_MTRR)                     += mtrr/
 obj-$(CONFIG_MICROCODE)                        += microcode/
-- 
2.8.0.rc3.226.g39d4020

Reply via email to