diff options
author | Andy Fleming <afleming@freescale.com> | 2005-12-15 21:02:04 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-08 23:06:03 -0500 |
commit | 555d97ac87aef08bb55dff6f05e68fe2987d6f6d (patch) | |
tree | 7016485d112af04b972dcc749e437a7131424252 /include/asm-powerpc/reg.h | |
parent | e5cd040409dc0f8d34a21827d6b74918b3a4fccf (diff) |
[PATCH] powerpc: G4+ oprofile support
This patch adds oprofile support for the 7450 and all its multitudinous
derivatives.
* Added 7450 (and derivatives) support for oprofile
* Changed e500 cputable to have oprofile model and cpu_type fields
* Added support for classic 32-bit performance monitor interrupt
* Cleaned up common powerpc oprofile code to be as common as possible
* Cleaned up oprofile_impl.h to reflect 32 bit classic code
* Added 32-bit MMCRx bitfield definitions and SPR numbers
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/reg.h')
-rw-r--r-- | include/asm-powerpc/reg.h | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index eb392d038ed7..a9a76857f5aa 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
@@ -443,12 +443,35 @@ | |||
443 | #define SPRN_SDAR 781 | 443 | #define SPRN_SDAR 781 |
444 | 444 | ||
445 | #else /* 32-bit */ | 445 | #else /* 32-bit */ |
446 | #define SPRN_MMCR0 0x3B8 /* Monitor Mode Control Register 0 */ | 446 | #define SPRN_MMCR0 952 /* Monitor Mode Control Register 0 */ |
447 | #define SPRN_MMCR1 0x3BC /* Monitor Mode Control Register 1 */ | 447 | #define MMCR0_FC 0x80000000UL /* freeze counters */ |
448 | #define SPRN_PMC1 0x3B9 /* Performance Counter Register 1 */ | 448 | #define MMCR0_FCS 0x40000000UL /* freeze in supervisor state */ |
449 | #define SPRN_PMC2 0x3BA /* Performance Counter Register 2 */ | 449 | #define MMCR0_FCP 0x20000000UL /* freeze in problem state */ |
450 | #define SPRN_PMC3 0x3BD /* Performance Counter Register 3 */ | 450 | #define MMCR0_FCM1 0x10000000UL /* freeze counters while MSR mark = 1 */ |
451 | #define SPRN_PMC4 0x3BE /* Performance Counter Register 4 */ | 451 | #define MMCR0_FCM0 0x08000000UL /* freeze counters while MSR mark = 0 */ |
452 | #define MMCR0_PMXE 0x04000000UL /* performance monitor exception enable */ | ||
453 | #define MMCR0_FCECE 0x02000000UL /* freeze ctrs on enabled cond or event */ | ||
454 | #define MMCR0_TBEE 0x00400000UL /* time base exception enable */ | ||
455 | #define MMCR0_PMC1CE 0x00008000UL /* PMC1 count enable*/ | ||
456 | #define MMCR0_PMCnCE 0x00004000UL /* count enable for all but PMC 1*/ | ||
457 | #define MMCR0_TRIGGER 0x00002000UL /* TRIGGER enable */ | ||
458 | #define MMCR0_PMC1SEL 0x00001fc0UL /* PMC 1 Event */ | ||
459 | #define MMCR0_PMC2SEL 0x0000003fUL /* PMC 2 Event */ | ||
460 | |||
461 | #define SPRN_MMCR1 956 | ||
462 | #define MMCR1_PMC3SEL 0xf8000000UL /* PMC 3 Event */ | ||
463 | #define MMCR1_PMC4SEL 0x07c00000UL /* PMC 4 Event */ | ||
464 | #define MMCR1_PMC5SEL 0x003e0000UL /* PMC 5 Event */ | ||
465 | #define MMCR1_PMC6SEL 0x0001f800UL /* PMC 6 Event */ | ||
466 | #define SPRN_MMCR2 944 | ||
467 | #define SPRN_PMC1 953 /* Performance Counter Register 1 */ | ||
468 | #define SPRN_PMC2 954 /* Performance Counter Register 2 */ | ||
469 | #define SPRN_PMC3 957 /* Performance Counter Register 3 */ | ||
470 | #define SPRN_PMC4 958 /* Performance Counter Register 4 */ | ||
471 | #define SPRN_PMC5 945 /* Performance Counter Register 5 */ | ||
472 | #define SPRN_PMC6 946 /* Performance Counter Register 6 */ | ||
473 | |||
474 | #define SPRN_SIAR 955 /* Sampled Instruction Address Register */ | ||
452 | 475 | ||
453 | /* Bit definitions for MMCR0 and PMC1 / PMC2. */ | 476 | /* Bit definitions for MMCR0 and PMC1 / PMC2. */ |
454 | #define MMCR0_PMC1_CYCLES (1 << 7) | 477 | #define MMCR0_PMC1_CYCLES (1 << 7) |
@@ -458,7 +481,6 @@ | |||
458 | #define MMCR0_PMC2_CYCLES 0x1 | 481 | #define MMCR0_PMC2_CYCLES 0x1 |
459 | #define MMCR0_PMC2_ITLB 0x7 | 482 | #define MMCR0_PMC2_ITLB 0x7 |
460 | #define MMCR0_PMC2_LOADMISSTIME 0x5 | 483 | #define MMCR0_PMC2_LOADMISSTIME 0x5 |
461 | #define MMCR0_PMXE (1 << 26) | ||
462 | #endif | 484 | #endif |
463 | 485 | ||
464 | /* Processor Version Register (PVR) field extraction */ | 486 | /* Processor Version Register (PVR) field extraction */ |