diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/cpu_setup_fsl_booke.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/epapr_paravirt.c | 28 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/swsusp_booke.S | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/traps.c | 3 |
7 files changed, 35 insertions, 15 deletions
diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S b/arch/powerpc/kernel/cpu_setup_fsl_booke.S index 0b9af015bedc..bfb18c7290b7 100644 --- a/arch/powerpc/kernel/cpu_setup_fsl_booke.S +++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S | |||
@@ -75,7 +75,7 @@ _GLOBAL(__setup_cpu_e500v2) | |||
75 | bl __e500_icache_setup | 75 | bl __e500_icache_setup |
76 | bl __e500_dcache_setup | 76 | bl __e500_dcache_setup |
77 | bl __setup_e500_ivors | 77 | bl __setup_e500_ivors |
78 | #ifdef CONFIG_FSL_RIO | 78 | #if defined(CONFIG_FSL_RIO) || defined(CONFIG_FSL_PCI) |
79 | /* Ensure that RFXE is set */ | 79 | /* Ensure that RFXE is set */ |
80 | mfspr r3,SPRN_HID1 | 80 | mfspr r3,SPRN_HID1 |
81 | oris r3,r3,HID1_RFXE@h | 81 | oris r3,r3,HID1_RFXE@h |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 22973a74df73..597d954e5860 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -2105,7 +2105,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
2105 | MMU_FTR_USE_TLBILX, | 2105 | MMU_FTR_USE_TLBILX, |
2106 | .icache_bsize = 64, | 2106 | .icache_bsize = 64, |
2107 | .dcache_bsize = 64, | 2107 | .dcache_bsize = 64, |
2108 | .num_pmcs = 4, | 2108 | .num_pmcs = 6, |
2109 | .oprofile_cpu_type = "ppc/e6500", | 2109 | .oprofile_cpu_type = "ppc/e6500", |
2110 | .oprofile_type = PPC_OPROFILE_FSL_EMB, | 2110 | .oprofile_type = PPC_OPROFILE_FSL_EMB, |
2111 | .cpu_setup = __setup_cpu_e6500, | 2111 | .cpu_setup = __setup_cpu_e6500, |
diff --git a/arch/powerpc/kernel/epapr_paravirt.c b/arch/powerpc/kernel/epapr_paravirt.c index d44a571e45a7..6300c13bbde4 100644 --- a/arch/powerpc/kernel/epapr_paravirt.c +++ b/arch/powerpc/kernel/epapr_paravirt.c | |||
@@ -30,22 +30,20 @@ extern u32 epapr_ev_idle_start[]; | |||
30 | 30 | ||
31 | bool epapr_paravirt_enabled; | 31 | bool epapr_paravirt_enabled; |
32 | 32 | ||
33 | static int __init epapr_paravirt_init(void) | 33 | static int __init early_init_dt_scan_epapr(unsigned long node, |
34 | const char *uname, | ||
35 | int depth, void *data) | ||
34 | { | 36 | { |
35 | struct device_node *hyper_node; | ||
36 | const u32 *insts; | 37 | const u32 *insts; |
37 | int len, i; | 38 | unsigned long len; |
39 | int i; | ||
38 | 40 | ||
39 | hyper_node = of_find_node_by_path("/hypervisor"); | 41 | insts = of_get_flat_dt_prop(node, "hcall-instructions", &len); |
40 | if (!hyper_node) | ||
41 | return -ENODEV; | ||
42 | |||
43 | insts = of_get_property(hyper_node, "hcall-instructions", &len); | ||
44 | if (!insts) | 42 | if (!insts) |
45 | return -ENODEV; | 43 | return 0; |
46 | 44 | ||
47 | if (len % 4 || len > (4 * 4)) | 45 | if (len % 4 || len > (4 * 4)) |
48 | return -ENODEV; | 46 | return -1; |
49 | 47 | ||
50 | for (i = 0; i < (len / 4); i++) { | 48 | for (i = 0; i < (len / 4); i++) { |
51 | patch_instruction(epapr_hypercall_start + i, insts[i]); | 49 | patch_instruction(epapr_hypercall_start + i, insts[i]); |
@@ -55,13 +53,19 @@ static int __init epapr_paravirt_init(void) | |||
55 | } | 53 | } |
56 | 54 | ||
57 | #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64) | 55 | #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64) |
58 | if (of_get_property(hyper_node, "has-idle", NULL)) | 56 | if (of_get_flat_dt_prop(node, "has-idle", NULL)) |
59 | ppc_md.power_save = epapr_ev_idle; | 57 | ppc_md.power_save = epapr_ev_idle; |
60 | #endif | 58 | #endif |
61 | 59 | ||
62 | epapr_paravirt_enabled = true; | 60 | epapr_paravirt_enabled = true; |
63 | 61 | ||
62 | return 1; | ||
63 | } | ||
64 | |||
65 | int __init epapr_paravirt_early_init(void) | ||
66 | { | ||
67 | of_scan_flat_dt(early_init_dt_scan_epapr, NULL); | ||
68 | |||
64 | return 0; | 69 | return 0; |
65 | } | 70 | } |
66 | 71 | ||
67 | early_initcall(epapr_paravirt_init); | ||
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index a8f54ecb091f..a4bbcae72578 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/serial.h> | 38 | #include <asm/serial.h> |
39 | #include <asm/udbg.h> | 39 | #include <asm/udbg.h> |
40 | #include <asm/mmu_context.h> | 40 | #include <asm/mmu_context.h> |
41 | #include <asm/epapr_hcalls.h> | ||
41 | 42 | ||
42 | #include "setup.h" | 43 | #include "setup.h" |
43 | 44 | ||
@@ -128,6 +129,8 @@ notrace void __init machine_init(u64 dt_ptr) | |||
128 | /* Do some early initialization based on the flat device tree */ | 129 | /* Do some early initialization based on the flat device tree */ |
129 | early_init_devtree(__va(dt_ptr)); | 130 | early_init_devtree(__va(dt_ptr)); |
130 | 131 | ||
132 | epapr_paravirt_early_init(); | ||
133 | |||
131 | early_init_mmu(); | 134 | early_init_mmu(); |
132 | 135 | ||
133 | probe_machine(); | 136 | probe_machine(); |
@@ -326,5 +329,4 @@ void __init setup_arch(char **cmdline_p) | |||
326 | 329 | ||
327 | /* Initialize the MMU context management stuff */ | 330 | /* Initialize the MMU context management stuff */ |
328 | mmu_context_init(); | 331 | mmu_context_init(); |
329 | |||
330 | } | 332 | } |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 389fb8077cc9..f03770e0fc8d 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -66,6 +66,7 @@ | |||
66 | #include <asm/code-patching.h> | 66 | #include <asm/code-patching.h> |
67 | #include <asm/kvm_ppc.h> | 67 | #include <asm/kvm_ppc.h> |
68 | #include <asm/hugetlb.h> | 68 | #include <asm/hugetlb.h> |
69 | #include <asm/epapr_hcalls.h> | ||
69 | 70 | ||
70 | #include "setup.h" | 71 | #include "setup.h" |
71 | 72 | ||
@@ -215,6 +216,8 @@ void __init early_setup(unsigned long dt_ptr) | |||
215 | */ | 216 | */ |
216 | early_init_devtree(__va(dt_ptr)); | 217 | early_init_devtree(__va(dt_ptr)); |
217 | 218 | ||
219 | epapr_paravirt_early_init(); | ||
220 | |||
218 | /* Now we know the logical id of our boot cpu, setup the paca. */ | 221 | /* Now we know the logical id of our boot cpu, setup the paca. */ |
219 | setup_paca(&paca[boot_cpuid]); | 222 | setup_paca(&paca[boot_cpuid]); |
220 | fixup_boot_paca(); | 223 | fixup_boot_paca(); |
diff --git a/arch/powerpc/kernel/swsusp_booke.S b/arch/powerpc/kernel/swsusp_booke.S index 11a39307dd71..0f204053e5b5 100644 --- a/arch/powerpc/kernel/swsusp_booke.S +++ b/arch/powerpc/kernel/swsusp_booke.S | |||
@@ -141,6 +141,14 @@ _GLOBAL(swsusp_arch_resume) | |||
141 | lis r11,swsusp_save_area@h | 141 | lis r11,swsusp_save_area@h |
142 | ori r11,r11,swsusp_save_area@l | 142 | ori r11,r11,swsusp_save_area@l |
143 | 143 | ||
144 | /* | ||
145 | * Mappings from virtual addresses to physical addresses may be | ||
146 | * different than they were prior to restoring hibernation state. | ||
147 | * Invalidate the TLB so that the boot CPU is using the new | ||
148 | * mappings. | ||
149 | */ | ||
150 | bl _tlbil_all | ||
151 | |||
144 | lwz r4,SL_SPRG0(r11) | 152 | lwz r4,SL_SPRG0(r11) |
145 | mtsprg 0,r4 | 153 | mtsprg 0,r4 |
146 | lwz r4,SL_SPRG1(r11) | 154 | lwz r4,SL_SPRG1(r11) |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index bf33c22e38a4..f58eaf23e8f1 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #include <asm/switch_to.h> | 62 | #include <asm/switch_to.h> |
63 | #include <asm/tm.h> | 63 | #include <asm/tm.h> |
64 | #include <asm/debug.h> | 64 | #include <asm/debug.h> |
65 | #include <sysdev/fsl_pci.h> | ||
65 | 66 | ||
66 | #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) | 67 | #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) |
67 | int (*__debugger)(struct pt_regs *regs) __read_mostly; | 68 | int (*__debugger)(struct pt_regs *regs) __read_mostly; |
@@ -567,6 +568,8 @@ int machine_check_e500(struct pt_regs *regs) | |||
567 | if (reason & MCSR_BUS_RBERR) { | 568 | if (reason & MCSR_BUS_RBERR) { |
568 | if (fsl_rio_mcheck_exception(regs)) | 569 | if (fsl_rio_mcheck_exception(regs)) |
569 | return 1; | 570 | return 1; |
571 | if (fsl_pci_mcheck_exception(regs)) | ||
572 | return 1; | ||
570 | } | 573 | } |
571 | 574 | ||
572 | printk("Machine check in kernel mode.\n"); | 575 | printk("Machine check in kernel mode.\n"); |