Re: [PATCH] perf/x86/uncore: modularize Intel uncore driver

From: Peter Zijlstra
Date: Wed Aug 13 2014 - 04:57:57 EST


On Wed, Aug 13, 2014 at 04:49:14PM +0800, Yan, Zheng wrote:
> This patch adds support for building Intel uncore driver as module.
> It adds clean-up code and config option for the Intel uncore driver.
>
> Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx>
> ---
> arch/x86/kernel/cpu/Makefile | 6 ++--
> arch/x86/kernel/cpu/perf_event_intel_uncore.c | 48 ++++++++++++++++++++++++---
> init/Kconfig | 15 +++++++++
> 3 files changed, 63 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
> index 7e1fd4e..2ef37fb 100644
> --- a/arch/x86/kernel/cpu/Makefile
> +++ b/arch/x86/kernel/cpu/Makefile
> @@ -36,9 +36,11 @@ obj-$(CONFIG_CPU_SUP_AMD) += perf_event_amd_iommu.o
> endif
> obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_p6.o perf_event_knc.o perf_event_p4.o
> obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_intel_lbr.o perf_event_intel_ds.o perf_event_intel.o
> -obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_intel_uncore.o perf_event_intel_uncore_snb.o
> -obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_intel_uncore_snbep.o perf_event_intel_uncore_nhmex.o
> obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_intel_rapl.o
> +
> +obj-$(CONFIG_PERF_X86_INTEL_UNCORE) += perf_x86_intel_uncore.o
> +perf_x86_intel_uncore-y += perf_event_intel_uncore.o perf_event_intel_uncore_snb.o
> +perf_x86_intel_uncore-y += perf_event_intel_uncore_snbep.o perf_event_intel_uncore_nhmex.o
> endif

Does it make sense to split it into 3 (or maybe 4) modules?

Attachment: pgpRqOAJ0sYaL.pgp
Description: PGP signature