diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-01 12:15:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-01 12:15:15 -0500 |
commit | ac0f6f927db539e03e1f3f61bcd4ed57d5cde7a9 (patch) | |
tree | 816e5ac643b15c2050c64a7075f0f7e13d86ea09 /arch/arm/include/asm/pmu.h | |
parent | b1bf9368407ae7e89d8a005bb40beb70a41df539 (diff) | |
parent | 9f33be2c3a80bdc2cc08342dd77fac87652e0548 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (100 commits)
ARM: Eliminate decompressor -Dstatic= PIC hack
ARM: 5958/1: ARM: U300: fix inverted clk round rate
ARM: 5956/1: misplaced parentheses
ARM: 5955/1: ep93xx: move timer defines into core.c and document
ARM: 5954/1: ep93xx: move gpio interrupt support to gpio.c
ARM: 5953/1: ep93xx: fix broken build of clock.c
ARM: 5952/1: ARM: MM: Add ARM_L1_CACHE_SHIFT_6 for handle inside each ARCH Kconfig
ARM: 5949/1: NUC900 add gpio virtual memory map
ARM: 5948/1: Enable timer0 to time4 clock support for nuc910
ARM: 5940/2: ARM: MMCI: remove custom DBG macro and printk
ARM: make_coherent(): fix problems with highpte, part 2
MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself
ARM: 5945/1: ep93xx: include correct irq.h in core.c
ARM: 5933/1: amba-pl011: support hardware flow control
ARM: 5930/1: Add PKMAP area description to memory.txt.
ARM: 5929/1: Add checks to detect overlap of memory regions.
ARM: 5928/1: Change type of VMALLOC_END to unsigned long.
ARM: 5927/1: Make delimiters of DMA area globally visibly.
ARM: 5926/1: Add "Virtual kernel memory..." printout.
ARM: 5920/1: OMAP4: Enable L2 Cache
...
Fix up trivial conflict in arch/arm/mach-mx25/clock.c
Diffstat (limited to 'arch/arm/include/asm/pmu.h')
-rw-r--r-- | arch/arm/include/asm/pmu.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h new file mode 100644 index 00000000000..2829b9f981a --- /dev/null +++ b/arch/arm/include/asm/pmu.h | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/include/asm/pmu.h | ||
3 | * | ||
4 | * Copyright (C) 2009 picoChip Designs Ltd, Jamie Iles | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #ifndef __ARM_PMU_H__ | ||
13 | #define __ARM_PMU_H__ | ||
14 | |||
15 | #ifdef CONFIG_CPU_HAS_PMU | ||
16 | |||
17 | struct pmu_irqs { | ||
18 | const int *irqs; | ||
19 | int num_irqs; | ||
20 | }; | ||
21 | |||
22 | /** | ||
23 | * reserve_pmu() - reserve the hardware performance counters | ||
24 | * | ||
25 | * Reserve the hardware performance counters in the system for exclusive use. | ||
26 | * The 'struct pmu_irqs' for the system is returned on success, ERR_PTR() | ||
27 | * encoded error on failure. | ||
28 | */ | ||
29 | extern const struct pmu_irqs * | ||
30 | reserve_pmu(void); | ||
31 | |||
32 | /** | ||
33 | * release_pmu() - Relinquish control of the performance counters | ||
34 | * | ||
35 | * Release the performance counters and allow someone else to use them. | ||
36 | * Callers must have disabled the counters and released IRQs before calling | ||
37 | * this. The 'struct pmu_irqs' returned from reserve_pmu() must be passed as | ||
38 | * a cookie. | ||
39 | */ | ||
40 | extern int | ||
41 | release_pmu(const struct pmu_irqs *irqs); | ||
42 | |||
43 | /** | ||
44 | * init_pmu() - Initialise the PMU. | ||
45 | * | ||
46 | * Initialise the system ready for PMU enabling. This should typically set the | ||
47 | * IRQ affinity and nothing else. The users (oprofile/perf events etc) will do | ||
48 | * the actual hardware initialisation. | ||
49 | */ | ||
50 | extern int | ||
51 | init_pmu(void); | ||
52 | |||
53 | #else /* CONFIG_CPU_HAS_PMU */ | ||
54 | |||
55 | static inline const struct pmu_irqs * | ||
56 | reserve_pmu(void) | ||
57 | { | ||
58 | return ERR_PTR(-ENODEV); | ||
59 | } | ||
60 | |||
61 | static inline int | ||
62 | release_pmu(const struct pmu_irqs *irqs) | ||
63 | { | ||
64 | return -ENODEV; | ||
65 | } | ||
66 | |||
67 | static inline int | ||
68 | init_pmu(void) | ||
69 | { | ||
70 | return -ENODEV; | ||
71 | } | ||
72 | |||
73 | #endif /* CONFIG_CPU_HAS_PMU */ | ||
74 | |||
75 | #endif /* __ARM_PMU_H__ */ | ||