Skip to contentSkip to conversation

perf: Sanitize perf directory structure, p1

PATCH In review Borislav Petkov 6 participants 16 messages Feb 8, 2016 – Feb 12, 2016

Subsystems (2)
lore
Share & tools
lore

Borislav Petkov

author maintainer
#0 lore raw

cover perf: Sanitize perf directory structure, p1

From: Borislav Petkov <[email protected]>

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%)
Signature · 1 line
2.3.5
author maintainer
#1 lore raw

PATCH 1/5 x86/events: Move perf_event.c

From: Borislav Petkov <[email protected]>

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

---
 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%)
arch/x86/Kbuild +2 -1
index 1538562cc720..eb3abf8ac44e 100644
@@ -1,6 +1,7 @@
-
 obj-y += entry/
 
+obj-$(CONFIG_PERF_EVENTS) += events/
+
 obj-$(CONFIG_KVM) += kvm/
 
 # Xen paravirtualization support
arch/x86/events/Makefile new file +1 -0
new file mode 100644
index 000000000000..3fad3ce1bbab
@@ -0,0 +1 @@
+obj-y			+= core.o
arch/x86/events/core.c renamed from arch/x86/kernel/cpu/perf_event.c +1 -1
similarity index 99%
rename from arch/x86/kernel/cpu/perf_event.c
rename to arch/x86/events/core.c
index 7402c8182813..90ca601b5d5c 100644
@@ -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;
 
arch/x86/kernel/cpu/Makefile +0 -2
index faa7b5204129..8cbc41b63447 100644
@@ -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
Signature · 1 line
2.3.5
#2 lore raw

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

perf/x86: Move perf_event.c ............... => x86/events/core.c
Commit-ID:  fa9cbf320e996eaa3d219344b6f7013b096cafd9
Gitweb:     http://git.kernel.org/tip/fa9cbf320e996eaa3d219344b6f7013b096cafd9
Author:     Borislav Petkov <[email protected]>
AuthorDate: Mon, 8 Feb 2016 17:09:04 +0100
Committer:  Ingo Molnar <[email protected]>
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.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vince Weaver <[email protected]>
---
 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(-)
arch/x86/Kbuild +2 -1
index 1538562..eb3abf8 100644
@@ -1,6 +1,7 @@
-
 obj-y += entry/
 
+obj-$(CONFIG_PERF_EVENTS) += events/
+
 obj-$(CONFIG_KVM) += kvm/
 
 # Xen paravirtualization support
arch/x86/events/Makefile new file +1 -0
new file mode 100644
index 0000000..3fad3ce
@@ -0,0 +1 @@
+obj-y			+= core.o
arch/x86/events/core.c renamed from arch/x86/kernel/cpu/perf_event.c +1 -1
similarity index 99%
rename from arch/x86/kernel/cpu/perf_event.c
rename to arch/x86/events/core.c
index 7402c818..90ca601 100644
@@ -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;
 
arch/x86/kernel/cpu/Makefile +0 -2
index 5803130..77000d5 100644
@@ -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
#3 lore raw

Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c

Quoted 11 lines · tip-bot for Borislav Petkov
Commit-ID:  fa9cbf320e996eaa3d219344b6f7013b096cafd9
Gitweb:     http://git.kernel.org/tip/fa9cbf320e996eaa3d219344b6f7013b096cafd9
Author:     Borislav Petkov <[email protected]>
AuthorDate: Mon, 8 Feb 2016 17:09:04 +0100
Committer:  Ingo Molnar <[email protected]>
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

#4 lore raw

Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c

Quoted 14 lines · Vince Weaver
Quoted 11 lines · tip-bot for Borislav Petkov
Commit-ID:  fa9cbf320e996eaa3d219344b6f7013b096cafd9
Gitweb:     http://git.kernel.org/tip/fa9cbf320e996eaa3d219344b6f7013b096cafd9
Author:     Borislav Petkov <[email protected]>
AuthorDate: Mon, 8 Feb 2016 17:09:04 +0100
Committer:  Ingo Molnar <[email protected]>
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.

Quoted 6 lines

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

#5 lore raw

Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c

In reply to Vince Weaver
Quoted 9 lines · Vince Weaver
Quoted 7 lines · tip-bot for Borislav Petkov
Commit-ID:  fa9cbf320e996eaa3d219344b6f7013b096cafd9
Gitweb:     http://git.kernel.org/tip/fa9cbf320e996eaa3d219344b6f7013b096cafd9
Author:     Borislav Petkov <[email protected]>
AuthorDate: Mon, 8 Feb 2016 17:09:04 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 9 Feb 2016 10:23:49 +0100
Quoted 7 lines
Quoted 4 lines

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.

