Skip to content

Commit

Permalink
alpha: implement HW performance events on the EV67 and later CPUs
Browse files Browse the repository at this point in the history
This implements hardware performance events for the EV67 and later CPUs
within the Linux performance events subsystem.  Only using the performance
monitoring unit in HP/Compaq's so called "Aggregrate mode" is supported.

The code has been implemented in a manner that makes extension to other
older Alpha CPUs relatively straightforward should some mug wish to
indulge themselves.

Signed-off-by: Michael Cree <mcree@orcon.net.nz>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jay Estabrook <jay.estabrook@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Michael Cree authored and Linus Torvalds committed Aug 10, 2010
1 parent 92484f1 commit 979f867
Show file tree
Hide file tree
Showing 5 changed files with 879 additions and 1 deletion.
8 changes: 7 additions & 1 deletion arch/alpha/include/asm/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
#define __ASM_ALPHA_PERF_EVENT_H

/* Alpha only supports software events through this interface. */
static inline void set_perf_event_pending(void) { }
extern void set_perf_event_pending(void);

#define PERF_EVENT_INDEX_OFFSET 0

#ifdef CONFIG_PERF_EVENTS
extern void init_hw_perf_events(void);
#else
static inline void init_hw_perf_events(void) { }
#endif

#endif /* __ASM_ALPHA_PERF_EVENT_H */
1 change: 1 addition & 0 deletions arch/alpha/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_PCI) += pci.o pci_iommu.o pci-sysfs.o
obj-$(CONFIG_SRM_ENV) += srm_env.o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_PERF_EVENTS) += perf_event.o

ifdef CONFIG_ALPHA_GENERIC

Expand Down
3 changes: 3 additions & 0 deletions arch/alpha/kernel/irq_alpha.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <asm/machvec.h>
#include <asm/dma.h>
#include <asm/perf_event.h>

#include "proto.h"
#include "irq_impl.h"
Expand Down Expand Up @@ -111,6 +112,8 @@ init_IRQ(void)
wrent(entInt, 0);

alpha_mv.init_irq();

init_hw_perf_events();
}

/*
Expand Down
Loading

0 comments on commit 979f867

Please sign in to comment.