diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/Makefile | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/asm-offsets.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 22 | ||||
-rw-r--r-- | arch/powerpc/kernel/crash_dump.c | 33 | ||||
-rw-r--r-- | arch/powerpc/kernel/entry_32.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/exceptions-64s.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/fpu.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_40x.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_44x.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_8xx.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_fsl_booke.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc.S | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc_32.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc_64.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/ppc_ksyms.c | 7 | ||||
-rw-r--r-- | arch/powerpc/kernel/ppc_save_regs.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/smp.c | 19 | ||||
-rw-r--r-- | arch/powerpc/kernel/vector.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/vio.c | 11 |
20 files changed, 96 insertions, 23 deletions
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 36c30f31ec93..3bb2a3e6a337 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -29,8 +29,10 @@ endif | |||
29 | obj-y := cputable.o ptrace.o syscalls.o \ | 29 | obj-y := cputable.o ptrace.o syscalls.o \ |
30 | irq.o align.o signal_32.o pmc.o vdso.o \ | 30 | irq.o align.o signal_32.o pmc.o vdso.o \ |
31 | init_task.o process.o systbl.o idle.o \ | 31 | init_task.o process.o systbl.o idle.o \ |
32 | signal.o sysfs.o cacheinfo.o | 32 | signal.o sysfs.o cacheinfo.o time.o \ |
33 | obj-y += vdso32/ | 33 | prom.o traps.o setup-common.o \ |
34 | udbg.o misc.o io.o dma.o \ | ||
35 | misc_$(CONFIG_WORD_SIZE).o vdso32/ | ||
34 | obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \ | 36 | obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \ |
35 | signal_64.o ptrace32.o \ | 37 | signal_64.o ptrace32.o \ |
36 | paca.o nvram_64.o firmware.o | 38 | paca.o nvram_64.o firmware.o |
@@ -80,9 +82,6 @@ extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o | |||
80 | extra-$(CONFIG_8xx) := head_8xx.o | 82 | extra-$(CONFIG_8xx) := head_8xx.o |
81 | extra-y += vmlinux.lds | 83 | extra-y += vmlinux.lds |
82 | 84 | ||
83 | obj-y += time.o prom.o traps.o setup-common.o \ | ||
84 | udbg.o misc.o io.o dma.o \ | ||
85 | misc_$(CONFIG_WORD_SIZE).o | ||
86 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o | 85 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o |
87 | obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o | 86 | obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o |
88 | obj-$(CONFIG_KGDB) += kgdb.o | 87 | obj-$(CONFIG_KGDB) += kgdb.o |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index bd0df2e6aa8f..23e6a93145ab 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -209,7 +209,6 @@ int main(void) | |||
209 | DEFINE(RTASENTRY, offsetof(struct rtas_t, entry)); | 209 | DEFINE(RTASENTRY, offsetof(struct rtas_t, entry)); |
210 | 210 | ||
211 | /* Interrupt register frame */ | 211 | /* Interrupt register frame */ |
212 | DEFINE(STACK_FRAME_OVERHEAD, STACK_FRAME_OVERHEAD); | ||
213 | DEFINE(INT_FRAME_SIZE, STACK_INT_FRAME_SIZE); | 212 | DEFINE(INT_FRAME_SIZE, STACK_INT_FRAME_SIZE); |
214 | DEFINE(SWITCH_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs)); | 213 | DEFINE(SWITCH_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs)); |
215 | #ifdef CONFIG_PPC64 | 214 | #ifdef CONFIG_PPC64 |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 96a908f1cd87..be5ab18b03b5 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -457,16 +457,26 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
457 | .dcache_bsize = 128, | 457 | .dcache_bsize = 128, |
458 | .num_pmcs = 6, | 458 | .num_pmcs = 6, |
459 | .pmc_type = PPC_PMC_IBM, | 459 | .pmc_type = PPC_PMC_IBM, |
460 | .cpu_setup = __setup_cpu_power7, | ||
461 | .cpu_restore = __restore_cpu_power7, | ||
462 | .oprofile_cpu_type = "ppc64/power7", | 460 | .oprofile_cpu_type = "ppc64/power7", |
463 | .oprofile_type = PPC_OPROFILE_POWER4, | 461 | .oprofile_type = PPC_OPROFILE_POWER4, |
464 | .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, | ||
465 | .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, | ||
466 | .oprofile_mmcra_clear = POWER6_MMCRA_THRM | | ||
467 | POWER6_MMCRA_OTHER, | ||
468 | .platform = "power7", | 462 | .platform = "power7", |
469 | }, | 463 | }, |
464 | { /* Power7+ */ | ||
465 | .pvr_mask = 0xffff0000, | ||
466 | .pvr_value = 0x004A0000, | ||
467 | .cpu_name = "POWER7+ (raw)", | ||
468 | .cpu_features = CPU_FTRS_POWER7, | ||
469 | .cpu_user_features = COMMON_USER_POWER7, | ||
470 | .mmu_features = MMU_FTR_HPTE_TABLE | | ||
471 | MMU_FTR_TLBIE_206, | ||
472 | .icache_bsize = 128, | ||
473 | .dcache_bsize = 128, | ||
474 | .num_pmcs = 6, | ||
475 | .pmc_type = PPC_PMC_IBM, | ||
476 | .oprofile_cpu_type = "ppc64/power7", | ||
477 | .oprofile_type = PPC_OPROFILE_POWER4, | ||
478 | .platform = "power7+", | ||
479 | }, | ||
470 | { /* Cell Broadband Engine */ | 480 | { /* Cell Broadband Engine */ |
471 | .pvr_mask = 0xffff0000, | 481 | .pvr_mask = 0xffff0000, |
472 | .pvr_value = 0x00700000, | 482 | .pvr_value = 0x00700000, |
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index 8e05c16344e4..0a2af50243cb 100644 --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/prom.h> | 19 | #include <asm/prom.h> |
20 | #include <asm/firmware.h> | 20 | #include <asm/firmware.h> |
21 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
22 | #include <asm/rtas.h> | ||
22 | 23 | ||
23 | #ifdef DEBUG | 24 | #ifdef DEBUG |
24 | #include <asm/udbg.h> | 25 | #include <asm/udbg.h> |
@@ -141,3 +142,35 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, | |||
141 | 142 | ||
142 | return csize; | 143 | return csize; |
143 | } | 144 | } |
145 | |||
146 | #ifdef CONFIG_PPC_RTAS | ||
147 | /* | ||
148 | * The crashkernel region will almost always overlap the RTAS region, so | ||
149 | * we have to be careful when shrinking the crashkernel region. | ||
150 | */ | ||
151 | void crash_free_reserved_phys_range(unsigned long begin, unsigned long end) | ||
152 | { | ||
153 | unsigned long addr; | ||
154 | const u32 *basep, *sizep; | ||
155 | unsigned int rtas_start = 0, rtas_end = 0; | ||
156 | |||
157 | basep = of_get_property(rtas.dev, "linux,rtas-base", NULL); | ||
158 | sizep = of_get_property(rtas.dev, "rtas-size", NULL); | ||
159 | |||
160 | if (basep && sizep) { | ||
161 | rtas_start = *basep; | ||
162 | rtas_end = *basep + *sizep; | ||
163 | } | ||
164 | |||
165 | for (addr = begin; addr < end; addr += PAGE_SIZE) { | ||
166 | /* Does this page overlap with the RTAS region? */ | ||
167 | if (addr <= rtas_end && ((addr + PAGE_SIZE) > rtas_start)) | ||
168 | continue; | ||
169 | |||
170 | ClearPageReserved(pfn_to_page(addr >> PAGE_SHIFT)); | ||
171 | init_page_count(pfn_to_page(addr >> PAGE_SHIFT)); | ||
172 | free_page((unsigned long)__va(addr)); | ||
173 | totalram_pages++; | ||
174 | } | ||
175 | } | ||
176 | #endif | ||
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index ed4aeb96398b..c22dc1ec1c94 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/asm-offsets.h> | 31 | #include <asm/asm-offsets.h> |
32 | #include <asm/unistd.h> | 32 | #include <asm/unistd.h> |
33 | #include <asm/ftrace.h> | 33 | #include <asm/ftrace.h> |
34 | #include <asm/ptrace.h> | ||
34 | 35 | ||
35 | #undef SHOW_SYSCALLS | 36 | #undef SHOW_SYSCALLS |
36 | #undef SHOW_SYSCALLS_TASK | 37 | #undef SHOW_SYSCALLS_TASK |
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 9f8b01d6466f..8a817995b4cd 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <asm/exception-64s.h> | 15 | #include <asm/exception-64s.h> |
16 | #include <asm/ptrace.h> | ||
16 | 17 | ||
17 | /* | 18 | /* |
18 | * We layout physical memory as follows: | 19 | * We layout physical memory as follows: |
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S index e86c040ae585..de369558bf0a 100644 --- a/arch/powerpc/kernel/fpu.S +++ b/arch/powerpc/kernel/fpu.S | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/thread_info.h> | 23 | #include <asm/thread_info.h> |
24 | #include <asm/ppc_asm.h> | 24 | #include <asm/ppc_asm.h> |
25 | #include <asm/asm-offsets.h> | 25 | #include <asm/asm-offsets.h> |
26 | #include <asm/ptrace.h> | ||
26 | 27 | ||
27 | #ifdef CONFIG_VSX | 28 | #ifdef CONFIG_VSX |
28 | #define REST_32FPVSRS(n,c,base) \ | 29 | #define REST_32FPVSRS(n,c,base) \ |
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index 8278e8bad5a0..9dd21a8c4d52 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <asm/thread_info.h> | 40 | #include <asm/thread_info.h> |
41 | #include <asm/ppc_asm.h> | 41 | #include <asm/ppc_asm.h> |
42 | #include <asm/asm-offsets.h> | 42 | #include <asm/asm-offsets.h> |
43 | #include <asm/ptrace.h> | ||
43 | 44 | ||
44 | /* As with the other PowerPC ports, it is expected that when code | 45 | /* As with the other PowerPC ports, it is expected that when code |
45 | * execution begins here, the following registers contain valid, yet | 46 | * execution begins here, the following registers contain valid, yet |
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index 562305b40a8e..cbb3436b592d 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/thread_info.h> | 37 | #include <asm/thread_info.h> |
38 | #include <asm/ppc_asm.h> | 38 | #include <asm/ppc_asm.h> |
39 | #include <asm/asm-offsets.h> | 39 | #include <asm/asm-offsets.h> |
40 | #include <asm/ptrace.h> | ||
40 | #include <asm/synch.h> | 41 | #include <asm/synch.h> |
41 | #include "head_booke.h" | 42 | #include "head_booke.h" |
42 | 43 | ||
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index f0dd577e4a5b..ce41b97eb512 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/page_64.h> | 38 | #include <asm/page_64.h> |
39 | #include <asm/irqflags.h> | 39 | #include <asm/irqflags.h> |
40 | #include <asm/kvm_book3s_asm.h> | 40 | #include <asm/kvm_book3s_asm.h> |
41 | #include <asm/ptrace.h> | ||
41 | 42 | ||
42 | /* The physical memory is layed out such that the secondary processor | 43 | /* The physical memory is layed out such that the secondary processor |
43 | * spin code sits at 0x0000...0x00ff. On server, the vectors follow | 44 | * spin code sits at 0x0000...0x00ff. On server, the vectors follow |
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 1f1a04b5c2a4..1cbf64e6b416 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/thread_info.h> | 29 | #include <asm/thread_info.h> |
30 | #include <asm/ppc_asm.h> | 30 | #include <asm/ppc_asm.h> |
31 | #include <asm/asm-offsets.h> | 31 | #include <asm/asm-offsets.h> |
32 | #include <asm/ptrace.h> | ||
32 | 33 | ||
33 | /* Macro to make the code more readable. */ | 34 | /* Macro to make the code more readable. */ |
34 | #ifdef CONFIG_8xx_CPU6 | 35 | #ifdef CONFIG_8xx_CPU6 |
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 529b817f473b..3e02710d9562 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <asm/ppc_asm.h> | 41 | #include <asm/ppc_asm.h> |
42 | #include <asm/asm-offsets.h> | 42 | #include <asm/asm-offsets.h> |
43 | #include <asm/cache.h> | 43 | #include <asm/cache.h> |
44 | #include <asm/ptrace.h> | ||
44 | #include "head_booke.h" | 45 | #include "head_booke.h" |
45 | 46 | ||
46 | /* As with the other PowerPC ports, it is expected that when code | 47 | /* As with the other PowerPC ports, it is expected that when code |
diff --git a/arch/powerpc/kernel/misc.S b/arch/powerpc/kernel/misc.S index 2d29752cbe16..b69463ec2010 100644 --- a/arch/powerpc/kernel/misc.S +++ b/arch/powerpc/kernel/misc.S | |||
@@ -122,8 +122,3 @@ _GLOBAL(longjmp) | |||
122 | mtlr r0 | 122 | mtlr r0 |
123 | mr r3,r4 | 123 | mr r3,r4 |
124 | blr | 124 | blr |
125 | |||
126 | _GLOBAL(__setup_cpu_power7) | ||
127 | _GLOBAL(__restore_cpu_power7) | ||
128 | /* place holder */ | ||
129 | blr | ||
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index a7a570dcdd57..094bd9821ad4 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <asm/processor.h> | 30 | #include <asm/processor.h> |
31 | #include <asm/kexec.h> | 31 | #include <asm/kexec.h> |
32 | #include <asm/bug.h> | 32 | #include <asm/bug.h> |
33 | #include <asm/ptrace.h> | ||
33 | 34 | ||
34 | .text | 35 | .text |
35 | 36 | ||
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index e5144906a56d..206a321a71d3 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <asm/cputable.h> | 25 | #include <asm/cputable.h> |
26 | #include <asm/thread_info.h> | 26 | #include <asm/thread_info.h> |
27 | #include <asm/kexec.h> | 27 | #include <asm/kexec.h> |
28 | #include <asm/ptrace.h> | ||
28 | 29 | ||
29 | .text | 30 | .text |
30 | 31 | ||
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index ab3e392ac63c..ef3ef566235e 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -186,3 +186,10 @@ EXPORT_SYMBOL(__mtdcr); | |||
186 | EXPORT_SYMBOL(__mfdcr); | 186 | EXPORT_SYMBOL(__mfdcr); |
187 | #endif | 187 | #endif |
188 | EXPORT_SYMBOL(empty_zero_page); | 188 | EXPORT_SYMBOL(empty_zero_page); |
189 | |||
190 | #ifdef CONFIG_PPC64 | ||
191 | EXPORT_SYMBOL(__arch_hweight8); | ||
192 | EXPORT_SYMBOL(__arch_hweight16); | ||
193 | EXPORT_SYMBOL(__arch_hweight32); | ||
194 | EXPORT_SYMBOL(__arch_hweight64); | ||
195 | #endif | ||
diff --git a/arch/powerpc/kernel/ppc_save_regs.S b/arch/powerpc/kernel/ppc_save_regs.S index 5113bd2285e1..e83ba3f078e4 100644 --- a/arch/powerpc/kernel/ppc_save_regs.S +++ b/arch/powerpc/kernel/ppc_save_regs.S | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <asm/processor.h> | 11 | #include <asm/processor.h> |
12 | #include <asm/ppc_asm.h> | 12 | #include <asm/ppc_asm.h> |
13 | #include <asm/asm-offsets.h> | 13 | #include <asm/asm-offsets.h> |
14 | #include <asm/ptrace.h> | ||
14 | 15 | ||
15 | /* | 16 | /* |
16 | * Grab the register values as they are now. | 17 | * Grab the register values as they are now. |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 68034bbf2e4f..981360509172 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -466,7 +466,20 @@ out: | |||
466 | return id; | 466 | return id; |
467 | } | 467 | } |
468 | 468 | ||
469 | /* Must be called when no change can occur to cpu_present_mask, | 469 | /* Helper routines for cpu to core mapping */ |
470 | int cpu_core_index_of_thread(int cpu) | ||
471 | { | ||
472 | return cpu >> threads_shift; | ||
473 | } | ||
474 | EXPORT_SYMBOL_GPL(cpu_core_index_of_thread); | ||
475 | |||
476 | int cpu_first_thread_of_core(int core) | ||
477 | { | ||
478 | return core << threads_shift; | ||
479 | } | ||
480 | EXPORT_SYMBOL_GPL(cpu_first_thread_of_core); | ||
481 | |||
482 | /* Must be called when no change can occur to cpu_present_map, | ||
470 | * i.e. during cpu online or offline. | 483 | * i.e. during cpu online or offline. |
471 | */ | 484 | */ |
472 | static struct device_node *cpu_to_l2cache(int cpu) | 485 | static struct device_node *cpu_to_l2cache(int cpu) |
@@ -514,7 +527,7 @@ int __devinit start_secondary(void *unused) | |||
514 | notify_cpu_starting(cpu); | 527 | notify_cpu_starting(cpu); |
515 | set_cpu_online(cpu, true); | 528 | set_cpu_online(cpu, true); |
516 | /* Update sibling maps */ | 529 | /* Update sibling maps */ |
517 | base = cpu_first_thread_in_core(cpu); | 530 | base = cpu_first_thread_sibling(cpu); |
518 | for (i = 0; i < threads_per_core; i++) { | 531 | for (i = 0; i < threads_per_core; i++) { |
519 | if (cpu_is_offline(base + i)) | 532 | if (cpu_is_offline(base + i)) |
520 | continue; | 533 | continue; |
@@ -600,7 +613,7 @@ int __cpu_disable(void) | |||
600 | return err; | 613 | return err; |
601 | 614 | ||
602 | /* Update sibling maps */ | 615 | /* Update sibling maps */ |
603 | base = cpu_first_thread_in_core(cpu); | 616 | base = cpu_first_thread_sibling(cpu); |
604 | for (i = 0; i < threads_per_core; i++) { | 617 | for (i = 0; i < threads_per_core; i++) { |
605 | cpumask_clear_cpu(cpu, cpu_sibling_mask(base + i)); | 618 | cpumask_clear_cpu(cpu, cpu_sibling_mask(base + i)); |
606 | cpumask_clear_cpu(base + i, cpu_sibling_mask(cpu)); | 619 | cpumask_clear_cpu(base + i, cpu_sibling_mask(cpu)); |
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S index fe460482fa68..9de6f396cf85 100644 --- a/arch/powerpc/kernel/vector.S +++ b/arch/powerpc/kernel/vector.S | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <asm/cputable.h> | 5 | #include <asm/cputable.h> |
6 | #include <asm/thread_info.h> | 6 | #include <asm/thread_info.h> |
7 | #include <asm/page.h> | 7 | #include <asm/page.h> |
8 | #include <asm/ptrace.h> | ||
8 | 9 | ||
9 | /* | 10 | /* |
10 | * load_up_altivec(unused, unused, tsk) | 11 | * load_up_altivec(unused, unused, tsk) |
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 441d2a722f06..b2654058f2e4 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -600,6 +600,11 @@ static void vio_dma_iommu_unmap_sg(struct device *dev, | |||
600 | vio_cmo_dealloc(viodev, alloc_size); | 600 | vio_cmo_dealloc(viodev, alloc_size); |
601 | } | 601 | } |
602 | 602 | ||
603 | static int vio_dma_iommu_dma_supported(struct device *dev, u64 mask) | ||
604 | { | ||
605 | return dma_iommu_ops.dma_supported(dev, mask); | ||
606 | } | ||
607 | |||
603 | struct dma_map_ops vio_dma_mapping_ops = { | 608 | struct dma_map_ops vio_dma_mapping_ops = { |
604 | .alloc_coherent = vio_dma_iommu_alloc_coherent, | 609 | .alloc_coherent = vio_dma_iommu_alloc_coherent, |
605 | .free_coherent = vio_dma_iommu_free_coherent, | 610 | .free_coherent = vio_dma_iommu_free_coherent, |
@@ -607,6 +612,7 @@ struct dma_map_ops vio_dma_mapping_ops = { | |||
607 | .unmap_sg = vio_dma_iommu_unmap_sg, | 612 | .unmap_sg = vio_dma_iommu_unmap_sg, |
608 | .map_page = vio_dma_iommu_map_page, | 613 | .map_page = vio_dma_iommu_map_page, |
609 | .unmap_page = vio_dma_iommu_unmap_page, | 614 | .unmap_page = vio_dma_iommu_unmap_page, |
615 | .dma_supported = vio_dma_iommu_dma_supported, | ||
610 | 616 | ||
611 | }; | 617 | }; |
612 | 618 | ||
@@ -858,8 +864,7 @@ static void vio_cmo_bus_remove(struct vio_dev *viodev) | |||
858 | 864 | ||
859 | static void vio_cmo_set_dma_ops(struct vio_dev *viodev) | 865 | static void vio_cmo_set_dma_ops(struct vio_dev *viodev) |
860 | { | 866 | { |
861 | vio_dma_mapping_ops.dma_supported = dma_iommu_ops.dma_supported; | 867 | set_dma_ops(&viodev->dev, &vio_dma_mapping_ops); |
862 | viodev->dev.archdata.dma_ops = &vio_dma_mapping_ops; | ||
863 | } | 868 | } |
864 | 869 | ||
865 | /** | 870 | /** |
@@ -1244,7 +1249,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) | |||
1244 | if (firmware_has_feature(FW_FEATURE_CMO)) | 1249 | if (firmware_has_feature(FW_FEATURE_CMO)) |
1245 | vio_cmo_set_dma_ops(viodev); | 1250 | vio_cmo_set_dma_ops(viodev); |
1246 | else | 1251 | else |
1247 | viodev->dev.archdata.dma_ops = &dma_iommu_ops; | 1252 | set_dma_ops(&viodev->dev, &dma_iommu_ops); |
1248 | set_iommu_table_base(&viodev->dev, vio_build_iommu_table(viodev)); | 1253 | set_iommu_table_base(&viodev->dev, vio_build_iommu_table(viodev)); |
1249 | set_dev_node(&viodev->dev, of_node_to_nid(of_node)); | 1254 | set_dev_node(&viodev->dev, of_node_to_nid(of_node)); |
1250 | 1255 | ||