Quoted 3 lines

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 <[email protected]>
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, <[email protected]>
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

#6 lore raw

Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c

Quoted 2 lines · Ingo Molnar

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.

:-)

Signature · 5 lines
Regards/Gruss,
    Boris.

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

Re: {SPAM?} Re: [tip:perf/core] perf/x86: Move perf_event.c ............... => x86/events/core.c

In reply to Ingo Molnar
Quoted 5 lines · Ingo Molnar

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

author maintainer
#8 lore raw

PATCH 2/5 x86/events: Move perf_event_amd.c

In reply to Borislav Petkov

From: Borislav Petkov <[email protected]>

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

---
 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%)
arch/x86/events/Makefile +2 -0
index 3fad3ce1bbab..e0560b6dd77b 100644
@@ -1 +1,3 @@
 obj-y			+= core.o
+
+obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o
arch/x86/events/amd/core.c renamed from arch/x86/kernel/cpu/perf_event_amd.c +1 -1
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
@@ -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]
arch/x86/kernel/cpu/Makefile +1 -1
index 8cbc41b63447..2ba0e37acb2d 100644
@@ -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
Signature · 1 line
2.3.5
#9 lore raw

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

perf/x86: Move perf_event_amd.c ........... => x86/events/amd/core.c
Commit-ID:  39b0332a215832ce3a8f8f57344da4a64370e3ca
Gitweb:     http://git.kernel.org/tip/39b0332a215832ce3a8f8f57344da4a64370e3ca
Author:     Borislav Petkov <[email protected]>
AuthorDate: Mon, 8 Feb 2016 17:09:05 +0100
Committer:  Ingo Molnar <[email protected]>
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/.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vince Weaver <[email protected]>
---
 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(-)
arch/x86/events/Makefile +2 -0
index 3fad3ce..e0560b6 100644
@@ -1 +1,3 @@
 obj-y			+= core.o
+
+obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o
arch/x86/events/amd/core.c renamed from arch/x86/kernel/cpu/perf_event_amd.c +1 -1
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
@@ -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]
arch/x86/kernel/cpu/Makefile +1 -1
index 77000d5..d549b02 100644
@@ -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
author maintainer
#10 lore raw

PATCH 3/5 x86/events: Move perf_event_amd_ibs.c

In reply to Borislav Petkov

From: Borislav Petkov <[email protected]>

---
 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%)
arch/x86/events/Makefile +1 -0
index e0560b6dd77b..88f787350bf0 100644
@@ -1,3 +1,4 @@
 obj-y			+= core.o
 
 obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o
+obj-$(CONFIG_X86_LOCAL_APIC)            += amd/ibs.o
arch/x86/events/amd/ibs.c renamed from arch/x86/kernel/cpu/perf_event_amd_ibs.c +1 -1
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
@@ -14,7 +14,7 @@
 
 #include <asm/apic.h>
 
-#include "perf_event.h"
+#include "../../kernel/cpu/perf_event.h"
 
 static u32 ibs_caps;
 
arch/x86/kernel/cpu/Makefile +1 -1
index 2ba0e37acb2d..b1711586005b 100644
@@ -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
 
Signature · 1 line
2.3.5
#11 lore raw

[tip:perf/core] perf/x86: Move perf_event_amd_ibs.c ....... => x86/events/amd/ibs.c

perf/x86: Move perf_event_amd_ibs.c ....... => x86/events/amd/ibs.c
Commit-ID:  218cfe4ed8885f988d67ac5f52efeff7233ae1f2
Gitweb:     http://git.kernel.org/tip/218cfe4ed8885f988d67ac5f52efeff7233ae1f2
Author:     Borislav Petkov <[email protected]>
AuthorDate: Mon, 8 Feb 2016 17:09:06 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 9 Feb 2016 10:23:49 +0100

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

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vince Weaver <[email protected]>
---
 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(-)
arch/x86/events/Makefile +1 -0
index e0560b6..88f7873 100644
@@ -1,3 +1,4 @@
 obj-y			+= core.o
 
 obj-$(CONFIG_CPU_SUP_AMD)               += amd/core.o
+obj-$(CONFIG_X86_LOCAL_APIC)            += amd/ibs.o
arch/x86/events/amd/ibs.c renamed from arch/x86/kernel/cpu/perf_event_amd_ibs.c +1 -1
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
@@ -14,7 +14,7 @@
 
 #include <asm/apic.h>
 
