diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-04-08 04:35:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-08 04:35:30 -0400 |
commit | 5ea472a77f8e4811ceee3f44a9deda6ad6e8b789 (patch) | |
tree | a9ec5019e2b666a19874fc344ffb0dd5da6bce94 /arch/powerpc/kernel | |
parent | 6c009ecef8cca28c7c09eb16d0802e37915a76e1 (diff) | |
parent | 577c9c456f0e1371cbade38eaf91ae8e8a308555 (diff) |
Merge commit 'v2.6.30-rc1' into perfcounters/core
Conflicts:
arch/powerpc/include/asm/systbl.h
arch/powerpc/include/asm/unistd.h
include/linux/init_task.h
Merge reason: the conflicts are non-trivial: PowerPC placement
of sys_perf_counter_open has to be mixed with the
new preadv/pwrite syscalls.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/dma.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/fpu.S | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/ftrace.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/irq.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 16 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc_64.S | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/of_platform.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 18 | ||||
-rw-r--r-- | arch/powerpc/kernel/ptrace32.c | 15 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 1 |
10 files changed, 57 insertions, 18 deletions
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 1c5c8a6fc129..53c7788cba78 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c | |||
@@ -94,7 +94,7 @@ static int dma_direct_dma_supported(struct device *dev, u64 mask) | |||
94 | * done via some global so platforms can set the limit in case | 94 | * done via some global so platforms can set the limit in case |
95 | * they have limited DMA windows | 95 | * they have limited DMA windows |
96 | */ | 96 | */ |
97 | return mask >= DMA_32BIT_MASK; | 97 | return mask >= DMA_BIT_MASK(32); |
98 | #else | 98 | #else |
99 | return 1; | 99 | return 1; |
100 | #endif | 100 | #endif |
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S index a088c064ae40..2436df33c6f4 100644 --- a/arch/powerpc/kernel/fpu.S +++ b/arch/powerpc/kernel/fpu.S | |||
@@ -145,6 +145,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX) | |||
145 | beq 1f | 145 | beq 1f |
146 | PPC_LL r4,_MSR-STACK_FRAME_OVERHEAD(r5) | 146 | PPC_LL r4,_MSR-STACK_FRAME_OVERHEAD(r5) |
147 | li r3,MSR_FP|MSR_FE0|MSR_FE1 | 147 | li r3,MSR_FP|MSR_FE0|MSR_FE1 |
148 | #ifdef CONFIG_VSX | ||
149 | BEGIN_FTR_SECTION | ||
150 | oris r3,r3,MSR_VSX@h | ||
151 | END_FTR_SECTION_IFSET(CPU_FTR_VSX) | ||
152 | #endif | ||
148 | andc r4,r4,r3 /* disable FP for previous task */ | 153 | andc r4,r4,r3 /* disable FP for previous task */ |
149 | PPC_STL r4,_MSR-STACK_FRAME_OVERHEAD(r5) | 154 | PPC_STL r4,_MSR-STACK_FRAME_OVERHEAD(r5) |
150 | 1: | 155 | 1: |
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 5455943f16aa..70e2a736be1f 100644 --- a/arch/powerpc/kernel/ftrace.c +++ b/arch/powerpc/kernel/ftrace.c | |||
@@ -293,7 +293,7 @@ __ftrace_make_nop(struct module *mod, | |||
293 | if (tramp & 0x8000) | 293 | if (tramp & 0x8000) |
294 | tramp -= 0x10000; | 294 | tramp -= 0x10000; |
295 | 295 | ||
296 | pr_debug(" %x ", tramp); | 296 | pr_debug(" %lx ", tramp); |
297 | 297 | ||
298 | if (tramp != addr) { | 298 | if (tramp != addr) { |
299 | printk(KERN_ERR | 299 | printk(KERN_ERR |
@@ -564,7 +564,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) | |||
564 | if (unlikely(atomic_read(¤t->tracing_graph_pause))) | 564 | if (unlikely(atomic_read(¤t->tracing_graph_pause))) |
565 | return; | 565 | return; |
566 | 566 | ||
567 | #if CONFIG_PPC64 | 567 | #ifdef CONFIG_PPC64 |
568 | /* non core kernel code needs to save and restore the TOC */ | 568 | /* non core kernel code needs to save and restore the TOC */ |
569 | if (REGION_ID(self_addr) != KERNEL_REGION_ID) | 569 | if (REGION_ID(self_addr) != KERNEL_REGION_ID) |
570 | return_hooker = (unsigned long)&mod_return_to_handler; | 570 | return_hooker = (unsigned long)&mod_return_to_handler; |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 2cd471f92fe6..feff792ed0f9 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -677,11 +677,13 @@ unsigned int irq_create_mapping(struct irq_host *host, | |||
677 | return NO_IRQ; | 677 | return NO_IRQ; |
678 | } | 678 | } |
679 | } | 679 | } |
680 | pr_debug("irq: -> obtained virq %d\n", virq); | ||
681 | 680 | ||
682 | if (irq_setup_virq(host, virq, hwirq)) | 681 | if (irq_setup_virq(host, virq, hwirq)) |
683 | return NO_IRQ; | 682 | return NO_IRQ; |
684 | 683 | ||
684 | printk(KERN_DEBUG "irq: irq %lu on host %s mapped to virtual irq %u\n", | ||
685 | hwirq, host->of_node ? host->of_node->full_name : "null", virq); | ||
686 | |||
685 | return virq; | 687 | return virq; |
686 | } | 688 | } |
687 | EXPORT_SYMBOL_GPL(irq_create_mapping); | 689 | EXPORT_SYMBOL_GPL(irq_create_mapping); |
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 182e0f642f36..78b3f7840ade 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -434,6 +434,21 @@ static void pseries_cmo_data(struct seq_file *m) | |||
434 | seq_printf(m, "cmo_page_size=%lu\n", cmo_get_page_size()); | 434 | seq_printf(m, "cmo_page_size=%lu\n", cmo_get_page_size()); |
435 | } | 435 | } |
436 | 436 | ||
437 | static void splpar_dispatch_data(struct seq_file *m) | ||
438 | { | ||
439 | int cpu; | ||
440 | unsigned long dispatches = 0; | ||
441 | unsigned long dispatch_dispersions = 0; | ||
442 | |||
443 | for_each_possible_cpu(cpu) { | ||
444 | dispatches += lppaca[cpu].yield_count; | ||
445 | dispatch_dispersions += lppaca[cpu].dispersion_count; | ||
446 | } | ||
447 | |||
448 | seq_printf(m, "dispatches=%lu\n", dispatches); | ||
449 | seq_printf(m, "dispatch_dispersions=%lu\n", dispatch_dispersions); | ||
450 | } | ||
451 | |||
437 | static int pseries_lparcfg_data(struct seq_file *m, void *v) | 452 | static int pseries_lparcfg_data(struct seq_file *m, void *v) |
438 | { | 453 | { |
439 | int partition_potential_processors; | 454 | int partition_potential_processors; |
@@ -460,6 +475,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) | |||
460 | parse_ppp_data(m); | 475 | parse_ppp_data(m); |
461 | parse_mpp_data(m); | 476 | parse_mpp_data(m); |
462 | pseries_cmo_data(m); | 477 | pseries_cmo_data(m); |
478 | splpar_dispatch_data(m); | ||
463 | 479 | ||
464 | seq_printf(m, "purr=%ld\n", get_purr()); | 480 | seq_printf(m, "purr=%ld\n", get_purr()); |
465 | } else { /* non SPLPAR case */ | 481 | } else { /* non SPLPAR case */ |
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index 3053fe5c62f2..b9530b2395a2 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
@@ -495,7 +495,15 @@ _GLOBAL(giveup_altivec) | |||
495 | stvx vr0,r4,r3 | 495 | stvx vr0,r4,r3 |
496 | beq 1f | 496 | beq 1f |
497 | ld r4,_MSR-STACK_FRAME_OVERHEAD(r5) | 497 | ld r4,_MSR-STACK_FRAME_OVERHEAD(r5) |
498 | #ifdef CONFIG_VSX | ||
499 | BEGIN_FTR_SECTION | ||
500 | lis r3,(MSR_VEC|MSR_VSX)@h | ||
501 | FTR_SECTION_ELSE | ||
502 | lis r3,MSR_VEC@h | ||
503 | ALT_FTR_SECTION_END_IFSET(CPU_FTR_VSX) | ||
504 | #else | ||
498 | lis r3,MSR_VEC@h | 505 | lis r3,MSR_VEC@h |
506 | #endif | ||
499 | andc r4,r4,r3 /* disable FP for previous task */ | 507 | andc r4,r4,r3 /* disable FP for previous task */ |
500 | std r4,_MSR-STACK_FRAME_OVERHEAD(r5) | 508 | std r4,_MSR-STACK_FRAME_OVERHEAD(r5) |
501 | 1: | 509 | 1: |
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index 3f37a6e62771..87df428e3588 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -76,7 +76,7 @@ struct of_device* of_platform_device_create(struct device_node *np, | |||
76 | return NULL; | 76 | return NULL; |
77 | 77 | ||
78 | dev->dma_mask = 0xffffffffUL; | 78 | dev->dma_mask = 0xffffffffUL; |
79 | dev->dev.coherent_dma_mask = DMA_32BIT_MASK; | 79 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); |
80 | 80 | ||
81 | dev->dev.bus = &of_platform_bus_type; | 81 | dev->dev.bus = &of_platform_bus_type; |
82 | 82 | ||
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 2e026c0407d4..2f0e64b53642 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -614,7 +614,7 @@ static unsigned char ibm_architecture_vec[] = { | |||
614 | W(0xffffffff), /* virt_base */ | 614 | W(0xffffffff), /* virt_base */ |
615 | W(0xffffffff), /* virt_size */ | 615 | W(0xffffffff), /* virt_size */ |
616 | W(0xffffffff), /* load_base */ | 616 | W(0xffffffff), /* load_base */ |
617 | W(64), /* 128MB min RMA */ | 617 | W(64), /* 64MB min RMA */ |
618 | W(0xffffffff), /* full client load */ | 618 | W(0xffffffff), /* full client load */ |
619 | 0, /* min RMA percentage of total RAM */ | 619 | 0, /* min RMA percentage of total RAM */ |
620 | 48, /* max log_2(hash table size) */ | 620 | 48, /* max log_2(hash table size) */ |
@@ -732,15 +732,17 @@ static void __init prom_send_capabilities(void) | |||
732 | root = call_prom("open", 1, 1, ADDR("/")); | 732 | root = call_prom("open", 1, 1, ADDR("/")); |
733 | if (root != 0) { | 733 | if (root != 0) { |
734 | /* try calling the ibm,client-architecture-support method */ | 734 | /* try calling the ibm,client-architecture-support method */ |
735 | prom_printf("Calling ibm,client-architecture..."); | ||
735 | if (call_prom_ret("call-method", 3, 2, &ret, | 736 | if (call_prom_ret("call-method", 3, 2, &ret, |
736 | ADDR("ibm,client-architecture-support"), | 737 | ADDR("ibm,client-architecture-support"), |
737 | root, | 738 | root, |
738 | ADDR(ibm_architecture_vec)) == 0) { | 739 | ADDR(ibm_architecture_vec)) == 0) { |
739 | /* the call exists... */ | 740 | /* the call exists... */ |
740 | if (ret) | 741 | if (ret) |
741 | prom_printf("WARNING: ibm,client-architecture" | 742 | prom_printf("\nWARNING: ibm,client-architecture" |
742 | "-support call FAILED!\n"); | 743 | "-support call FAILED!\n"); |
743 | call_prom("close", 1, 0, root); | 744 | call_prom("close", 1, 0, root); |
745 | prom_printf(" done\n"); | ||
744 | return; | 746 | return; |
745 | } | 747 | } |
746 | call_prom("close", 1, 0, root); | 748 | call_prom("close", 1, 0, root); |
@@ -1083,7 +1085,7 @@ static void __init prom_instantiate_rtas(void) | |||
1083 | return; | 1085 | return; |
1084 | } | 1086 | } |
1085 | 1087 | ||
1086 | prom_printf("instantiating rtas at 0x%x ...", base); | 1088 | prom_printf("instantiating rtas at 0x%x...", base); |
1087 | 1089 | ||
1088 | if (call_prom_ret("call-method", 3, 2, &entry, | 1090 | if (call_prom_ret("call-method", 3, 2, &entry, |
1089 | ADDR("instantiate-rtas"), | 1091 | ADDR("instantiate-rtas"), |
@@ -1495,7 +1497,7 @@ static int __init prom_find_machine_type(void) | |||
1495 | return PLATFORM_GENERIC; | 1497 | return PLATFORM_GENERIC; |
1496 | x = prom_getproplen(rtas, "ibm,hypertas-functions"); | 1498 | x = prom_getproplen(rtas, "ibm,hypertas-functions"); |
1497 | if (x != PROM_ERROR) { | 1499 | if (x != PROM_ERROR) { |
1498 | prom_printf("Hypertas detected, assuming LPAR !\n"); | 1500 | prom_debug("Hypertas detected, assuming LPAR !\n"); |
1499 | return PLATFORM_PSERIES_LPAR; | 1501 | return PLATFORM_PSERIES_LPAR; |
1500 | } | 1502 | } |
1501 | return PLATFORM_PSERIES; | 1503 | return PLATFORM_PSERIES; |
@@ -1544,7 +1546,7 @@ static void __init prom_check_displays(void) | |||
1544 | }; | 1546 | }; |
1545 | const unsigned char *clut; | 1547 | const unsigned char *clut; |
1546 | 1548 | ||
1547 | prom_printf("Looking for displays\n"); | 1549 | prom_debug("Looking for displays\n"); |
1548 | for (node = 0; prom_next_node(&node); ) { | 1550 | for (node = 0; prom_next_node(&node); ) { |
1549 | memset(type, 0, sizeof(type)); | 1551 | memset(type, 0, sizeof(type)); |
1550 | prom_getprop(node, "device_type", type, sizeof(type)); | 1552 | prom_getprop(node, "device_type", type, sizeof(type)); |
@@ -1562,7 +1564,7 @@ static void __init prom_check_displays(void) | |||
1562 | if (call_prom("package-to-path", 3, 1, node, path, | 1564 | if (call_prom("package-to-path", 3, 1, node, path, |
1563 | PROM_SCRATCH_SIZE-10) == PROM_ERROR) | 1565 | PROM_SCRATCH_SIZE-10) == PROM_ERROR) |
1564 | continue; | 1566 | continue; |
1565 | prom_printf("found display : %s, opening ... ", path); | 1567 | prom_printf("found display : %s, opening... ", path); |
1566 | 1568 | ||
1567 | ih = call_prom("open", 1, 1, path); | 1569 | ih = call_prom("open", 1, 1, path); |
1568 | if (ih == 0) { | 1570 | if (ih == 0) { |
@@ -2387,7 +2389,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2387 | /* | 2389 | /* |
2388 | * Now finally create the flattened device-tree | 2390 | * Now finally create the flattened device-tree |
2389 | */ | 2391 | */ |
2390 | prom_printf("copying OF device tree ...\n"); | 2392 | prom_printf("copying OF device tree...\n"); |
2391 | flatten_device_tree(); | 2393 | flatten_device_tree(); |
2392 | 2394 | ||
2393 | /* | 2395 | /* |
@@ -2402,7 +2404,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2402 | * Call OF "quiesce" method to shut down pending DMA's from | 2404 | * Call OF "quiesce" method to shut down pending DMA's from |
2403 | * devices etc... | 2405 | * devices etc... |
2404 | */ | 2406 | */ |
2405 | prom_printf("Calling quiesce ...\n"); | 2407 | prom_printf("Calling quiesce...\n"); |
2406 | call_prom("quiesce", 0, 0); | 2408 | call_prom("quiesce", 0, 0); |
2407 | 2409 | ||
2408 | /* | 2410 | /* |
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c index 197d49c790ad..297632cba047 100644 --- a/arch/powerpc/kernel/ptrace32.c +++ b/arch/powerpc/kernel/ptrace32.c | |||
@@ -67,7 +67,8 @@ static long compat_ptrace_old(struct task_struct *child, long request, | |||
67 | /* Macros to workout the correct index for the FPR in the thread struct */ | 67 | /* Macros to workout the correct index for the FPR in the thread struct */ |
68 | #define FPRNUMBER(i) (((i) - PT_FPR0) >> 1) | 68 | #define FPRNUMBER(i) (((i) - PT_FPR0) >> 1) |
69 | #define FPRHALF(i) (((i) - PT_FPR0) & 1) | 69 | #define FPRHALF(i) (((i) - PT_FPR0) & 1) |
70 | #define FPRINDEX(i) TS_FPRWIDTH * FPRNUMBER(i) + FPRHALF(i) | 70 | #define FPRINDEX(i) TS_FPRWIDTH * FPRNUMBER(i) * 2 + FPRHALF(i) |
71 | #define FPRINDEX_3264(i) (TS_FPRWIDTH * ((i) - PT_FPR0)) | ||
71 | 72 | ||
72 | long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | 73 | long compat_arch_ptrace(struct task_struct *child, compat_long_t request, |
73 | compat_ulong_t caddr, compat_ulong_t cdata) | 74 | compat_ulong_t caddr, compat_ulong_t cdata) |
@@ -168,8 +169,9 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
168 | CHECK_FULL_REGS(child->thread.regs); | 169 | CHECK_FULL_REGS(child->thread.regs); |
169 | if (numReg >= PT_FPR0) { | 170 | if (numReg >= PT_FPR0) { |
170 | flush_fp_to_thread(child); | 171 | flush_fp_to_thread(child); |
171 | tmp = ((unsigned long int *)child->thread.fpr) | 172 | /* get 64 bit FPR */ |
172 | [FPRINDEX(numReg)]; | 173 | tmp = ((u64 *)child->thread.fpr) |
174 | [FPRINDEX_3264(numReg)]; | ||
173 | } else { /* register within PT_REGS struct */ | 175 | } else { /* register within PT_REGS struct */ |
174 | tmp = ptrace_get_reg(child, numReg); | 176 | tmp = ptrace_get_reg(child, numReg); |
175 | } | 177 | } |
@@ -262,8 +264,13 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
262 | freg = (freg & 0xfffffffful) | (data << 32); | 264 | freg = (freg & 0xfffffffful) | (data << 32); |
263 | ret = ptrace_put_reg(child, numReg, freg); | 265 | ret = ptrace_put_reg(child, numReg, freg); |
264 | } else { | 266 | } else { |
267 | u64 *tmp; | ||
265 | flush_fp_to_thread(child); | 268 | flush_fp_to_thread(child); |
266 | ((unsigned int *)child->thread.regs)[index] = data; | 269 | /* get 64 bit FPR ... */ |
270 | tmp = &(((u64 *)child->thread.fpr) | ||
271 | [FPRINDEX_3264(numReg)]); | ||
272 | /* ... write the 32 bit part we want */ | ||
273 | ((u32 *)tmp)[index % 2] = data; | ||
267 | ret = 0; | 274 | ret = 0; |
268 | } | 275 | } |
269 | break; | 276 | break; |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 9774f9fed96e..02fed27af7f6 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/percpu.h> | 36 | #include <linux/percpu.h> |
37 | #include <linux/lmb.h> | 37 | #include <linux/lmb.h> |
38 | #include <linux/of_platform.h> | 38 | #include <linux/of_platform.h> |
39 | #include <linux/platform_device.h> | ||
40 | #include <asm/io.h> | 39 | #include <asm/io.h> |
41 | #include <asm/prom.h> | 40 | #include <asm/prom.h> |
42 | #include <asm/processor.h> | 41 | #include <asm/processor.h> |