linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] perf: Sanitize perf directory structure, p1
@ 2016-02-08 16:09 Borislav Petkov
  2016-02-08 16:09 ` [PATCH 1/5] x86/events: Move perf_event.c Borislav Petkov
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Borislav Petkov @ 2016-02-08 16:09 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, X86 ML, LKML

From: Borislav Petkov <bp@suse.de>

Hi,

here's v1 ontop of rc3 + tip/master, i.e., hopefully I've picked up all
relevant branches and rebased my pile ontop so that they don't break any
patches in-flight.

Please apply,
thanks.

Changelog:

v0:

so what better time to do that fun than during the holidays when no one
else is producing patches. :-)

Anyway, here's a part one conversion of the AMD perf events facilities.
Directory structure looks like this:

arch/x86/events/
|-- amd
|   |-- core.c
|   |-- ibs.c
|   |-- iommu.c
|   |-- iommu.h
|   `-- uncore.c
|-- core.c
`-- Makefile

and I've kept the churn at a mininum. Holler if something's not kosher.


Borislav Petkov (5):
  x86/events: Move perf_event.c
  x86/events: Move perf_event_amd.c
  x86/events: Move perf_event_amd_ibs.c
  x86/events: Move perf_event_amd_iommu.*
  x86/events: Move perf_event_amd_uncore.c

 arch/x86/Kbuild                                                   | 3 ++-
 arch/x86/events/Makefile                                          | 7 +++++++
 arch/x86/{kernel/cpu/perf_event_amd.c => events/amd/core.c}       | 2 +-
 arch/x86/{kernel/cpu/perf_event_amd_ibs.c => events/amd/ibs.c}    | 2 +-
 .../x86/{kernel/cpu/perf_event_amd_iommu.c => events/amd/iommu.c} | 4 ++--
 .../x86/{kernel/cpu/perf_event_amd_iommu.h => events/amd/iommu.h} | 0
 .../{kernel/cpu/perf_event_amd_uncore.c => events/amd/uncore.c}   | 0
 arch/x86/{kernel/cpu/perf_event.c => events/core.c}               | 2 +-
 arch/x86/kernel/cpu/Makefile                                      | 8 +-------
 9 files changed, 15 insertions(+), 13 deletions(-)
 create mode 100644 arch/x86/events/Makefile
 rename arch/x86/{kernel/cpu/perf_event_amd.c => events/amd/core.c} (99%)
 rename arch/x86/{kernel/cpu/perf_event_amd_ibs.c => events/amd/ibs.c} (99%)
 rename arch/x86/{kernel/cpu/perf_event_amd_iommu.c => events/amd/iommu.c} (99%)
 rename arch/x86/{kernel/cpu/perf_event_amd_iommu.h => events/amd/iommu.h} (100%)
 rename arch/x86/{kernel/cpu/perf_event_amd_uncore.c => events/amd/uncore.c} (100%)
 rename arch/x86/{kernel/cpu/perf_event.c => events/core.c} (99%)

-- 
2.3.5

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/5] x86/events: Move perf_event.c
  2016-02-08 16:09 [PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
@ 2016-02-08 16:09 ` Borislav Petkov
  2016-02-09 12:17   ` [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c tip-bot for Borislav Petkov
  2016-02-08 16:09 ` [PATCH 2/5] x86/events: Move perf_event_amd.c Borislav Petkov
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 16+ messages in thread
From: Borislav Petkov @ 2016-02-08 16:09 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, X86 ML, LKML

From: Borislav Petkov <bp@suse.de>

Also, keep the churn at minimum by adjusting the include "perf_event.h"
when each file gets moved.

Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/Kbuild                                     | 3 ++-
 arch/x86/events/Makefile                            | 1 +
 arch/x86/{kernel/cpu/perf_event.c => events/core.c} | 2 +-
 arch/x86/kernel/cpu/Makefile                        | 2 --
 4 files changed, 4 insertions(+), 4 deletions(-)
 create mode 100644 arch/x86/events/Makefile
 rename arch/x86/{kernel/cpu/perf_event.c => events/core.c} (99%)

diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild
index 1538562cc720..eb3abf8ac44e 100644
--- a/arch/x86/Kbuild
+++ b/arch/x86/Kbuild
@@ -1,6 +1,7 @@
-
 obj-y += entry/
 
+obj-$(CONFIG_PERF_EVENTS) += events/
+
 obj-$(CONFIG_KVM) += kvm/
 
 # Xen paravirtualization support
diff --git a/arch/x86/events/Makefile b/arch/x86/events/Makefile
new file mode 100644
index 000000000000..3fad3ce1bbab
--- /dev/null
+++ b/arch/x86/events/Makefile
@@ -0,0 +1 @@
+obj-y			+= core.o
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/events/core.c
similarity index 99%
rename from arch/x86/kernel/cpu/perf_event.c
rename to arch/x86/events/core.c
index 7402c8182813..90ca601b5d5c 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/events/core.c
@@ -37,7 +37,7 @@
 #include <asm/desc.h>
 #include <asm/ldt.h>
 
-#include "perf_event.h"
+#include "../kernel/cpu/perf_event.h"
 
 struct x86_pmu x86_pmu __read_mostly;
 
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index faa7b5204129..8cbc41b63447 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -30,8 +30,6 @@ obj-$(CONFIG_CPU_SUP_CENTAUR)		+= centaur.o
 obj-$(CONFIG_CPU_SUP_TRANSMETA_32)	+= transmeta.o
 obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
 