-#include "perf_event.h"
+#include "../../kernel/cpu/perf_event.h"
 
 static u32 ibs_caps;
 
arch/x86/kernel/cpu/Makefile +1 -1
index d549b02..dddba22 100644
@@ -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
 
author maintainer
#12 lore raw

PATCH 4/5 x86/events: Move perf_event_amd_iommu.*

In reply to Borislav Petkov

From: Borislav Petkov <[email protected]>

---
 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%)
arch/x86/events/Makefile +3 -0
index 88f787350bf0..838195d90961 100644
@@ -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
arch/x86/events/amd/iommu.c renamed from arch/x86/kernel/cpu/perf_event_amd_iommu.c +2 -2
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
@@ -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
 
arch/x86/events/amd/iommu.h renamed from arch/x86/kernel/cpu/perf_event_amd_iommu.h +0 -0
similarity index 100%
rename from arch/x86/kernel/cpu/perf_event_amd_iommu.h
rename to arch/x86/events/amd/iommu.h
arch/x86/kernel/cpu/Makefile +0 -3
index b1711586005b..37444ffd714d 100644
@@ -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
Signature · 1 line
2.3.5
#13 lore raw

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

perf/x86: Move perf_event_amd_iommu.[ch] .. => x86/events/amd/iommu.[ch]
Commit-ID:  5b26547dd7faa84e1293baa144a0f3e74ed7d4c7
Gitweb:     http://git.kernel.org/tip/5b26547dd7faa84e1293baa144a0f3e74ed7d4c7
Author:     Borislav Petkov <[email protected]>
AuthorDate: Mon, 8 Feb 2016 17:09:07 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 9 Feb 2016 10:23:50 +0100

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

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Joerg Roedel <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vince Weaver <[email protected]>
---
 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(-)
arch/x86/events/Makefile +3 -0
index 88f7873..838195d 100644
@@ -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
arch/x86/events/amd/iommu.c renamed from arch/x86/kernel/cpu/perf_event_amd_iommu.c +2 -2
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
@@ -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
 
arch/x86/events/amd/iommu.h renamed from arch/x86/kernel/cpu/perf_event_amd_iommu.h +0 -0
similarity index 100%
rename from arch/x86/kernel/cpu/perf_event_amd_iommu.h
rename to arch/x86/events/amd/iommu.h
arch/x86/kernel/cpu/Makefile +0 -3
index dddba22..2e15d9d 100644
@@ -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
author maintainer
#14 lore raw

PATCH 5/5 x86/events: Move perf_event_amd_uncore.c

In reply to Borislav Petkov

From: Borislav Petkov <[email protected]>

---
 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%)
arch/x86/events/Makefile +1 -1
index 838195d90961..7d1ecff583b0 100644
@@ -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
arch/x86/events/amd/uncore.c renamed from arch/x86/kernel/cpu/perf_event_amd_uncore.c +0 -0
similarity index 100%
rename from arch/x86/kernel/cpu/perf_event_amd_uncore.c
rename to arch/x86/events/amd/uncore.c
arch/x86/kernel/cpu/Makefile +0 -1
index 37444ffd714d..d8cf3338a035 100644
@@ -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
Signature · 1 line
2.3.5
#15 lore raw

[tip:perf/core] perf/x86: Move perf_event_amd_uncore.c .... => x86/events/amd/uncore.c

perf/x86: Move perf_event_amd_uncore.c .... => x86/events/amd/uncore.c
Commit-ID:  d0af1c0525d561fe3ab6d7a767cdd52704da25cd
Gitweb:     http://git.kernel.org/tip/d0af1c0525d561fe3ab6d7a767cdd52704da25cd
Author:     Borislav Petkov <[email protected]>
AuthorDate: Mon, 8 Feb 2016 17:09:08 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 9 Feb 2016 10:23:50 +0100

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

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vince Weaver <[email protected]>
---
 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(-)
arch/x86/events/Makefile +1 -1
index 838195d..7d1ecff 100644
@@ -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
arch/x86/events/amd/uncore.c renamed from arch/x86/kernel/cpu/perf_event_amd_uncore.c +0 -0
similarity index 100%
rename from arch/x86/kernel/cpu/perf_event_amd_uncore.c
rename to arch/x86/events/amd/uncore.c
arch/x86/kernel/cpu/Makefile +0 -1
index 2e15d9d..7edbeb9 100644
@@ -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