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 /arch/powerpc/kernel/cputable.c | |
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 'arch/powerpc/kernel/cputable.c')
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 74 |
1 files changed, 63 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 1d85cedbbb7b..f7f2a830fca1 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -545,7 +545,11 @@ struct cpu_spec cpu_specs[] = { | |||
545 | .icache_bsize = 32, | 545 | .icache_bsize = 32, |
546 | .dcache_bsize = 32, | 546 | .dcache_bsize = 32, |
547 | .num_pmcs = 6, | 547 | .num_pmcs = 6, |
548 | .cpu_setup = __setup_cpu_745x | 548 | .cpu_setup = __setup_cpu_745x, |
549 | #ifdef CONFIG_OPROFILE | ||
550 | .oprofile_cpu_type = "ppc/7450", | ||
551 | .oprofile_model = &op_model_7450, | ||
552 | #endif | ||
549 | }, | 553 | }, |
550 | { /* 7450 2.1 */ | 554 | { /* 7450 2.1 */ |
551 | .pvr_mask = 0xffffffff, | 555 | .pvr_mask = 0xffffffff, |
@@ -556,7 +560,11 @@ struct cpu_spec cpu_specs[] = { | |||
556 | .icache_bsize = 32, | 560 | .icache_bsize = 32, |
557 | .dcache_bsize = 32, | 561 | .dcache_bsize = 32, |
558 | .num_pmcs = 6, | 562 | .num_pmcs = 6, |
559 | .cpu_setup = __setup_cpu_745x | 563 | .cpu_setup = __setup_cpu_745x, |
564 | #ifdef CONFIG_OPROFILE | ||
565 | .oprofile_cpu_type = "ppc/7450", | ||
566 | .oprofile_model = &op_model_7450, | ||
567 | #endif | ||
560 | }, | 568 | }, |
561 | { /* 7450 2.3 and newer */ | 569 | { /* 7450 2.3 and newer */ |
562 | .pvr_mask = 0xffff0000, | 570 | .pvr_mask = 0xffff0000, |
@@ -567,7 +575,11 @@ struct cpu_spec cpu_specs[] = { | |||
567 | .icache_bsize = 32, | 575 | .icache_bsize = 32, |
568 | .dcache_bsize = 32, | 576 | .dcache_bsize = 32, |
569 | .num_pmcs = 6, | 577 | .num_pmcs = 6, |
570 | .cpu_setup = __setup_cpu_745x | 578 | .cpu_setup = __setup_cpu_745x, |
579 | #ifdef CONFIG_OPROFILE | ||
580 | .oprofile_cpu_type = "ppc/7450", | ||
581 | .oprofile_model = &op_model_7450, | ||
582 | #endif | ||
571 | }, | 583 | }, |
572 | { /* 7455 rev 1.x */ | 584 | { /* 7455 rev 1.x */ |
573 | .pvr_mask = 0xffffff00, | 585 | .pvr_mask = 0xffffff00, |
@@ -578,7 +590,11 @@ struct cpu_spec cpu_specs[] = { | |||
578 | .icache_bsize = 32, | 590 | .icache_bsize = 32, |
579 | .dcache_bsize = 32, | 591 | .dcache_bsize = 32, |
580 | .num_pmcs = 6, | 592 | .num_pmcs = 6, |
581 | .cpu_setup = __setup_cpu_745x | 593 | .cpu_setup = __setup_cpu_745x, |
594 | #ifdef CONFIG_OPROFILE | ||
595 | .oprofile_cpu_type = "ppc/7450", | ||
596 | .oprofile_model = &op_model_7450, | ||
597 | #endif | ||
582 | }, | 598 | }, |
583 | { /* 7455 rev 2.0 */ | 599 | { /* 7455 rev 2.0 */ |
584 | .pvr_mask = 0xffffffff, | 600 | .pvr_mask = 0xffffffff, |
@@ -589,7 +605,11 @@ struct cpu_spec cpu_specs[] = { | |||
589 | .icache_bsize = 32, | 605 | .icache_bsize = 32, |
590 | .dcache_bsize = 32, | 606 | .dcache_bsize = 32, |
591 | .num_pmcs = 6, | 607 | .num_pmcs = 6, |
592 | .cpu_setup = __setup_cpu_745x | 608 | .cpu_setup = __setup_cpu_745x, |
609 | #ifdef CONFIG_OPROFILE | ||
610 | .oprofile_cpu_type = "ppc/7450", | ||
611 | .oprofile_model = &op_model_7450, | ||
612 | #endif | ||
593 | }, | 613 | }, |
594 | { /* 7455 others */ | 614 | { /* 7455 others */ |
595 | .pvr_mask = 0xffff0000, | 615 | .pvr_mask = 0xffff0000, |
@@ -600,7 +620,11 @@ struct cpu_spec cpu_specs[] = { | |||
600 | .icache_bsize = 32, | 620 | .icache_bsize = 32, |
601 | .dcache_bsize = 32, | 621 | .dcache_bsize = 32, |
602 | .num_pmcs = 6, | 622 | .num_pmcs = 6, |
603 | .cpu_setup = __setup_cpu_745x | 623 | .cpu_setup = __setup_cpu_745x, |
624 | #ifdef CONFIG_OPROFILE | ||
625 | .oprofile_cpu_type = "ppc/7450", | ||
626 | .oprofile_model = &op_model_7450, | ||
627 | #endif | ||
604 | }, | 628 | }, |
605 | { /* 7447/7457 Rev 1.0 */ | 629 | { /* 7447/7457 Rev 1.0 */ |
606 | .pvr_mask = 0xffffffff, | 630 | .pvr_mask = 0xffffffff, |
@@ -611,7 +635,11 @@ struct cpu_spec cpu_specs[] = { | |||
611 | .icache_bsize = 32, | 635 | .icache_bsize = 32, |
612 | .dcache_bsize = 32, | 636 | .dcache_bsize = 32, |
613 | .num_pmcs = 6, | 637 | .num_pmcs = 6, |
614 | .cpu_setup = __setup_cpu_745x | 638 | .cpu_setup = __setup_cpu_745x, |
639 | #ifdef CONFIG_OPROFILE | ||
640 | .oprofile_cpu_type = "ppc/7450", | ||
641 | .oprofile_model = &op_model_7450, | ||
642 | #endif | ||
615 | }, | 643 | }, |
616 | { /* 7447/7457 Rev 1.1 */ | 644 | { /* 7447/7457 Rev 1.1 */ |
617 | .pvr_mask = 0xffffffff, | 645 | .pvr_mask = 0xffffffff, |
@@ -622,7 +650,11 @@ struct cpu_spec cpu_specs[] = { | |||
622 | .icache_bsize = 32, | 650 | .icache_bsize = 32, |
623 | .dcache_bsize = 32, | 651 | .dcache_bsize = 32, |
624 | .num_pmcs = 6, | 652 | .num_pmcs = 6, |
625 | .cpu_setup = __setup_cpu_745x | 653 | .cpu_setup = __setup_cpu_745x, |
654 | #ifdef CONFIG_OPROFILE | ||
655 | .oprofile_cpu_type = "ppc/7450", | ||
656 | .oprofile_model = &op_model_7450, | ||
657 | #endif | ||
626 | }, | 658 | }, |
627 | { /* 7447/7457 Rev 1.2 and later */ | 659 | { /* 7447/7457 Rev 1.2 and later */ |
628 | .pvr_mask = 0xffff0000, | 660 | .pvr_mask = 0xffff0000, |
@@ -633,7 +665,11 @@ struct cpu_spec cpu_specs[] = { | |||
633 | .icache_bsize = 32, | 665 | .icache_bsize = 32, |
634 | .dcache_bsize = 32, | 666 | .dcache_bsize = 32, |
635 | .num_pmcs = 6, | 667 | .num_pmcs = 6, |
636 | .cpu_setup = __setup_cpu_745x | 668 | .cpu_setup = __setup_cpu_745x, |
669 | #ifdef CONFIG_OPROFILE | ||
670 | .oprofile_cpu_type = "ppc/7450", | ||
671 | .oprofile_model = &op_model_7450, | ||
672 | #endif | ||
637 | }, | 673 | }, |
638 | { /* 7447A */ | 674 | { /* 7447A */ |
639 | .pvr_mask = 0xffff0000, | 675 | .pvr_mask = 0xffff0000, |
@@ -644,7 +680,11 @@ struct cpu_spec cpu_specs[] = { | |||
644 | .icache_bsize = 32, | 680 | .icache_bsize = 32, |
645 | .dcache_bsize = 32, | 681 | .dcache_bsize = 32, |
646 | .num_pmcs = 6, | 682 | .num_pmcs = 6, |
647 | .cpu_setup = __setup_cpu_745x | 683 | .cpu_setup = __setup_cpu_745x, |
684 | #ifdef CONFIG_OPROFILE | ||
685 | .oprofile_cpu_type = "ppc/7450", | ||
686 | .oprofile_model = &op_model_7450, | ||
687 | #endif | ||
648 | }, | 688 | }, |
649 | { /* 7448 */ | 689 | { /* 7448 */ |
650 | .pvr_mask = 0xffff0000, | 690 | .pvr_mask = 0xffff0000, |
@@ -655,7 +695,11 @@ struct cpu_spec cpu_specs[] = { | |||
655 | .icache_bsize = 32, | 695 | .icache_bsize = 32, |
656 | .dcache_bsize = 32, | 696 | .dcache_bsize = 32, |
657 | .num_pmcs = 6, | 697 | .num_pmcs = 6, |
658 | .cpu_setup = __setup_cpu_745x | 698 | .cpu_setup = __setup_cpu_745x, |
699 | #ifdef CONFIG_OPROFILE | ||
700 | .oprofile_cpu_type = "ppc/7450", | ||
701 | .oprofile_model = &op_model_7450, | ||
702 | #endif | ||
659 | }, | 703 | }, |
660 | { /* 82xx (8240, 8245, 8260 are all 603e cores) */ | 704 | { /* 82xx (8240, 8245, 8260 are all 603e cores) */ |
661 | .pvr_mask = 0x7fff0000, | 705 | .pvr_mask = 0x7fff0000, |
@@ -979,6 +1023,10 @@ struct cpu_spec cpu_specs[] = { | |||
979 | .icache_bsize = 32, | 1023 | .icache_bsize = 32, |
980 | .dcache_bsize = 32, | 1024 | .dcache_bsize = 32, |
981 | .num_pmcs = 4, | 1025 | .num_pmcs = 4, |
1026 | #ifdef CONFIG_OPROFILE | ||
1027 | .oprofile_cpu_type = "ppc/e500", | ||
1028 | .oprofile_model = &op_model_fsl_booke, | ||
1029 | #endif | ||
982 | }, | 1030 | }, |
983 | { /* e500v2 */ | 1031 | { /* e500v2 */ |
984 | .pvr_mask = 0xffff0000, | 1032 | .pvr_mask = 0xffff0000, |
@@ -992,6 +1040,10 @@ struct cpu_spec cpu_specs[] = { | |||
992 | .icache_bsize = 32, | 1040 | .icache_bsize = 32, |
993 | .dcache_bsize = 32, | 1041 | .dcache_bsize = 32, |
994 | .num_pmcs = 4, | 1042 | .num_pmcs = 4, |
1043 | #ifdef CONFIG_OPROFILE | ||
1044 | .oprofile_cpu_type = "ppc/e500", | ||
1045 | .oprofile_model = &op_model_fsl_booke, | ||
1046 | #endif | ||
995 | }, | 1047 | }, |
996 | #endif | 1048 | #endif |
997 | #if !CLASSIC_PPC | 1049 | #if !CLASSIC_PPC |