aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/cpu_setup_fsl_booke.S12
-rw-r--r--arch/powerpc/kernel/cputable.c5
-rw-r--r--arch/powerpc/kernel/exceptions-64e.S4
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S26
-rw-r--r--arch/powerpc/kernel/msi.c12
-rw-r--r--arch/powerpc/kernel/suspend.c4
6 files changed, 37 insertions, 26 deletions
diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S b/arch/powerpc/kernel/cpu_setup_fsl_booke.S
index 4f1393d20079..dddba3e94260 100644
--- a/arch/powerpc/kernel/cpu_setup_fsl_booke.S
+++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S
@@ -91,6 +91,7 @@ _GLOBAL(setup_altivec_idle)
91 91
92 blr 92 blr
93 93
94#ifdef CONFIG_PPC_E500MC
94_GLOBAL(__setup_cpu_e6500) 95_GLOBAL(__setup_cpu_e6500)
95 mflr r6 96 mflr r6
96#ifdef CONFIG_PPC64 97#ifdef CONFIG_PPC64
@@ -107,14 +108,20 @@ _GLOBAL(__setup_cpu_e6500)
107 bl __setup_cpu_e5500 108 bl __setup_cpu_e5500
108 mtlr r6 109 mtlr r6
109 blr 110 blr
111#endif /* CONFIG_PPC_E500MC */
110 112
111#ifdef CONFIG_PPC32 113#ifdef CONFIG_PPC32
114#ifdef CONFIG_E200
112_GLOBAL(__setup_cpu_e200) 115_GLOBAL(__setup_cpu_e200)
113 /* enable dedicated debug exception handling resources (Debug APU) */ 116 /* enable dedicated debug exception handling resources (Debug APU) */
114 mfspr r3,SPRN_HID0 117 mfspr r3,SPRN_HID0
115 ori r3,r3,HID0_DAPUEN@l 118 ori r3,r3,HID0_DAPUEN@l
116 mtspr SPRN_HID0,r3 119 mtspr SPRN_HID0,r3
117 b __setup_e200_ivors 120 b __setup_e200_ivors
121#endif /* CONFIG_E200 */
122
123#ifdef CONFIG_E500
124#ifndef CONFIG_PPC_E500MC
118_GLOBAL(__setup_cpu_e500v1) 125_GLOBAL(__setup_cpu_e500v1)
119_GLOBAL(__setup_cpu_e500v2) 126_GLOBAL(__setup_cpu_e500v2)
120 mflr r4 127 mflr r4
@@ -129,6 +136,7 @@ _GLOBAL(__setup_cpu_e500v2)
129#endif 136#endif
130 mtlr r4 137 mtlr r4
131 blr 138 blr
139#else /* CONFIG_PPC_E500MC */
132_GLOBAL(__setup_cpu_e500mc) 140_GLOBAL(__setup_cpu_e500mc)
133_GLOBAL(__setup_cpu_e5500) 141_GLOBAL(__setup_cpu_e5500)
134 mflr r5 142 mflr r5
@@ -159,7 +167,9 @@ _GLOBAL(__setup_cpu_e5500)
1592: 1672:
160 mtlr r5 168 mtlr r5
161 blr 169 blr
162#endif 170#endif /* CONFIG_PPC_E500MC */
171#endif /* CONFIG_E500 */
172#endif /* CONFIG_PPC32 */
163 173
164#ifdef CONFIG_PPC_BOOK3E_64 174#ifdef CONFIG_PPC_BOOK3E_64
165_GLOBAL(__restore_cpu_e6500) 175_GLOBAL(__restore_cpu_e6500)
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 9b6dcaaec1a3..808405906336 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -1961,6 +1961,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1961#endif /* CONFIG_PPC32 */ 1961#endif /* CONFIG_PPC32 */
1962#ifdef CONFIG_E500 1962#ifdef CONFIG_E500
1963#ifdef CONFIG_PPC32 1963#ifdef CONFIG_PPC32
1964#ifndef CONFIG_PPC_E500MC
1964 { /* e500 */ 1965 { /* e500 */
1965 .pvr_mask = 0xffff0000, 1966 .pvr_mask = 0xffff0000,
1966 .pvr_value = 0x80200000, 1967 .pvr_value = 0x80200000,
@@ -2000,6 +2001,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
2000 .machine_check = machine_check_e500, 2001 .machine_check = machine_check_e500,
2001 .platform = "ppc8548", 2002 .platform = "ppc8548",
2002 }, 2003 },
2004#else
2003 { /* e500mc */ 2005 { /* e500mc */
2004 .pvr_mask = 0xffff0000, 2006 .pvr_mask = 0xffff0000,
2005 .pvr_value = 0x80230000, 2007 .pvr_value = 0x80230000,
@@ -2018,7 +2020,9 @@ static struct cpu_spec __initdata cpu_specs[] = {
2018 .machine_check = machine_check_e500mc, 2020 .machine_check = machine_check_e500mc,
2019 .platform = "ppce500mc", 2021 .platform = "ppce500mc",
2020 }, 2022 },
2023#endif /* CONFIG_PPC_E500MC */
2021#endif /* CONFIG_PPC32 */ 2024#endif /* CONFIG_PPC32 */
2025#ifdef CONFIG_PPC_E500MC
2022 { /* e5500 */ 2026 { /* e5500 */
2023 .pvr_mask = 0xffff0000, 2027 .pvr_mask = 0xffff0000,
2024 .pvr_value = 0x80240000, 2028 .pvr_value = 0x80240000,
@@ -2062,6 +2066,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
2062 .machine_check = machine_check_e500mc, 2066 .machine_check = machine_check_e500mc,
2063 .platform = "ppce6500", 2067 .platform = "ppce6500",
2064 }, 2068 },
2069#endif /* CONFIG_PPC_E500MC */
2065#ifdef CONFIG_PPC32 2070#ifdef CONFIG_PPC32
2066 { /* default match */ 2071 { /* default match */
2067 .pvr_mask = 0x00000000, 2072 .pvr_mask = 0x00000000,
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index bb9cac6c8051..3e68d1c69718 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -635,7 +635,7 @@ interrupt_end_book3e:
635 635
636/* Altivec Unavailable Interrupt */ 636/* Altivec Unavailable Interrupt */
637 START_EXCEPTION(altivec_unavailable); 637 START_EXCEPTION(altivec_unavailable);
638 NORMAL_EXCEPTION_PROLOG(0x200, BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL, 638 NORMAL_EXCEPTION_PROLOG(0x200, BOOKE_INTERRUPT_ALTIVEC_UNAVAIL,
639 PROLOG_ADDITION_NONE) 639 PROLOG_ADDITION_NONE)
640 /* we can probably do a shorter exception entry for that one... */ 640 /* we can probably do a shorter exception entry for that one... */
641 EXCEPTION_COMMON(0x200) 641 EXCEPTION_COMMON(0x200)
@@ -658,7 +658,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
658/* AltiVec Assist */ 658/* AltiVec Assist */
659 START_EXCEPTION(altivec_assist); 659 START_EXCEPTION(altivec_assist);
660 NORMAL_EXCEPTION_PROLOG(0x220, 660 NORMAL_EXCEPTION_PROLOG(0x220,
661 BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST, 661 BOOKE_INTERRUPT_ALTIVEC_ASSIST,
662 PROLOG_ADDITION_NONE) 662 PROLOG_ADDITION_NONE)
663 EXCEPTION_COMMON(0x220) 663 EXCEPTION_COMMON(0x220)
664 INTS_DISABLE 664 INTS_DISABLE
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index b497188a94a1..fffd1f96bb1d 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -613,34 +613,36 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
613 mfspr r10, SPRN_SPRG_RSCRATCH0 613 mfspr r10, SPRN_SPRG_RSCRATCH0
614 b InstructionStorage 614 b InstructionStorage
615 615
616/* Define SPE handlers for e200 and e500v2 */
616#ifdef CONFIG_SPE 617#ifdef CONFIG_SPE
617 /* SPE Unavailable */ 618 /* SPE Unavailable */
618 START_EXCEPTION(SPEUnavailable) 619 START_EXCEPTION(SPEUnavailable)
619 NORMAL_EXCEPTION_PROLOG(SPE_ALTIVEC_UNAVAIL) 620 NORMAL_EXCEPTION_PROLOG(SPE_UNAVAIL)
620 beq 1f 621 beq 1f
621 bl load_up_spe 622 bl load_up_spe
622 b fast_exception_return 623 b fast_exception_return
6231: addi r3,r1,STACK_FRAME_OVERHEAD 6241: addi r3,r1,STACK_FRAME_OVERHEAD
624 EXC_XFER_EE_LITE(0x2010, KernelSPE) 625 EXC_XFER_EE_LITE(0x2010, KernelSPE)
625#else 626#elif defined(CONFIG_SPE_POSSIBLE)
626 EXCEPTION(0x2020, SPE_ALTIVEC_UNAVAIL, SPEUnavailable, \ 627 EXCEPTION(0x2020, SPE_UNAVAIL, SPEUnavailable, \
627 unknown_exception, EXC_XFER_EE) 628 unknown_exception, EXC_XFER_EE)
628#endif /* CONFIG_SPE */ 629#endif /* CONFIG_SPE_POSSIBLE */
629 630
630 /* SPE Floating Point Data */ 631 /* SPE Floating Point Data */
631#ifdef CONFIG_SPE 632#ifdef CONFIG_SPE
632 EXCEPTION(0x2030, SPE_FP_DATA_ALTIVEC_ASSIST, SPEFloatingPointData, 633 EXCEPTION(0x2030, SPE_FP_DATA, SPEFloatingPointData,
633 SPEFloatingPointException, EXC_XFER_EE) 634 SPEFloatingPointException, EXC_XFER_EE)
634 635
635 /* SPE Floating Point Round */ 636 /* SPE Floating Point Round */
636 EXCEPTION(0x2050, SPE_FP_ROUND, SPEFloatingPointRound, \ 637 EXCEPTION(0x2050, SPE_FP_ROUND, SPEFloatingPointRound, \
637 SPEFloatingPointRoundException, EXC_XFER_EE) 638 SPEFloatingPointRoundException, EXC_XFER_EE)
638#else 639#elif defined(CONFIG_SPE_POSSIBLE)
639 EXCEPTION(0x2040, SPE_FP_DATA_ALTIVEC_ASSIST, SPEFloatingPointData, 640 EXCEPTION(0x2040, SPE_FP_DATA, SPEFloatingPointData,
640 unknown_exception, EXC_XFER_EE) 641 unknown_exception, EXC_XFER_EE)
641 EXCEPTION(0x2050, SPE_FP_ROUND, SPEFloatingPointRound, \ 642 EXCEPTION(0x2050, SPE_FP_ROUND, SPEFloatingPointRound, \
642 unknown_exception, EXC_XFER_EE) 643 unknown_exception, EXC_XFER_EE)
643#endif /* CONFIG_SPE */ 644#endif /* CONFIG_SPE_POSSIBLE */
645
644 646
645 /* Performance Monitor */ 647 /* Performance Monitor */
646 EXCEPTION(0x2060, PERFORMANCE_MONITOR, PerformanceMonitor, \ 648 EXCEPTION(0x2060, PERFORMANCE_MONITOR, PerformanceMonitor, \
@@ -947,6 +949,7 @@ get_phys_addr:
947 * Global functions 949 * Global functions
948 */ 950 */
949 951
952#ifdef CONFIG_E200
950/* Adjust or setup IVORs for e200 */ 953/* Adjust or setup IVORs for e200 */
951_GLOBAL(__setup_e200_ivors) 954_GLOBAL(__setup_e200_ivors)
952 li r3,DebugDebug@l 955 li r3,DebugDebug@l
@@ -959,7 +962,10 @@ _GLOBAL(__setup_e200_ivors)
959 mtspr SPRN_IVOR34,r3 962 mtspr SPRN_IVOR34,r3
960 sync 963 sync
961 blr 964 blr
965#endif
962 966
967#ifdef CONFIG_E500
968#ifndef CONFIG_PPC_E500MC
963/* Adjust or setup IVORs for e500v1/v2 */ 969/* Adjust or setup IVORs for e500v1/v2 */
964_GLOBAL(__setup_e500_ivors) 970_GLOBAL(__setup_e500_ivors)
965 li r3,DebugCrit@l 971 li r3,DebugCrit@l
@@ -974,7 +980,7 @@ _GLOBAL(__setup_e500_ivors)
974 mtspr SPRN_IVOR35,r3 980 mtspr SPRN_IVOR35,r3
975 sync 981 sync
976 blr 982 blr
977 983#else
978/* Adjust or setup IVORs for e500mc */ 984/* Adjust or setup IVORs for e500mc */
979_GLOBAL(__setup_e500mc_ivors) 985_GLOBAL(__setup_e500mc_ivors)
980 li r3,DebugDebug@l 986 li r3,DebugDebug@l
@@ -1000,6 +1006,8 @@ _GLOBAL(__setup_ehv_ivors)
1000 mtspr SPRN_IVOR41,r3 1006 mtspr SPRN_IVOR41,r3
1001 sync 1007 sync
1002 blr 1008 blr
1009#endif /* CONFIG_PPC_E500MC */
1010#endif /* CONFIG_E500 */
1003 1011
1004#ifdef CONFIG_SPE 1012#ifdef CONFIG_SPE
1005/* 1013/*
diff --git a/arch/powerpc/kernel/msi.c b/arch/powerpc/kernel/msi.c
index 8bbc12d20f5c..71bd161640cf 100644
--- a/arch/powerpc/kernel/msi.c
+++ b/arch/powerpc/kernel/msi.c
@@ -13,7 +13,7 @@
13 13
14#include <asm/machdep.h> 14#include <asm/machdep.h>
15 15
16int arch_msi_check_device(struct pci_dev* dev, int nvec, int type) 16int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
17{ 17{
18 if (!ppc_md.setup_msi_irqs || !ppc_md.teardown_msi_irqs) { 18 if (!ppc_md.setup_msi_irqs || !ppc_md.teardown_msi_irqs) {
19 pr_debug("msi: Platform doesn't provide MSI callbacks.\n"); 19 pr_debug("msi: Platform doesn't provide MSI callbacks.\n");
@@ -24,16 +24,6 @@ int arch_msi_check_device(struct pci_dev* dev, int nvec, int type)
24 if (type == PCI_CAP_ID_MSI && nvec > 1) 24 if (type == PCI_CAP_ID_MSI && nvec > 1)
25 return 1; 25 return 1;
26 26
27 if (ppc_md.msi_check_device) {
28 pr_debug("msi: Using platform check routine.\n");
29 return ppc_md.msi_check_device(dev, nvec, type);
30 }
31
32 return 0;
33}
34
35int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
36{
37 return ppc_md.setup_msi_irqs(dev, nvec, type); 27 return ppc_md.setup_msi_irqs(dev, nvec, type);
38} 28}
39 29
diff --git a/arch/powerpc/kernel/suspend.c b/arch/powerpc/kernel/suspend.c
index 0167d53da30c..a531154cc0f3 100644
--- a/arch/powerpc/kernel/suspend.c
+++ b/arch/powerpc/kernel/suspend.c
@@ -9,9 +9,7 @@
9 9
10#include <linux/mm.h> 10#include <linux/mm.h>
11#include <asm/page.h> 11#include <asm/page.h>
12 12#include <asm/sections.h>
13/* References to section boundaries */
14extern const void __nosave_begin, __nosave_end;
15 13
16/* 14/*
17 * pfn_is_nosave - check if given pfn is in the 'nosave' section 15 * pfn_is_nosave - check if given pfn is in the 'nosave' section