Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1297027 > unrolled thread
| Started by | Borislav Petkov <bp@alien8.de> |
|---|---|
| First post | 2015-12-22 21:00 +0100 |
| Last post | 2015-12-22 21:00 +0100 |
| Articles | 8 — 3 participants |
Back to article view | Back to linux.kernel
[RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov <bp@alien8.de> - 2015-12-22 21:00 +0100
[RFC PATCH 3/5] x86/events: Move perf_event_amd_ibs.c Borislav Petkov <bp@alien8.de> - 2015-12-22 21:00 +0100
[RFC PATCH 2/5] x86/events: Move perf_event_amd.c Borislav Petkov <bp@alien8.de> - 2015-12-22 21:00 +0100
[RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.* Borislav Petkov <bp@alien8.de> - 2015-12-22 21:00 +0100
Re: [RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.* Joerg Roedel <joro@8bytes.org> - 2015-12-28 17:00 +0100
Re: [RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.* Boris Petkov <bp@alien8.de> - 2015-12-29 10:00 +0100
[RFC PATCH 5/5] x86/events: Move perf_event_amd_uncore.c Borislav Petkov <bp@alien8.de> - 2015-12-22 21:00 +0100
[RFC PATCH 1/5] x86/events: Move perf_event.c Borislav Petkov <bp@alien8.de> - 2015-12-22 21:00 +0100
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2015-12-22 21:00 +0100 |
| Subject | [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 |
| Message-ID | <qIBge-8do-3@gated-at.bofh.it> |
From: Borislav Petkov <bp@suse.de>
Hi guys,
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.
Thanks.
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2015-12-22 21:00 +0100 |
| Subject | [RFC PATCH 3/5] x86/events: Move perf_event_amd_ibs.c |
| Message-ID | <qIBge-8do-9@gated-at.bofh.it> |
| In reply to | #1297027 |
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 989d3c215d2b..3531d617ba3a 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 66524a343c13..395cd5148cc1 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -55,7 +55,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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2015-12-22 21:00 +0100 |
| Subject | [RFC PATCH 2/5] x86/events: Move perf_event_amd.c |
| Message-ID | <qIBge-8do-5@gated-at.bofh.it> |
| In reply to | #1297027 |
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.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 3ea177cb7366..53e04f58d773 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 89d9b1f84ac3..66524a343c13 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2015-12-22 21:00 +0100 |
| Subject | [RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.* |
| Message-ID | <qIBge-8do-15@gated-at.bofh.it> |
| In reply to | #1297027 |
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 395cd5148cc1..86aa9ac6bd03 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Joerg Roedel <joro@8bytes.org> |
|---|---|
| Date | 2015-12-28 17:00 +0100 |
| Subject | Re: [RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.* |
| Message-ID | <qKIni-47b-35@gated-at.bofh.it> |
| In reply to | #1297033 |
On Tue, Dec 22, 2015 at 08:55:50PM +0100, Borislav Petkov wrote:
> 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%)
Hmm, the arch/x86/events directory does not exist yet, is it the plan
to move non-cpu event over there? It looks to be a better place for the
iommu events, are there more no-cpu events to move there?
Joerg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Boris Petkov <bp@alien8.de> |
|---|---|
| Date | 2015-12-29 10:00 +0100 |
| Subject | Re: [RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.* |
| Message-ID | <qKYil-6vI-1@gated-at.bofh.it> |
| In reply to | #1298692 |
Joerg Roedel <joro@8bytes.org> wrote: >Hmm, the arch/x86/events directory does not exist yet, is it the plan >to move non-cpu event over there? It looks to be a better place for the >iommu events, are there more no-cpu events to move there? Yeah, basically move all arch/x86/ *perf_event* stuff there. -- Sent from a small device: formatting sux and brevity is inevitable. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2015-12-22 21:00 +0100 |
| Subject | [RFC PATCH 5/5] x86/events: Move perf_event_amd_uncore.c |
| Message-ID | <qIBge-8do-17@gated-at.bofh.it> |
| In reply to | #1297027 |
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 86aa9ac6bd03..3b658812803b 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2015-12-22 21:00 +0100 |
| Subject | [RFC PATCH 1/5] x86/events: Move perf_event.c |
| Message-ID | <qIBgf-8do-23@gated-at.bofh.it> |
| In reply to | #1297027 |
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 9dfbba5ce6e8..ccbf7242307c 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 b3292a4b37c1..89d9b1f84ac3 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web