-obj-$(CONFIG_PERF_EVENTS)		+= perf_event.o
-
 ifdef CONFIG_PERF_EVENTS
 obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd.o perf_event_amd_uncore.o
 ifdef CONFIG_AMD_IOMMU
-- 
2.3.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/5] x86/events: Move perf_event_amd.c
  2016-02-08 16:09 [PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
  2016-02-08 16:09 ` [PATCH 1/5] x86/events: Move perf_event.c Borislav Petkov
@ 2016-02-08 16:09 ` Borislav Petkov
  2016-02-09 12:17   ` [tip:perf/core] perf/x86: Move perf_event_amd.c ........... => x86/events/amd/core.c tip-bot for Borislav Petkov
  2016-02-08 16:09 ` [PATCH 3/5] x86/events: Move perf_event_amd_ibs.c Borislav Petkov
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 16+ messages in thread
From: Borislav Petkov @ 2016-02-08 16:09 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, X86 ML, LKML

From: Borislav Petkov <bp@suse.de>

We distribute those in vendor subdirs, starting with .../events/amd/.

Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/events/Makefile                                    | 2 ++
 arch/x86/{kernel/cpu/perf_event_amd.c => events/amd/core.c} | 2 +-
 arch/x86/kernel/cpu/Makefile                                | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)
 rename arch/x86/{kernel/cpu/perf_event_amd.c => events/amd/core.c} (99%)

diff --git a/arch/x86/events/Makefile b/arch/x86/events/Makefile
index 3fad3ce1bbab..e0560b6dd77b 100644
--- a/arch/x86/events/Makefile
+++ b/arch/x86/events/Makefile
@@ -1 +1,3 @@
 obj-y			+= core.o
+
+obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/events/amd/core.c
similarity index 99%
rename from arch/x86/kernel/cpu/perf_event_amd.c
rename to arch/x86/events/amd/core.c
index 58610539b048..51b16583679c 100644
--- a/arch/x86/kernel/cpu/perf_event_amd.c
+++ b/arch/x86/events/amd/core.c
@@ -5,7 +5,7 @@
 #include <linux/slab.h>
 #include <asm/apicdef.h>
 
-#include "perf_event.h"
+#include "../../kernel/cpu/perf_event.h"
 
 static __initconst const u64 amd_hw_cache_event_ids
 				[PERF_COUNT_HW_CACHE_MAX]
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 8cbc41b63447..2ba0e37acb2d 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -31,7 +31,7 @@ obj-$(CONFIG_CPU_SUP_TRANSMETA_32)	+= transmeta.o
 obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
 
 ifdef CONFIG_PERF_EVENTS
-obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd.o perf_event_amd_uncore.o
+obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd_uncore.o
 ifdef CONFIG_AMD_IOMMU
 obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd_iommu.o
 endif
