Skip to content

Commit 47732d8

Browse files
Andi KleenIngo Molnar
authored andcommitted
perf/x86: Make merge_attr() global to use from perf_event_intel
merge_attr() allows to merge two sysfs attribute tables. Export it to be usable by other files too. Next patch is going to use that to extend the sysfs format attributes for a CPU. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: eranian@google.com Link: http://lkml.kernel.org/r/1435612935-24425-1-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 90405aa commit 47732d8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

arch/x86/kernel/cpu/perf_event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ static void __init filter_events(struct attribute **attrs)
15511551
}
15521552

15531553
/* Merge two pointer arrays */
1554-
static __init struct attribute **merge_attr(struct attribute **a, struct attribute **b)
1554+
__init struct attribute **merge_attr(struct attribute **a, struct attribute **b)
15551555
{
15561556
struct attribute **new;
15571557
int j, i;

arch/x86/kernel/cpu/perf_event.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,8 @@ static inline void set_linear_ip(struct pt_regs *regs, unsigned long ip)
795795
ssize_t x86_event_sysfs_show(char *page, u64 config, u64 event);
796796
ssize_t intel_event_sysfs_show(char *page, u64 config);
797797

798+
struct attribute **merge_attr(struct attribute **a, struct attribute **b);
799+
798800
#ifdef CONFIG_CPU_SUP_AMD
799801

800802
int amd_pmu_init(void);
@@ -926,6 +928,7 @@ static inline int is_ht_workaround_enabled(void)
926928
{
927929
return !!(x86_pmu.flags & PMU_FL_EXCL_ENABLED);
928930
}
931+
929932
#else /* CONFIG_CPU_SUP_INTEL */
930933

931934
static inline void reserve_ds_buffers(void)

0 commit comments

Comments
 (0)