* [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1
@ 2015-12-22 19:55 Borislav Petkov
2015-12-22 19:55 ` [RFC PATCH 1/5] x86/events: Move perf_event.c Borislav Petkov
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: Borislav Petkov @ 2015-12-22 19:55 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra; +Cc: X86 ML, LKML
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* [RFC PATCH 1/5] x86/events: Move perf_event.c
2015-12-22 19:55 [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
@ 2015-12-22 19:55 ` Borislav Petkov
2015-12-22 19:55 ` [RFC PATCH 2/5] x86/events: Move perf_event_amd.c Borislav Petkov
` (4 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Borislav Petkov @ 2015-12-22 19:55 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra; +Cc: 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 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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [RFC PATCH 2/5] x86/events: Move perf_event_amd.c
2015-12-22 19:55 [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
2015-12-22 19:55 ` [RFC PATCH 1/5] x86/events: Move perf_event.c Borislav Petkov
@ 2015-12-22 19:55 ` Borislav Petkov
2015-12-22 19:55 ` [RFC PATCH 3/5] x86/events: Move perf_event_amd_ibs.c Borislav Petkov
` (3 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Borislav Petkov @ 2015-12-22 19:55 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra; +Cc: 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.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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [RFC PATCH 3/5] x86/events: Move perf_event_amd_ibs.c
2015-12-22 19:55 [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
2015-12-22 19:55 ` [RFC PATCH 1/5] x86/events: Move perf_event.c Borislav Petkov
2015-12-22 19:55 ` [RFC PATCH 2/5] x86/events: Move perf_event_amd.c Borislav Petkov
@ 2015-12-22 19:55 ` Borislav Petkov
2015-12-22 19:55 ` [RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.* Borislav Petkov
` (2 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Borislav Petkov @ 2015-12-22 19:55 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra; +Cc: 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 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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.*
2015-12-22 19:55 [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
` (2 preceding siblings ...)
2015-12-22 19:55 ` [RFC PATCH 3/5] x86/events: Move perf_event_amd_ibs.c Borislav Petkov
@ 2015-12-22 19:55 ` Borislav Petkov
2015-12-28 15:50 ` Joerg Roedel
2015-12-22 19:55 ` [RFC PATCH 5/5] x86/events: Move perf_event_amd_uncore.c Borislav Petkov
2016-01-11 12:39 ` [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 Ingo Molnar
5 siblings, 1 reply; 13+ messages in thread
From: Borislav Petkov @ 2015-12-22 19:55 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra; +Cc: 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 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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [RFC PATCH 5/5] x86/events: Move perf_event_amd_uncore.c
2015-12-22 19:55 [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
` (3 preceding siblings ...)
2015-12-22 19:55 ` [RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.* Borislav Petkov
@ 2015-12-22 19:55 ` Borislav Petkov
2016-01-11 12:39 ` [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 Ingo Molnar
5 siblings, 0 replies; 13+ messages in thread
From: Borislav Petkov @ 2015-12-22 19:55 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra; +Cc: 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 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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.*
2015-12-22 19:55 ` [RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.* Borislav Petkov
@ 2015-12-28 15:50 ` Joerg Roedel
2015-12-29 8:50 ` Boris Petkov
0 siblings, 1 reply; 13+ messages in thread
From: Joerg Roedel @ 2015-12-28 15:50 UTC (permalink / raw)
To: Borislav Petkov; +Cc: Ingo Molnar, Peter Zijlstra, X86 ML, LKML
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.*
2015-12-28 15:50 ` Joerg Roedel
@ 2015-12-29 8:50 ` Boris Petkov
0 siblings, 0 replies; 13+ messages in thread
From: Boris Petkov @ 2015-12-29 8:50 UTC (permalink / raw)
To: Joerg Roedel; +Cc: Ingo Molnar, Peter Zijlstra, X86 ML, LKML
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1
2015-12-22 19:55 [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
` (4 preceding siblings ...)
2015-12-22 19:55 ` [RFC PATCH 5/5] x86/events: Move perf_event_amd_uncore.c Borislav Petkov
@ 2016-01-11 12:39 ` Ingo Molnar
2016-01-11 14:34 ` Borislav Petkov
5 siblings, 1 reply; 13+ messages in thread
From: Ingo Molnar @ 2016-01-11 12:39 UTC (permalink / raw)
To: Borislav Petkov
Cc: Peter Zijlstra, X86 ML, LKML, Arnaldo Carvalho de Melo,
Jiri Olsa, Thomas Gleixner
* Borislav Petkov <bp@alien8.de> wrote:
> 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.
So it is only now that I noticed that we have both 'core.c' and 'uncore.c', which
is slightly bit confusing: the core.c's we have around the kernel denote core
subsystem functionality - not CPU core functionality. If we have uncore.c around,
confusion might ensue.
OTOH maybe it's not a big issue and we can just live with it. I'd hate to see
main.c. Maybe rename 'uncore.c' to 'cpu_uncore.c'? OTOH that sounds a bit silly
too. So maybe leave it as you named them.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1
2016-01-11 12:39 ` [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 Ingo Molnar
@ 2016-01-11 14:34 ` Borislav Petkov
2016-01-11 15:14 ` Ingo Molnar
0 siblings, 1 reply; 13+ messages in thread
From: Borislav Petkov @ 2016-01-11 14:34 UTC (permalink / raw)
To: Ingo Molnar
Cc: Peter Zijlstra, X86 ML, LKML, Arnaldo Carvalho de Melo,
Jiri Olsa, Thomas Gleixner
On Mon, Jan 11, 2016 at 01:39:44PM +0100, Ingo Molnar wrote:
> So it is only now that I noticed that we have both 'core.c' and 'uncore.c', which
> is slightly bit confusing: the core.c's we have around the kernel denote core
> subsystem functionality - not CPU core functionality. If we have uncore.c around,
> confusion might ensue.
>
> OTOH maybe it's not a big issue and we can just live with it. I'd hate to see
> main.c. Maybe rename 'uncore.c' to 'cpu_uncore.c'? OTOH that sounds a bit silly
> too. So maybe leave it as you named them.
Well, not doung anything should be ok because the *uncore* things would
go to the <vendor>/ subdir:
I.e.,
arch/x86/kernel/cpu/perf_event_amd_uncore.c
arch/x86/kernel/cpu/perf_event_intel_uncore.c
arch/x86/kernel/cpu/perf_event_intel_uncore.h
arch/x86/kernel/cpu/perf_event_intel_uncore_nhmex.c
arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c
arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c
will become
arch/x86/events/amd/uncore.c
arch/x86/events/intel/uncore.c
arch/x86/events/intel/uncore.h
arch/x86/events/intel/uncore_nhmex.c
arch/x86/events/intel/uncore_snb.c
arch/x86/events/intel/uncore_snbep.c
and core.c will be in the upper dir arch/x86/events/
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1
2016-01-11 14:34 ` Borislav Petkov
@ 2016-01-11 15:14 ` Ingo Molnar
2016-01-11 16:32 ` Borislav Petkov
0 siblings, 1 reply; 13+ messages in thread
From: Ingo Molnar @ 2016-01-11 15:14 UTC (permalink / raw)
To: Borislav Petkov
Cc: Peter Zijlstra, X86 ML, LKML, Arnaldo Carvalho de Melo,
Jiri Olsa, Thomas Gleixner
* Borislav Petkov <bp@alien8.de> wrote:
> On Mon, Jan 11, 2016 at 01:39:44PM +0100, Ingo Molnar wrote:
> > So it is only now that I noticed that we have both 'core.c' and 'uncore.c', which
> > is slightly bit confusing: the core.c's we have around the kernel denote core
> > subsystem functionality - not CPU core functionality. If we have uncore.c around,
> > confusion might ensue.
> >
> > OTOH maybe it's not a big issue and we can just live with it. I'd hate to see
> > main.c. Maybe rename 'uncore.c' to 'cpu_uncore.c'? OTOH that sounds a bit silly
> > too. So maybe leave it as you named them.
>
> Well, not doung anything should be ok because the *uncore* things would
> go to the <vendor>/ subdir:
>
> I.e.,
>
> arch/x86/kernel/cpu/perf_event_amd_uncore.c
> arch/x86/kernel/cpu/perf_event_intel_uncore.c
> arch/x86/kernel/cpu/perf_event_intel_uncore.h
> arch/x86/kernel/cpu/perf_event_intel_uncore_nhmex.c
> arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c
> arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c
>
> will become
>
> arch/x86/events/amd/uncore.c
> arch/x86/events/intel/uncore.c
> arch/x86/events/intel/uncore.h
> arch/x86/events/intel/uncore_nhmex.c
> arch/x86/events/intel/uncore_snb.c
> arch/x86/events/intel/uncore_snbep.c
>
> and core.c will be in the upper dir arch/x86/events/
Ok, works for me. Got confused by your ascii art:
arch/x86/events/
|-- amd
| |-- core.c
| |-- ibs.c
| |-- iommu.c
| |-- iommu.h
| `-- uncore.c
|-- core.c
`-- Makefile
which lists events/amd/core.c.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1
2016-01-11 15:14 ` Ingo Molnar
@ 2016-01-11 16:32 ` Borislav Petkov
2016-01-12 11:16 ` Ingo Molnar
0 siblings, 1 reply; 13+ messages in thread
From: Borislav Petkov @ 2016-01-11 16:32 UTC (permalink / raw)
To: Ingo Molnar
Cc: Peter Zijlstra, X86 ML, LKML, Arnaldo Carvalho de Melo,
Jiri Olsa, Thomas Gleixner
On Mon, Jan 11, 2016 at 04:14:12PM +0100, Ingo Molnar wrote:
> Ok, works for me. Got confused by your ascii art:
>
> arch/x86/events/
> |-- amd
> | |-- core.c
> | |-- ibs.c
> | |-- iommu.c
> | |-- iommu.h
> | `-- uncore.c
> |-- core.c
> `-- Makefile
>
> which lists events/amd/core.c.
No, that's all correct. There is an amd/core.c thing:
arch/x86/{kernel/cpu/perf_event_amd.c => events/amd/core.c} | 2 +-
and there's also a arch/x86/kernel/cpu/perf_event_intel.c which would want to
become events/intel/core.c
Hmm, what do we call those then?
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1
2016-01-11 16:32 ` Borislav Petkov
@ 2016-01-12 11:16 ` Ingo Molnar
0 siblings, 0 replies; 13+ messages in thread
From: Ingo Molnar @ 2016-01-12 11:16 UTC (permalink / raw)
To: Borislav Petkov
Cc: Peter Zijlstra, X86 ML, LKML, Arnaldo Carvalho de Melo,
Jiri Olsa, Thomas Gleixner
* Borislav Petkov <bp@alien8.de> wrote:
> On Mon, Jan 11, 2016 at 04:14:12PM +0100, Ingo Molnar wrote:
> > Ok, works for me. Got confused by your ascii art:
> >
> > arch/x86/events/
> > |-- amd
> > | |-- core.c
> > | |-- ibs.c
> > | |-- iommu.c
> > | |-- iommu.h
> > | `-- uncore.c
> > |-- core.c
> > `-- Makefile
> >
> > which lists events/amd/core.c.
>
> No, that's all correct. There is an amd/core.c thing:
>
> arch/x86/{kernel/cpu/perf_event_amd.c => events/amd/core.c} | 2 +-
>
> and there's also a arch/x86/kernel/cpu/perf_event_intel.c which would want to
> become events/intel/core.c
>
> Hmm, what do we call those then?
core.c is fine with me!
Thanks,
Ingo
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2016-01-12 11:16 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-22 19:55 [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 Borislav Petkov
2015-12-22 19:55 ` [RFC PATCH 1/5] x86/events: Move perf_event.c Borislav Petkov
2015-12-22 19:55 ` [RFC PATCH 2/5] x86/events: Move perf_event_amd.c Borislav Petkov
2015-12-22 19:55 ` [RFC PATCH 3/5] x86/events: Move perf_event_amd_ibs.c Borislav Petkov
2015-12-22 19:55 ` [RFC PATCH 4/5] x86/events: Move perf_event_amd_iommu.* Borislav Petkov
2015-12-28 15:50 ` Joerg Roedel
2015-12-29 8:50 ` Boris Petkov
2015-12-22 19:55 ` [RFC PATCH 5/5] x86/events: Move perf_event_amd_uncore.c Borislav Petkov
2016-01-11 12:39 ` [RFC PATCH 0/5] perf: Sanitize perf directory structure, p1 Ingo Molnar
2016-01-11 14:34 ` Borislav Petkov
2016-01-11 15:14 ` Ingo Molnar
2016-01-11 16:32 ` Borislav Petkov
2016-01-12 11:16 ` Ingo Molnar
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).