-- 
2.3.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/5] x86/events: Move perf_event_amd_ibs.c
  2016-02-08 16:09 [PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
  2016-02-08 16:09 ` [PATCH 1/5] x86/events: Move perf_event.c Borislav Petkov
  2016-02-08 16:09 ` [PATCH 2/5] x86/events: Move perf_event_amd.c Borislav Petkov
@ 2016-02-08 16:09 ` Borislav Petkov
  2016-02-09 12:17   ` [tip:perf/core] perf/x86: Move perf_event_amd_ibs.c ....... => x86/events/amd/ibs.c tip-bot for Borislav Petkov
  2016-02-08 16:09 ` [PATCH 4/5] x86/events: Move perf_event_amd_iommu.* Borislav Petkov
  2016-02-08 16:09 ` [PATCH 5/5] x86/events: Move perf_event_amd_uncore.c Borislav Petkov
  4 siblings, 1 reply; 16+ messages in thread
From: Borislav Petkov @ 2016-02-08 16:09 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, X86 ML, LKML

From: Borislav Petkov <bp@suse.de>

Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/events/Makefile                                       | 1 +
 arch/x86/{kernel/cpu/perf_event_amd_ibs.c => events/amd/ibs.c} | 2 +-
 arch/x86/kernel/cpu/Makefile                                   | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
 rename arch/x86/{kernel/cpu/perf_event_amd_ibs.c => events/amd/ibs.c} (99%)

diff --git a/arch/x86/events/Makefile b/arch/x86/events/Makefile
index e0560b6dd77b..88f787350bf0 100644
--- a/arch/x86/events/Makefile
+++ b/arch/x86/events/Makefile
@@ -1,3 +1,4 @@
 obj-y			+= core.o
 
 obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o
+obj-$(CONFIG_X86_LOCAL_APIC)            += amd/ibs.o
diff --git a/arch/x86/kernel/cpu/perf_event_amd_ibs.c b/arch/x86/events/amd/ibs.c
similarity index 99%
rename from arch/x86/kernel/cpu/perf_event_amd_ibs.c
rename to arch/x86/events/amd/ibs.c
index aa12f9509cfb..a8abd082d932 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_ibs.c
+++ b/arch/x86/events/amd/ibs.c
@@ -14,7 +14,7 @@
 
 #include <asm/apic.h>
 
-#include "perf_event.h"
+#include "../../kernel/cpu/perf_event.h"
 
 static u32 ibs_caps;
 
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 2ba0e37acb2d..b1711586005b 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -54,7 +54,7 @@ obj-$(CONFIG_X86_MCE)			+= mcheck/
 obj-$(CONFIG_MTRR)			+= mtrr/
 obj-$(CONFIG_MICROCODE)			+= microcode/
 
-obj-$(CONFIG_X86_LOCAL_APIC)		+= perfctr-watchdog.o perf_event_amd_ibs.o
+obj-$(CONFIG_X86_LOCAL_APIC)		+= perfctr-watchdog.o
 
 obj-$(CONFIG_HYPERVISOR_GUEST)		+= vmware.o hypervisor.o mshyperv.o
 
-- 
2.3.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/5] x86/events: Move perf_event_amd_iommu.*
  2016-02-08 16:09 [PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
                   ` (2 preceding siblings ...)
  2016-02-08 16:09 ` [PATCH 3/5] x86/events: Move perf_event_amd_ibs.c Borislav Petkov
@ 2016-02-08 16:09 ` Borislav Petkov
  2016-02-09 12:18   ` [tip:perf/core] perf/x86: Move perf_event_amd_iommu.[ch] .. => x86/events/amd/iommu.[ch] tip-bot for Borislav Petkov
  2016-02-08 16:09 ` [PATCH 5/5] x86/events: Move perf_event_amd_uncore.c Borislav Petkov
  4 siblings, 1 reply; 16+ messages in thread
From: Borislav Petkov @ 2016-02-08 16:09 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, X86 ML, LKML, Joerg Roedel

From: Borislav Petkov <bp@suse.de>

Cc: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/events/Makefile                                           | 3 +++
 arch/x86/{kernel/cpu/perf_event_amd_iommu.c => events/amd/iommu.c} | 4 ++--
 arch/x86/{kernel/cpu/perf_event_amd_iommu.h => events/amd/iommu.h} | 0
 arch/x86/kernel/cpu/Makefile                                       | 3 ---
 4 files changed, 5 insertions(+), 5 deletions(-)
 rename arch/x86/{kernel/cpu/perf_event_amd_iommu.c => events/amd/iommu.c} (99%)
 rename arch/x86/{kernel/cpu/perf_event_amd_iommu.h => events/amd/iommu.h} (100%)

diff --git a/arch/x86/events/Makefile b/arch/x86/events/Makefile
index 88f787350bf0..838195d90961 100644
--- a/arch/x86/events/Makefile
+++ b/arch/x86/events/Makefile
@@ -2,3 +2,6 @@ obj-y			+= core.o
 
 obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o
 obj-$(CONFIG_X86_LOCAL_APIC)            += amd/ibs.o
+ifdef CONFIG_AMD_IOMMU
+obj-$(CONFIG_CPU_SUP_AMD)               += amd/iommu.o
+endif
diff --git a/arch/x86/kernel/cpu/perf_event_amd_iommu.c b/arch/x86/events/amd/iommu.c
similarity index 99%
rename from arch/x86/kernel/cpu/perf_event_amd_iommu.c
rename to arch/x86/events/amd/iommu.c
index 97242a9242bd..629bc700eb08 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_iommu.c
+++ b/arch/x86/events/amd/iommu.c
@@ -16,8 +16,8 @@
 #include <linux/cpumask.h>
 #include <linux/slab.h>
 
-#include "perf_event.h"
-#include "perf_event_amd_iommu.h"
+#include "../../kernel/cpu/perf_event.h"
+#include "iommu.h"
 
 #define COUNTER_SHIFT		16
 
diff --git a/arch/x86/kernel/cpu/perf_event_amd_iommu.h b/arch/x86/events/amd/iommu.h
similarity index 100%
rename from arch/x86/kernel/cpu/perf_event_amd_iommu.h
rename to arch/x86/events/amd/iommu.h
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index b1711586005b..37444ffd714d 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -32,9 +32,6 @@ obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
 
 ifdef CONFIG_PERF_EVENTS
 obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd_uncore.o
-ifdef CONFIG_AMD_IOMMU
-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_rapl.o perf_event_intel_cqm.o
-- 
2.3.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 5/5] x86/events: Move perf_event_amd_uncore.c
  2016-02-08 16:09 [PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
                   ` (3 preceding siblings ...)
  2016-02-08 16:09 ` [PATCH 4/5] x86/events: Move perf_event_amd_iommu.* Borislav Petkov
@ 2016-02-08 16:09 ` Borislav Petkov
  2016-02-09 12:18   ` [tip:perf/core] perf/x86: Move perf_event_amd_uncore.c .... => x86/events/amd/uncore.c tip-bot for Borislav Petkov
  4 siblings, 1 reply; 16+ messages in thread
From: Borislav Petkov @ 2016-02-08 16:09 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, X86 ML, LKML

From: Borislav Petkov <bp@suse.de>

Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/events/Makefile                                             | 2 +-
 arch/x86/{kernel/cpu/perf_event_amd_uncore.c => events/amd/uncore.c} | 0
 arch/x86/kernel/cpu/Makefile                                         | 1 -
 3 files changed, 1 insertion(+), 2 deletions(-)
 rename arch/x86/{kernel/cpu/perf_event_amd_uncore.c => events/amd/uncore.c} (100%)

diff --git a/arch/x86/events/Makefile b/arch/x86/events/Makefile
index 838195d90961..7d1ecff583b0 100644
--- a/arch/x86/events/Makefile
+++ b/arch/x86/events/Makefile
@@ -1,6 +1,6 @@
 obj-y			+= core.o
 
-obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o
+obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o amd/uncore.o
 obj-$(CONFIG_X86_LOCAL_APIC)            += amd/ibs.o
 ifdef CONFIG_AMD_IOMMU
 obj-$(CONFIG_CPU_SUP_AMD)               += amd/iommu.o
diff --git a/arch/x86/kernel/cpu/perf_event_amd_uncore.c b/arch/x86/events/amd/uncore.c
similarity index 100%
rename from arch/x86/kernel/cpu/perf_event_amd_uncore.c
rename to arch/x86/events/amd/uncore.c
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 37444ffd714d..d8cf3338a035 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -31,7 +31,6 @@ obj-$(CONFIG_CPU_SUP_TRANSMETA_32)	+= transmeta.o
 obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
 
 ifdef CONFIG_PERF_EVENTS
-obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd_uncore.o
 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_rapl.o perf_event_intel_cqm.o
-- 
2.3.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c
  2016-02-08 16:09 ` [PATCH 1/5] x86/events: Move perf_event.c Borislav Petkov
@ 2016-02-09 12:17   ` tip-bot for Borislav Petkov
  2016-02-09 13:55     ` Vince Weaver
  0 siblings, 1 reply; 16+ messages in thread
From: tip-bot for Borislav Petkov @ 2016-02-09 12:17 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: jolsa, linux-kernel, a.p.zijlstra, bp, acme, torvalds, eranian,
	mingo, peterz, hpa, tglx, vincent.weaver

Commit-ID:  fa9cbf320e996eaa3d219344b6f7013b096cafd9
Gitweb:     http://git.kernel.org/tip/fa9cbf320e996eaa3d219344b6f7013b096cafd9
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Mon, 8 Feb 2016 17:09:04 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 9 Feb 2016 10:23:49 +0100

perf/x86: Move perf_event.c ............... => x86/events/core.c

Also, keep the churn at minimum by adjusting the include "perf_event.h"
when each file gets moved.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1454947748-28629-2-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/Kbuild                                     | 3 ++-
 arch/x86/events/Makefile                            | 1 +
 arch/x86/{kernel/cpu/perf_event.c => events/core.c} | 2 +-
 arch/x86/kernel/cpu/Makefile                        | 2 --
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild
index 1538562..eb3abf8 100644
--- a/arch/x86/Kbuild
+++ b/arch/x86/Kbuild
@@ -1,6 +1,7 @@
-
 obj-y += entry/
 
+obj-$(CONFIG_PERF_EVENTS) += events/
+
 obj-$(CONFIG_KVM) += kvm/
 
 # Xen paravirtualization support
diff --git a/arch/x86/events/Makefile b/arch/x86/events/Makefile
new file mode 100644
index 0000000..3fad3ce
--- /dev/null
+++ b/arch/x86/events/Makefile
@@ -0,0 +1 @@
+obj-y			+= core.o
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/events/core.c
similarity index 99%
rename from arch/x86/kernel/cpu/perf_event.c
rename to arch/x86/events/core.c
index 7402c818..90ca601 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/events/core.c
@@ -37,7 +37,7 @@
 #include <asm/desc.h>
 #include <asm/ldt.h>
 
-#include "perf_event.h"
+#include "../kernel/cpu/perf_event.h"
 
 struct x86_pmu x86_pmu __read_mostly;
 
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 5803130..77000d5 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -30,8 +30,6 @@ obj-$(CONFIG_CPU_SUP_CENTAUR)		+= centaur.o
 obj-$(CONFIG_CPU_SUP_TRANSMETA_32)	+= transmeta.o
 obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
 
-obj-$(CONFIG_PERF_EVENTS)		+= perf_event.o
-
 ifdef CONFIG_PERF_EVENTS
 obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd.o perf_event_amd_uncore.o
 ifdef CONFIG_AMD_IOMMU

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [tip:perf/core] perf/x86: Move perf_event_amd.c ........... => x86/events/amd/core.c
  2016-02-08 16:09 ` [PATCH 2/5] x86/events: Move perf_event_amd.c Borislav Petkov
@ 2016-02-09 12:17   ` tip-bot for Borislav Petkov
  0 siblings, 0 replies; 16+ messages in thread
From: tip-bot for Borislav Petkov @ 2016-02-09 12:17 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: eranian, bp, acme, tglx, jolsa, torvalds, mingo, peterz,
	vincent.weaver, hpa, a.p.zijlstra, linux-kernel

Commit-ID:  39b0332a215832ce3a8f8f57344da4a64370e3ca
Gitweb:     http://git.kernel.org/tip/39b0332a215832ce3a8f8f57344da4a64370e3ca
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Mon, 8 Feb 2016 17:09:05 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 9 Feb 2016 10:23:49 +0100

perf/x86: Move perf_event_amd.c ........... => x86/events/amd/core.c

We distribute those in vendor subdirs, starting with .../events/amd/.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1454947748-28629-3-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/events/Makefile                                    | 2 ++
 arch/x86/{kernel/cpu/perf_event_amd.c => events/amd/core.c} | 2 +-
 arch/x86/kernel/cpu/Makefile                                | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/events/Makefile b/arch/x86/events/Makefile
index 3fad3ce..e0560b6 100644
--- a/arch/x86/events/Makefile
+++ b/arch/x86/events/Makefile
@@ -1 +1,3 @@
 obj-y			+= core.o
+
+obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/events/amd/core.c
similarity index 99%
rename from arch/x86/kernel/cpu/perf_event_amd.c
rename to arch/x86/events/amd/core.c
index 5861053..51b1658 100644
--- a/arch/x86/kernel/cpu/perf_event_amd.c
+++ b/arch/x86/events/amd/core.c
@@ -5,7 +5,7 @@
 #include <linux/slab.h>
 #include <asm/apicdef.h>
 
-#include "perf_event.h"
+#include "../../kernel/cpu/perf_event.h"
 
 static __initconst const u64 amd_hw_cache_event_ids
 				[PERF_COUNT_HW_CACHE_MAX]
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 77000d5..d549b02 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -31,7 +31,7 @@ obj-$(CONFIG_CPU_SUP_TRANSMETA_32)	+= transmeta.o
 obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
 
 ifdef CONFIG_PERF_EVENTS
-obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd.o perf_event_amd_uncore.o
+obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd_uncore.o
 ifdef CONFIG_AMD_IOMMU
 obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd_iommu.o
 endif

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [tip:perf/core] perf/x86: Move perf_event_amd_ibs.c ....... => x86/events/amd/ibs.c
  2016-02-08 16:09 ` [PATCH 3/5] x86/events: Move perf_event_amd_ibs.c Borislav Petkov
@ 2016-02-09 12:17   ` tip-bot for Borislav Petkov
  0 siblings, 0 replies; 16+ messages in thread
From: tip-bot for Borislav Petkov @ 2016-02-09 12:17 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: jolsa, mingo, eranian, vincent.weaver, bp, peterz, tglx, acme,
	linux-kernel, a.p.zijlstra, torvalds, hpa

Commit-ID:  218cfe4ed8885f988d67ac5f52efeff7233ae1f2
Gitweb:     http://git.kernel.org/tip/218cfe4ed8885f988d67ac5f52efeff7233ae1f2
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Mon, 8 Feb 2016 17:09:06 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 9 Feb 2016 10:23:49 +0100

perf/x86: Move perf_event_amd_ibs.c ....... => x86/events/amd/ibs.c

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1454947748-28629-4-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/events/Makefile                                       | 1 +
 arch/x86/{kernel/cpu/perf_event_amd_ibs.c => events/amd/ibs.c} | 2 +-
 arch/x86/kernel/cpu/Makefile                                   | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/events/Makefile b/arch/x86/events/Makefile
index e0560b6..88f7873 100644
--- a/arch/x86/events/Makefile
+++ b/arch/x86/events/Makefile
@@ -1,3 +1,4 @@
 obj-y			+= core.o
 
 obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o
+obj-$(CONFIG_X86_LOCAL_APIC)            += amd/ibs.o
diff --git a/arch/x86/kernel/cpu/perf_event_amd_ibs.c b/arch/x86/events/amd/ibs.c
similarity index 99%
rename from arch/x86/kernel/cpu/perf_event_amd_ibs.c
rename to arch/x86/events/amd/ibs.c
index aa12f95..a8abd08 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_ibs.c
+++ b/arch/x86/events/amd/ibs.c
@@ -14,7 +14,7 @@
 
 #include <asm/apic.h>
 
-#include "perf_event.h"
+#include "../../kernel/cpu/perf_event.h"
 
 static u32 ibs_caps;
 
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index d549b02..dddba22 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -54,7 +54,7 @@ obj-$(CONFIG_X86_MCE)			+= mcheck/
 obj-$(CONFIG_MTRR)			+= mtrr/
 obj-$(CONFIG_MICROCODE)			+= microcode/
 
-obj-$(CONFIG_X86_LOCAL_APIC)		+= perfctr-watchdog.o perf_event_amd_ibs.o
+obj-$(CONFIG_X86_LOCAL_APIC)		+= perfctr-watchdog.o
 
 obj-$(CONFIG_HYPERVISOR_GUEST)		+= vmware.o hypervisor.o mshyperv.o
 

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [tip:perf/core] perf/x86: Move perf_event_amd_iommu.[ch] .. => x86/events/amd/iommu.[ch]
  2016-02-08 16:09 ` [PATCH 4/5] x86/events: Move perf_event_amd_iommu.* Borislav Petkov
@ 2016-02-09 12:18   ` tip-bot for Borislav Petkov
  0 siblings, 0 replies; 16+ messages in thread
From: tip-bot for Borislav Petkov @ 2016-02-09 12:18 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: hpa, vincent.weaver, a.p.zijlstra, torvalds, eranian, peterz,
	linux-kernel, acme, joro, bp, tglx, mingo, jolsa

Commit-ID:  5b26547dd7faa84e1293baa144a0f3e74ed7d4c7
Gitweb:     http://git.kernel.org/tip/5b26547dd7faa84e1293baa144a0f3e74ed7d4c7
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Mon, 8 Feb 2016 17:09:07 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 9 Feb 2016 10:23:50 +0100

perf/x86: Move perf_event_amd_iommu.[ch] .. => x86/events/amd/iommu.[ch]

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1454947748-28629-5-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/events/Makefile                                           | 3 +++
 arch/x86/{kernel/cpu/perf_event_amd_iommu.c => events/amd/iommu.c} | 4 ++--
 arch/x86/{kernel/cpu/perf_event_amd_iommu.h => events/amd/iommu.h} | 0
 arch/x86/kernel/cpu/Makefile                                       | 3 ---
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/events/Makefile b/arch/x86/events/Makefile
index 88f7873..838195d 100644
--- a/arch/x86/events/Makefile
+++ b/arch/x86/events/Makefile
@@ -2,3 +2,6 @@ obj-y			+= core.o
 
 obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o
 obj-$(CONFIG_X86_LOCAL_APIC)            += amd/ibs.o
+ifdef CONFIG_AMD_IOMMU
+obj-$(CONFIG_CPU_SUP_AMD)               += amd/iommu.o
+endif
diff --git a/arch/x86/kernel/cpu/perf_event_amd_iommu.c b/arch/x86/events/amd/iommu.c
similarity index 99%
rename from arch/x86/kernel/cpu/perf_event_amd_iommu.c
rename to arch/x86/events/amd/iommu.c
index 97242a9..629bc70 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_iommu.c
+++ b/arch/x86/events/amd/iommu.c
@@ -16,8 +16,8 @@
 #include <linux/cpumask.h>
 #include <linux/slab.h>
 
-#include "perf_event.h"
-#include "perf_event_amd_iommu.h"
+#include "../../kernel/cpu/perf_event.h"
+#include "iommu.h"
 
 #define COUNTER_SHIFT		16
 
diff --git a/arch/x86/kernel/cpu/perf_event_amd_iommu.h b/arch/x86/events/amd/iommu.h
similarity index 100%
rename from arch/x86/kernel/cpu/perf_event_amd_iommu.h
rename to arch/x86/events/amd/iommu.h
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index dddba22..2e15d9d 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -32,9 +32,6 @@ obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
 
 ifdef CONFIG_PERF_EVENTS
 obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd_uncore.o
-ifdef CONFIG_AMD_IOMMU
-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_rapl.o perf_event_intel_cqm.o

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [tip:perf/core] perf/x86: Move perf_event_amd_uncore.c .... => x86/events/amd/uncore.c
  2016-02-08 16:09 ` [PATCH 5/5] x86/events: Move perf_event_amd_uncore.c Borislav Petkov
@ 2016-02-09 12:18   ` tip-bot for Borislav Petkov
  0 siblings, 0 replies; 16+ messages in thread
From: tip-bot for Borislav Petkov @ 2016-02-09 12:18 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, eranian, torvalds, peterz, hpa, tglx, vincent.weaver,
	a.p.zijlstra, bp, jolsa, mingo, linux-kernel

Commit-ID:  d0af1c0525d561fe3ab6d7a767cdd52704da25cd
Gitweb:     http://git.kernel.org/tip/d0af1c0525d561fe3ab6d7a767cdd52704da25cd
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Mon, 8 Feb 2016 17:09:08 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 9 Feb 2016 10:23:50 +0100

perf/x86: Move perf_event_amd_uncore.c .... => x86/events/amd/uncore.c

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1454947748-28629-6-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/events/Makefile                                             | 2 +-
 arch/x86/{kernel/cpu/perf_event_amd_uncore.c => events/amd/uncore.c} | 0
 arch/x86/kernel/cpu/Makefile                                         | 1 -
 3 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/events/Makefile b/arch/x86/events/Makefile
index 838195d..7d1ecff 100644
--- a/arch/x86/events/Makefile
+++ b/arch/x86/events/Makefile
@@ -1,6 +1,6 @@
 obj-y			+= core.o
 
-obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o
+obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o amd/uncore.o
 obj-$(CONFIG_X86_LOCAL_APIC)            += amd/ibs.o
 ifdef CONFIG_AMD_IOMMU
 obj-$(CONFIG_CPU_SUP_AMD)               += amd/iommu.o
diff --git a/arch/x86/kernel/cpu/perf_event_amd_uncore.c b/arch/x86/events/amd/uncore.c
similarity index 100%
rename from arch/x86/kernel/cpu/perf_event_amd_uncore.c
rename to arch/x86/events/amd/uncore.c
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 2e15d9d..7edbeb9 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -31,7 +31,6 @@ obj-$(CONFIG_CPU_SUP_TRANSMETA_32)	+= transmeta.o
 obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
 
 ifdef CONFIG_PERF_EVENTS
-obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd_uncore.o
 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_rapl.o perf_event_intel_cqm.o

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c
  2016-02-09 12:17   ` [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c tip-bot for Borislav Petkov
@ 2016-02-09 13:55     ` Vince Weaver
  2016-02-09 14:00       ` Thomas Gleixner
  2016-02-09 14:05       ` Ingo Molnar
  0 siblings, 2 replies; 16+ messages in thread
From: Vince Weaver @ 2016-02-09 13:55 UTC (permalink / raw)
  To: jolsa, linux-kernel, bp, a.p.zijlstra, acme, torvalds, eranian,
	peterz, hpa, mingo, tglx, vincent.weaver
  Cc: linux-tip-commits

On Tue, 9 Feb 2016, tip-bot for Borislav Petkov wrote:

> Commit-ID:  fa9cbf320e996eaa3d219344b6f7013b096cafd9
> Gitweb:     http://git.kernel.org/tip/fa9cbf320e996eaa3d219344b6f7013b096cafd9
> Author:     Borislav Petkov <bp@suse.de>
> AuthorDate: Mon, 8 Feb 2016 17:09:04 +0100
> Committer:  Ingo Molnar <mingo@kernel.org>
> CommitDate: Tue, 9 Feb 2016 10:23:49 +0100
> 
> perf/x86: Move perf_event.c ............... => x86/events/core.c
> 
> Also, keep the churn at minimum by adjusting the include "perf_event.h"
> when each file gets moved.

I have to admit I've been falling behind on my lkml reading, but is there 
a good reason for moving all these files around?

I'm often using "git blame" to track down when bugs are introduced, and 
it's a big pain trying to do that across file moves like this.  Although 
that's maybe just due to difficiencies in my git usage skills.

Vince

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c
  2016-02-09 13:55     ` Vince Weaver
@ 2016-02-09 14:00       ` Thomas Gleixner
  2016-02-09 14:05       ` Ingo Molnar
  1 sibling, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2016-02-09 14:00 UTC (permalink / raw)
  To: Vince Weaver
  Cc: jolsa, linux-kernel, bp, a.p.zijlstra, acme, torvalds, eranian,
	peterz, hpa, mingo, linux-tip-commits

On Tue, 9 Feb 2016, Vince Weaver wrote:
> On Tue, 9 Feb 2016, tip-bot for Borislav Petkov wrote:
> 
> > Commit-ID:  fa9cbf320e996eaa3d219344b6f7013b096cafd9
> > Gitweb:     http://git.kernel.org/tip/fa9cbf320e996eaa3d219344b6f7013b096cafd9
> > Author:     Borislav Petkov <bp@suse.de>
> > AuthorDate: Mon, 8 Feb 2016 17:09:04 +0100
> > Committer:  Ingo Molnar <mingo@kernel.org>
> > CommitDate: Tue, 9 Feb 2016 10:23:49 +0100
> > 
> > perf/x86: Move perf_event.c ............... => x86/events/core.c
> > 
> > Also, keep the churn at minimum by adjusting the include "perf_event.h"
> > when each file gets moved.
> 
> I have to admit I've been falling behind on my lkml reading, but is there 
> a good reason for moving all these files around?
> 
> I'm often using "git blame" to track down when bugs are introduced, and 
> it's a big pain trying to do that across file moves like this.  Although 
> that's maybe just due to difficiencies in my git usage skills.

git blame still tells you which commit modified a particular line. That's not
lost accross a file move.

git log stops per default when a file moved, but you can tell it not to do so
via "--follow".

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c
  2016-02-09 13:55     ` Vince Weaver
  2016-02-09 14:00       ` Thomas Gleixner
@ 2016-02-09 14:05       ` Ingo Molnar
  2016-02-09 14:11         ` Borislav Petkov
  2016-02-12 22:12         ` {SPAM?} " Vince Weaver
  1 sibling, 2 replies; 16+ messages in thread
From: Ingo Molnar @ 2016-02-09 14:05 UTC (permalink / raw)
  To: Vince Weaver
  Cc: jolsa, linux-kernel, bp, a.p.zijlstra, acme, torvalds, eranian,
	peterz, hpa, tglx, linux-tip-commits


* Vince Weaver <vincent.weaver@maine.edu> wrote:

> On Tue, 9 Feb 2016, tip-bot for Borislav Petkov wrote:
> 
> > Commit-ID:  fa9cbf320e996eaa3d219344b6f7013b096cafd9
> > Gitweb:     http://git.kernel.org/tip/fa9cbf320e996eaa3d219344b6f7013b096cafd9
> > Author:     Borislav Petkov <bp@suse.de>
> > AuthorDate: Mon, 8 Feb 2016 17:09:04 +0100
> > Committer:  Ingo Molnar <mingo@kernel.org>
> > CommitDate: Tue, 9 Feb 2016 10:23:49 +0100
> > 
> > perf/x86: Move perf_event.c ............... => x86/events/core.c
> > 
> > Also, keep the churn at minimum by adjusting the include "perf_event.h"
> > when each file gets moved.
> 
> I have to admit I've been falling behind on my lkml reading, but is there 
> a good reason for moving all these files around?

Yeah, as the PMU drivers grew organically the naming scheme became a bit messy:

 - for example the uncore drivers are under kernel/cpu/, although they are not
   bound to CPUs.

 - separation between various vendor drivers is not always chrystal clear.

 - the 'kernel/' subdirectory is a needless anachronism, we try to move bits out
   of it when the opportunity presents itself.

 - the new naming also better follows the core kernel/events/ perf code.

I presume after this round of patches is in, Boris will send another round to 
reorganize the Intel PMU drivers as well.

> I'm often using "git blame" to track down when bugs are introduced, and it's a 
> big pain trying to do that across file moves like this.  Although that's maybe 
> just due to difficiencies in my git usage skills.

It seems to work reasonably well here:

241771ef016b5 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2008-12-03 10:39:53 +0100    1) /*
cdd6c482c9ff9 arch/x86/kernel/cpu/perf_event.c   (Ingo Molnar            2009-09-21 12:02:48 +0200    2)  * Performance events x86 architecture code
241771ef016b5 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2008-12-03 10:39:53 +0100    3)  *
98144511427c1 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2009-04-29 14:52:50 +0200    4)  *  Copyright (C) 2008 Thomas Gleixner <tglx@linutronix.de>
98144511427c1 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2009-04-29 14:52:50 +0200    5)  *  Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
98144511427c1 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2009-04-29 14:52:50 +0200    6)  *  Copyright (C) 2009 Jaswinder Singh Rajput
98144511427c1 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2009-04-29 14:52:50 +0200    7)  *  Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
90eec103b96e3 arch/x86/kernel/cpu/perf_event.c   (Peter Zijlstra         2015-11-16 11:08:45 +0100    8)  *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
30dd568c91260 arch/x86/kernel/cpu/perf_counter.c (Markus Metzger         2009-07-21 15:56:48 +0200    9)  *  Copyright (C) 2009 Intel Corporation, <markus.t.metzger@intel.com>
1da53e023029c arch/x86/kernel/cpu/perf_event.c   (Stephane Eranian       2010-01-18 10:58:01 +0200   10)  *  Copyright (C) 2009 Google, Inc., Stephane Eranian
241771ef016b5 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2008-12-03 10:39:53 +0100   11)  *
241771ef016b5 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2008-12-03 10:39:53 +0100   12)  *  For licencing details see kernel-base/COPYING
241771ef016b5 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2008-12-03 10:39:53 +0100   13)  */
241771ef016b5 arch/x86/kernel/cpu/perf_counter.c (Ingo Molnar            2008-12-03 10:39:53 +0100   14) 
[...]
c48b60538c3ba arch/x86/kernel/cpu/perf_event.c   (Vince Weaver           2012-03-01 17:28:14 -0500   84)        rdpmcl(hwc->event_base_rdpmc, new_raw_count);

