diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 18:19:05 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 18:19:05 -0700 | 
| commit | 61464c8357c8f6b780e4c44f5c79471799c51ca7 (patch) | |
| tree | 4509cf075403965528f380f2f825c46908fb7d4e /arch/arm/include/asm/pmu.h | |
| parent | 47061eda2584b9e4516d1e3a9713406a3a559ac8 (diff) | |
| parent | 9cf1c871526cf6bfec2a653e1e068ee72592542c (diff) | |
| download | olio-linux-3.10-61464c8357c8f6b780e4c44f5c79471799c51ca7.tar.xz olio-linux-3.10-61464c8357c8f6b780e4c44f5c79471799c51ca7.zip  | |
Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM soc general cleanups from Olof Johansson:
 "This is a large branch that contains a handful of different cleanups:
   - Fixing up the I/O space remapping on PCI on ARM.  This is a series
     from Rob Herring that restructures how all pci devices allocate I/O
     space, and it's part of the work to allow multiplatform kernels.
   - A number of cleanup series for OMAP, moving and removing some
     headers, sparse irq rework and in general preparation for
     multiplatform.
   - Final removal of all non-DT boards for Tegra, it is now
     device-tree-only!
   - Removal of a stale platform, nxp4008.  It's an old mobile chipset
     that is no longer in use, and was very likely never really used
     with a mainline kernel.  We have not been able to find anyone
     interested in keeping it around in the kernel.
   - Removal of the legacy dmaengine driver on tegra
  + A handful of other things that I haven't described above."
Fix up some conflicts with the staging tree (and because nxp4008 was
removed)
* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (184 commits)
  ARM: OMAP2+: serial: Change MAX_HSUART_PORTS to 6
  ARM: OMAP4: twl-common: Support for additional devices on i2c1 bus
  ARM: mmp: using for_each_set_bit to simplify the code
  ARM: tegra: harmony: fix ldo7 regulator-name
  ARM: OMAP2+: Make omap4-keypad.h local
  ARM: OMAP2+: Make l4_3xxx.h local
  ARM: OMAP2+: Make l4_2xxx.h local
  ARM: OMAP2+: Make l3_3xxx.h local
  ARM: OMAP2+: Make l3_2xxx.h local
  ARM: OMAP1: Move irda.h from plat to mach
  ARM: OMAP2+: Make hdq1w.h local
  ARM: OMAP2+: Make gpmc-smsc911x.h local
  ARM: OMAP2+: Make gpmc-smc91x.h local
  ARM: OMAP1: Move flash.h from plat to mach
  ARM: OMAP2+: Make debug-devices.h local
  ARM: OMAP1: Move board-voiceblue.h from plat to mach
  ARM: OMAP1: Move board-sx1.h from plat to mach
  ARM: OMAP2+: Make omap-wakeupgen.h local
  ARM: OMAP2+: Make omap-secure.h local
  ARM: OMAP2+: Make ctrl_module_wkup_44xx.h local
  ...
Diffstat (limited to 'arch/arm/include/asm/pmu.h')
| -rw-r--r-- | arch/arm/include/asm/pmu.h | 77 | 
1 files changed, 24 insertions, 53 deletions
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index 4432305f4a2..a26170dce02 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h @@ -16,69 +16,30 @@  #include <linux/perf_event.h>  /* - * Types of PMUs that can be accessed directly and require mutual - * exclusion between profiling tools. - */ -enum arm_pmu_type { -	ARM_PMU_DEVICE_CPU	= 0, -	ARM_NUM_PMU_DEVICES, -}; - -/*   * struct arm_pmu_platdata - ARM PMU platform data   *   * @handle_irq: an optional handler which will be called from the   *	interrupt and passed the address of the low level handler,   *	and can be used to implement any platform specific handling   *	before or after calling it. - * @enable_irq: an optional handler which will be called after - *	request_irq and be used to handle some platform specific - *	irq enablement - * @disable_irq: an optional handler which will be called before - *	free_irq and be used to handle some platform specific - *	irq disablement + * @runtime_resume: an optional handler which will be called by the + *	runtime PM framework following a call to pm_runtime_get(). + *	Note that if pm_runtime_get() is called more than once in + *	succession this handler will only be called once. + * @runtime_suspend: an optional handler which will be called by the + *	runtime PM framework following a call to pm_runtime_put(). + *	Note that if pm_runtime_get() is called more than once in + *	succession this handler will only be called following the + *	final call to pm_runtime_put() that actually disables the + *	hardware.   */  struct arm_pmu_platdata {  	irqreturn_t (*handle_irq)(int irq, void *dev,  				  irq_handler_t pmu_handler); -	void (*enable_irq)(int irq); -	void (*disable_irq)(int irq); +	int (*runtime_resume)(struct device *dev); +	int (*runtime_suspend)(struct device *dev);  }; -#ifdef CONFIG_CPU_HAS_PMU - -/** - * reserve_pmu() - reserve the hardware performance counters - * - * Reserve the hardware performance counters in the system for exclusive use. - * Returns 0 on success or -EBUSY if the lock is already held. - */ -extern int -reserve_pmu(enum arm_pmu_type type); - -/** - * release_pmu() - Relinquish control of the performance counters - * - * Release the performance counters and allow someone else to use them. - */ -extern void -release_pmu(enum arm_pmu_type type); - -#else /* CONFIG_CPU_HAS_PMU */ - -#include <linux/err.h> - -static inline int -reserve_pmu(enum arm_pmu_type type) -{ -	return -ENODEV; -} - -static inline void -release_pmu(enum arm_pmu_type type)	{ } - -#endif /* CONFIG_CPU_HAS_PMU */ -  #ifdef CONFIG_HW_PERF_EVENTS  /* The events for a given PMU register set. */ @@ -103,7 +64,6 @@ struct pmu_hw_events {  struct arm_pmu {  	struct pmu	pmu; -	enum arm_pmu_type type;  	cpumask_t	active_irqs;  	char		*name;  	irqreturn_t	(*handle_irq)(int irq_num, void *dev); @@ -118,6 +78,8 @@ struct arm_pmu {  	void		(*start)(void);  	void		(*stop)(void);  	void		(*reset)(void *); +	int		(*request_irq)(irq_handler_t handler); +	void		(*free_irq)(void);  	int		(*map_event)(struct perf_event *event);  	int		num_events;  	atomic_t	active_events; @@ -129,7 +91,9 @@ struct arm_pmu {  #define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu)) -int __init armpmu_register(struct arm_pmu *armpmu, char *name, int type); +extern const struct dev_pm_ops armpmu_dev_pm_ops; + +int armpmu_register(struct arm_pmu *armpmu, char *name, int type);  u64 armpmu_event_update(struct perf_event *event,  			struct hw_perf_event *hwc, @@ -139,6 +103,13 @@ int armpmu_event_set_period(struct perf_event *event,  			    struct hw_perf_event *hwc,  			    int idx); +int armpmu_map_event(struct perf_event *event, +		     const unsigned (*event_map)[PERF_COUNT_HW_MAX], +		     const unsigned (*cache_map)[PERF_COUNT_HW_CACHE_MAX] +						[PERF_COUNT_HW_CACHE_OP_MAX] +						[PERF_COUNT_HW_CACHE_RESULT_MAX], +		     u32 raw_event_mask); +  #endif /* CONFIG_HW_PERF_EVENTS */  #endif /* __ARM_PMU_H__ */  |