Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
ed6f2a5
Documentation
arch
alpha
arm
boot
common
configs
crypto
include
asm
hardware
mach
xen
Kbuild
a.out-core.h
arch_timer.h
asm-offsets.h
assembler.h
atomic.h
barrier.h
bitops.h
bug.h
bugs.h
cache.h
cacheflush.h
cachetype.h
checksum.h
clkdev.h
cmpxchg.h
compiler.h
cp15.h
cpu.h
cpuidle.h
cputype.h
cti.h
delay.h
device.h
div64.h
dma-contiguous.h
dma-iommu.h
dma-mapping.h
dma.h
domain.h
ecard.h
edac.h
elf.h
entry-macro-multi.S
exception.h
fb.h
fiq.h
fixmap.h
flat.h
floppy.h
fncpy.h
fpstate.h
ftrace.h
futex.h
glue-cache.h
glue-df.h
glue-pf.h
glue-proc.h
glue.h
gpio.h
hardirq.h
highmem.h
hw_breakpoint.h
hw_irq.h
hwcap.h
hypervisor.h
ide.h
idmap.h
io.h
irq.h
irqflags.h
jump_label.h
kexec.h
kgdb.h
kmap_types.h
kprobes.h
limits.h
linkage.h
localtimer.h
mach-types.h
mc146818rtc.h
memblock.h
memory.h
mmu.h
mmu_context.h
module.h
mtd-xip.h
mutex.h
nwflash.h
opcodes-virt.h
opcodes.h
outercache.h
page-nommu.h
page.h
pci.h
perf_event.h
pgalloc.h
pgtable-2level-hwdef.h
pgtable-2level-types.h
pgtable-2level.h
pgtable-3level-hwdef.h
pgtable-3level-types.h
pgtable-3level.h
pgtable-hwdef.h
pgtable-nommu.h
pgtable.h
pmu.h
proc-fns.h
processor.h
procinfo.h
prom.h
ptrace.h
scatterlist.h
sched_clock.h
seccomp.h
setup.h
shmparam.h
signal.h
smp.h
smp_plat.h
smp_scu.h
smp_twd.h
sparsemem.h
spinlock.h
spinlock_types.h
stackprotector.h
stacktrace.h
string.h
suspend.h
swab.h
switch_to.h
sync_bitops.h
syscall.h
system.h
system_info.h
system_misc.h
tcm.h
therm.h
thread_info.h
thread_notify.h
timex.h
tlb.h
tlbflush.h
tls.h
topology.h
traps.h
uaccess.h
ucontext.h
unified.h
unistd.h
unwind.h
user.h
vfp.h
vfpmacros.h
vga.h
virt.h
word-at-a-time.h
xor.h
debug
uapi
kernel
lib
mach-at91
mach-bcm2835
mach-clps711x
mach-cns3xxx
mach-davinci
mach-dove
mach-ebsa110
mach-ep93xx
mach-exynos
mach-footbridge
mach-gemini
mach-h720x
mach-highbank
mach-imx
mach-integrator
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx
mach-kirkwood
mach-ks8695
mach-l7200
mach-lpc32xx
mach-mmp
mach-msm
mach-mv78xx0
mach-mvebu
mach-mxs
mach-netx
mach-nomadik
mach-omap1
mach-omap2
mach-orion5x
mach-picoxcell
mach-prima2
mach-pxa
mach-realview
mach-rpc
mach-s3c2410
mach-s3c2412
mach-s3c2440
mach-s3c24xx
mach-s3c64xx
mach-s5p64x0
mach-s5pc100
mach-s5pv210
mach-sa1100
mach-shark
mach-shmobile
mach-socfpga
mach-spear13xx
mach-spear3xx
mach-spear6xx
mach-tegra
mach-u300
mach-ux500
mach-versatile
mach-vexpress
mach-vt8500
mach-w90x900
mach-zynq
mm
net
nwfpe
oprofile
plat-iop
plat-mxc
plat-nomadik
plat-omap
plat-orion
plat-pxa
plat-s3c24xx
plat-samsung
plat-spear
plat-versatile
tools
vfp
xen
Kconfig
Kconfig-nommu
Kconfig.debug
Makefile
arm64
avr32
blackfin
c6x
cris
frv
h8300
hexagon
ia64
m32r
m68k
microblaze
mips
mn10300
openrisc
parisc
powerpc
s390
score
sh
sparc
tile
um
unicore32
x86
xtensa
.gitignore
Kconfig
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
arch
/
arm
/
include
/
asm
/
pmu.h
Copy path
Blame
Blame
Latest commit
History
History
111 lines (95 loc) · 3.43 KB
Breadcrumbs
linux
/
arch
/
arm
/
include
/
asm
/
pmu.h
Top
File metadata and controls
Code
Blame
111 lines (95 loc) · 3.43 KB
Raw
/* * linux/arch/arm/include/asm/pmu.h * * Copyright (C) 2009 picoChip Designs Ltd, Jamie Iles * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * */ #ifndef __ARM_PMU_H__ #define __ARM_PMU_H__ #include <linux/interrupt.h> #include <linux/perf_event.h> /* * 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. * @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); int (*runtime_resume)(struct device *dev); int (*runtime_suspend)(struct device *dev); }; #ifdef CONFIG_HW_PERF_EVENTS /* The events for a given PMU register set. */ struct pmu_hw_events { /* * The events that are active on the PMU for the given index. */ struct perf_event **events; /* * A 1 bit for an index indicates that the counter is being used for * an event. A 0 means that the counter can be used. */ unsigned long *used_mask; /* * Hardware lock to serialize accesses to PMU registers. Needed for the * read/modify/write sequences. */ raw_spinlock_t pmu_lock; }; struct arm_pmu { struct pmu pmu; cpumask_t active_irqs; char *name; irqreturn_t (*handle_irq)(int irq_num, void *dev); void (*enable)(struct perf_event *event); void (*disable)(struct perf_event *event); int (*get_event_idx)(struct pmu_hw_events *hw_events, struct perf_event *event); int (*set_event_filter)(struct hw_perf_event *evt, struct perf_event_attr *attr); u32 (*read_counter)(struct perf_event *event); void (*write_counter)(struct perf_event *event, u32 val); void (*start)(struct arm_pmu *); void (*stop)(struct arm_pmu *); void (*reset)(void *); int (*request_irq)(struct arm_pmu *, irq_handler_t handler); void (*free_irq)(struct arm_pmu *); int (*map_event)(struct perf_event *event); int num_events; atomic_t active_events; struct mutex reserve_mutex; u64 max_period; struct platform_device *plat_device; struct pmu_hw_events *(*get_hw_events)(void); }; #define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu)) 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); int armpmu_event_set_period(struct perf_event *event); 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__ */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
You can’t perform that action at this time.