see for example how Git still knows that we had a 
arch/x86/kernel/cpu/perf_counter.c initial file name.

Or how you did an optimization in c48b60538c3ba when the file was already named 
cpu/perf_event.c! :-)

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c
  2016-02-09 14:05       ` Ingo Molnar
@ 2016-02-09 14:11         ` Borislav Petkov
  2016-02-12 22:12         ` {SPAM?} " Vince Weaver
  1 sibling, 0 replies; 16+ messages in thread
From: Borislav Petkov @ 2016-02-09 14:11 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Vince Weaver, jolsa, linux-kernel, a.p.zijlstra, acme, torvalds,
	eranian, peterz, hpa, tglx, linux-tip-commits

On Tue, Feb 09, 2016 at 03:05:51PM +0100, Ingo Molnar wrote:
> I presume after this round of patches is in, Boris will send another
> round to reorganize the Intel PMU drivers as well.

Yes, he will. He will base them ontop of newest tip/master too.

:-)

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: {SPAM?} Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c
  2016-02-09 14:05       ` Ingo Molnar
  2016-02-09 14:11         ` Borislav Petkov
@ 2016-02-12 22:12         ` Vince Weaver
  1 sibling, 0 replies; 16+ messages in thread
From: Vince Weaver @ 2016-02-12 22:12 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Vince Weaver, jolsa, linux-kernel, bp, a.p.zijlstra, acme,
	torvalds, eranian, peterz, hpa, tglx, linux-tip-commits

