aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/cputable.c74
-rw-r--r--arch/powerpc/kernel/head_32.S12
-rw-r--r--arch/powerpc/kernel/pmc.c5
-rw-r--r--arch/powerpc/kernel/traps.c2
4 files changed, 74 insertions, 19 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
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index 6359e364fe66..bf37ef2b3aac 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -466,16 +466,11 @@ SystemCall:
466 * by executing an altivec instruction. 466 * by executing an altivec instruction.
467 */ 467 */
468 . = 0xf00 468 . = 0xf00
469 b Trap_0f 469 b PerformanceMonitor
470 470
471 . = 0xf20 471 . = 0xf20
472 b AltiVecUnavailable 472 b AltiVecUnavailable
473 473
474Trap_0f:
475 EXCEPTION_PROLOG
476 addi r3,r1,STACK_FRAME_OVERHEAD
477 EXC_XFER_EE(0xf00, unknown_exception)
478
479/* 474/*
480 * Handle TLB miss for instruction on 603/603e. 475 * Handle TLB miss for instruction on 603/603e.
481 * Note: we get an alternate set of r0 - r3 to use automatically. 476 * Note: we get an alternate set of r0 - r3 to use automatically.
@@ -719,6 +714,11 @@ AltiVecUnavailable:
719#endif /* CONFIG_ALTIVEC */ 714#endif /* CONFIG_ALTIVEC */
720 EXC_XFER_EE_LITE(0xf20, altivec_unavailable_exception) 715 EXC_XFER_EE_LITE(0xf20, altivec_unavailable_exception)
721 716
717PerformanceMonitor:
718 EXCEPTION_PROLOG
719 addi r3,r1,STACK_FRAME_OVERHEAD
720 EXC_XFER_STD(0xf00, performance_monitor_exception)
721
722#ifdef CONFIG_ALTIVEC 722#ifdef CONFIG_ALTIVEC
723/* Note that the AltiVec support is closely modeled after the FP 723/* Note that the AltiVec support is closely modeled after the FP
724 * support. Changes to one are likely to be applicable to the 724 * support. Changes to one are likely to be applicable to the
diff --git a/arch/powerpc/kernel/pmc.c b/arch/powerpc/kernel/pmc.c
index 2d333cc84082..e6fb194fe537 100644
--- a/arch/powerpc/kernel/pmc.c
+++ b/arch/powerpc/kernel/pmc.c
@@ -43,8 +43,13 @@ static void dummy_perf(struct pt_regs *regs)
43 mtspr(SPRN_MMCR0, mmcr0); 43 mtspr(SPRN_MMCR0, mmcr0);
44} 44}
45#else 45#else
46/* Ensure exceptions are disabled */
46static void dummy_perf(struct pt_regs *regs) 47static void dummy_perf(struct pt_regs *regs)
47{ 48{
49 unsigned int mmcr0 = mfspr(SPRN_MMCR0);
50
51 mmcr0 &= ~(MMCR0_PMXE);
52 mtspr(SPRN_MMCR0, mmcr0);
48} 53}
49#endif 54#endif
50 55
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 76b579ca5230..6c793463d511 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -901,12 +901,10 @@ void altivec_unavailable_exception(struct pt_regs *regs)
901 die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT); 901 die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT);
902} 902}
903 903
904#if defined(CONFIG_PPC64) || defined(CONFIG_E500)
905void performance_monitor_exception(struct pt_regs *regs) 904void performance_monitor_exception(struct pt_regs *regs)
906{ 905{
907 perf_irq(regs); 906 perf_irq(regs);
908} 907}
909#endif
910 908
911#ifdef CONFIG_8xx 909#ifdef CONFIG_8xx
912void SoftwareEmulation(struct pt_regs *regs) 910void SoftwareEmulation(struct pt_regs *regs)