Archived
14
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch/mips
Deng-Cheng Zhu 3a9ab99e03 MIPS: Add support for hardware performance events (mipsxx)
This patch adds the mipsxx Perf-events support based on the skeleton.
Generic hardware events and cache events are now fully implemented for
the 24K/34K/74K/1004K cores. To support other cores in mipsxx (such as
R10000/SB1), the generic hardware event tables and cache event tables
need to be filled out. To support other CPUs which have different PMU
than mipsxx, such as RM9000 and LOONGSON2, the additional files
perf_event_$cpu.c need to be created.

Raw event is an important part of Perf-events. It helps the user collect
performance data for events that are not listed as the generic hardware
events and cache events but ARE supported by the CPU's PMU.

This patch also adds this feature for mipsxx 24K/34K/74K/1004K. For how to
use it, please refer to processor core software user's manual and the
comments for mipsxx_pmu_map_raw_event() for more details.

Please note that this is a "precise" implementation, which means the
kernel will check whether the requested raw events are supported by this
CPU and which hardware counters can be assigned for them.

To test the functionality of Perf-event, you may want to compile the tool
"perf" for your MIPS platform. You can refer to the following URL:
http://www.linux-mips.org/archives/linux-mips/2010-10/msg00126.html

You also need to customize the CFLAGS and LDFLAGS in tools/perf/Makefile
for your libs, includes, etc.

In case you encounter the boot failure in SMVP kernel on multi-threading
CPUs, you may take a look at:
http://www.linux-mips.org/git?p=linux-mti.git;a=commitdiff;h=5460815027d802697b879644c74f0e8365254020

Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
To: linux-mips@linux-mips.org
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
Cc: mingo@elte.hu
Cc: acme@redhat.com
Cc: jamie.iles@picochip.com
Cc: ddaney@caviumnetworks.com
Cc: matt@console-pimps.org
Patchwork: https://patchwork.linux-mips.org/patch/1689/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 create mode 100644 arch/mips/kernel/perf_event_mipsxx.c
2010-10-29 19:08:49 +01:00
..
alchemy Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2010-10-25 08:32:05 -07:00
ar7 MIPS: AR7: Add support for Titan (TNETV10xx) SoC variant 2010-10-29 19:08:46 +01:00
bcm47xx MIPS: BCM47xx: Fix nvram_getenv return value. 2010-08-05 13:26:31 +01:00
bcm63xx MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
boot Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus 2010-10-18 13:10:36 -07:00
cavium-octeon MIPS: Add platform device and Kconfig for Octeon USB EHCI / OHCI 2010-10-29 19:08:45 +01:00
cobalt MIPS: Move Cobalt Makefile parts to their own Platform file 2010-08-05 13:25:47 +01:00
configs defconfig reduction 2010-08-14 22:26:53 +02:00
dec Merge git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-irqflags 2010-10-21 14:37:27 -07:00
emma MIPS: Ritually kill stupid printk. 2010-08-05 13:26:27 +01:00
fw
include/asm MIPS: add support for hardware performance events (skeleton) 2010-10-29 19:08:48 +01:00
jazz MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
jz4740 MIPS: jz4740: Fix Kbuild Platform file. 2010-10-19 18:32:39 +01:00
kernel MIPS: Add support for hardware performance events (mipsxx) 2010-10-29 19:08:49 +01:00
lasat MIPS: Lasat: Migrate to new platform makefile style. 2010-08-05 13:25:53 +01:00
lib MIPS: libgcc.h: Checkpatch cleanup 2010-04-12 17:26:15 +01:00
loongson MIPS: Kconfig cleanup 2010-10-29 19:08:26 +01:00
math-emu MIPS: add support for software performance events 2010-10-29 19:08:48 +01:00
mipssim MIPS: MIPSsim: Migrate to new Platform file 2010-08-05 13:25:45 +01:00
mm MIPS: add support for software performance events 2010-10-29 19:08:48 +01:00
mti-malta MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
nxp/pnx8550/common MIPS: PNX8550: Move code one directory level up. 2010-08-05 13:25:56 +01:00
oprofile MIPS: Oprofile: Fixup of loongson2_exit() 2010-07-05 17:17:31 +01:00
pci MIPS: Octeon: Rewrite DMA mapping functions. 2010-10-29 19:08:32 +01:00
pmc-sierra MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
pnx833x MIPS: Fix gen_nand probe structures contents 2010-08-12 12:22:49 +01:00
pnx8550 MIPS: PNX8550: Sort out machine halt, restart and powerdown functions. 2010-10-04 18:33:57 +01:00
power
powertv MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
rb532 MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
sgi-ip22 MIPS: IP22, IP28: Migrate to new platform makefile style. 2010-08-05 13:25:49 +01:00
sgi-ip27 MIPS: IP27: Migrate to new Platform file 2010-08-05 13:25:47 +01:00
sgi-ip32 MIPS: IP32: Migrate to new platform makefile style. 2010-08-05 13:25:50 +01:00
sibyte Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
sni MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
txx9 MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
vr41xx MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
wrppmc MIPS: WRPPMC: Migrate to new platform makefile style. 2010-08-05 13:25:51 +01:00
Kbuild MIPS: Repair Kbuild make clean breakage. 2010-10-19 18:32:39 +01:00
Kbuild.platforms MIPS: JZ4740: Add Kbuild files 2010-08-05 13:26:17 +01:00
Kconfig MIPS: add support for hardware performance events (skeleton) 2010-10-29 19:08:48 +01:00
Kconfig.debug MIPS: IRQ: Add stackoverflow detection 2010-10-29 19:08:27 +01:00
Makefile MIPS: Octeon: Apply CN63XXP1 errata workarounds. 2010-10-29 19:08:43 +01:00