On Tue, 9 Feb 2016, Ingo Molnar wrote:

> see for example how Git still knows that we had a 
> arch/x86/kernel/cpu/perf_counter.c initial file name.
> 
> Or how you did an optimization in c48b60538c3ba when the file was already named 
> cpu/perf_event.c! :-)

yes, for simple renames it works, but once files start getting 
"reorganized" and split up it gets tricky.  For example trying to track 
things across the single perf_event.h to the separate perf_event.h files
after the UAPI split is always a pain.

But anyway, it sounds like the renames are being done for reasonably good 
reasons, it's just the tip commit message that came my way didn't have 
this extra context.

Thanks,

Vince

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-02-12 22:12 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-08 16:09 [PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
2016-02-08 16:09 ` [PATCH 1/5] x86/events: Move perf_event.c Borislav Petkov
2016-02-09 12:17   ` [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c tip-bot for Borislav Petkov
2016-02-09 13:55     ` Vince Weaver
2016-02-09 14:00       ` Thomas Gleixner
2016-02-09 14:05       ` Ingo Molnar
2016-02-09 14:11         ` Borislav Petkov
2016-02-12 22:12         ` {SPAM?} " Vince Weaver
2016-02-08 16:09 ` [PATCH 2/5] x86/events: Move perf_event_amd.c Borislav Petkov
2016-02-09 12:17   ` [tip:perf/core] perf/x86: Move perf_event_amd.c ........... => x86/events/amd/core.c tip-bot for Borislav Petkov
2016-02-08 16:09 ` [PATCH 3/5] x86/events: Move perf_event_amd_ibs.c Borislav Petkov
2016-02-09 12:17   ` [tip:perf/core] perf/x86: Move perf_event_amd_ibs.c ....... => x86/events/amd/ibs.c tip-bot for Borislav Petkov
2016-02-08 16:09 ` [PATCH 4/5] x86/events: Move perf_event_amd_iommu.* Borislav Petkov
2016-02-09 12:18   ` [tip:perf/core] perf/x86: Move perf_event_amd_iommu.[ch] .. => x86/events/amd/iommu.[ch] tip-bot for Borislav Petkov
2016-02-08 16:09 ` [PATCH 5/5] x86/events: Move perf_event_amd_uncore.c Borislav Petkov
2016-02-09 12:18   ` [tip:perf/core] perf/x86: Move perf_event_amd_uncore.c .... => x86/events/amd/uncore.c tip-bot for Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).