diff options
| author | Christopher Kenna <cjk@cs.unc.edu> | 2012-10-10 01:11:42 -0400 |
|---|---|---|
| committer | Christopher Kenna <cjk@cs.unc.edu> | 2012-10-10 01:11:42 -0400 |
| commit | 2915d35f5d245524f766c38eaea10d622b7d5c35 (patch) | |
| tree | 0519b2e4359dc232363b6c74addcc2ccc6f3c547 | |
| parent | 953d12017b9acda12057c0fa1e03f7ed51e71501 (diff) | |
Naively enable some performance counters.HEADpandaboard-litmus
| -rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index ecb59588e47..b37d395407a 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
| @@ -737,6 +737,19 @@ static int omap_panda_netdev_event(struct notifier_block *this, | |||
| 737 | return NOTIFY_DONE; | 737 | return NOTIFY_DONE; |
| 738 | } | 738 | } |
| 739 | 739 | ||
| 740 | #ifdef CONFIG_HW_PERF_EVENTS | ||
| 741 | #define enable_perf_counters() do { } while (0) | ||
| 742 | #else | ||
| 743 | static void __init enable_perf_counters(void) | ||
| 744 | { | ||
| 745 | /* enable user-mode access to the performance counter */ | ||
| 746 | asm volatile("mcr p15, 0, %0, c9, c14, 0" : : "r" (1)); | ||
| 747 | |||
| 748 | /* disable counter overflow interrupts (just in case) */ | ||
| 749 | asm volatile("mcr p15, 0, %0, c9, c14, 2" : : "r" (0x8000000f)); | ||
| 750 | } | ||
| 751 | #endif | ||
| 752 | |||
| 740 | static struct notifier_block omap_panda_netdev_notifier = { | 753 | static struct notifier_block omap_panda_netdev_notifier = { |
| 741 | .notifier_call = omap_panda_netdev_event, | 754 | .notifier_call = omap_panda_netdev_event, |
| 742 | .priority = 1, | 755 | .priority = 1, |
| @@ -765,6 +778,7 @@ static void __init omap4_panda_init(void) | |||
| 765 | omap4_ehci_init(); | 778 | omap4_ehci_init(); |
| 766 | usb_musb_init(&musb_board_data); | 779 | usb_musb_init(&musb_board_data); |
| 767 | omap4_panda_display_init(); | 780 | omap4_panda_display_init(); |
| 781 | enable_perf_counters(); | ||
| 768 | } | 782 | } |
| 769 | 783 | ||
| 770 | static void __init omap4_panda_map_io(void) | 784 | static void __init omap4_panda_map_io(void) |
