aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-03-25 17:44:18 -0400
committerPaul Mackerras <paulus@samba.org>2008-03-25 17:44:18 -0400
commit54f53f2b94feb72622bec7a8563fc487d9f97720 (patch)
treeab0c4e1dcadd25a00fa7a4febf41bc43b864cf73 /arch/powerpc/kernel
parentf61fb8a52cdf8b9b6a6badde84aefe58cb35d315 (diff)
parenta4083c9271e0a697278e089f2c0b9a95363ada0a (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/process.c6
-rw-r--r--arch/powerpc/kernel/ptrace.c10
2 files changed, 14 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 7c8e3da23810..8d506d86e2df 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -353,6 +353,12 @@ struct task_struct *__switch_to(struct task_struct *prev,
353 account_process_vtime(current); 353 account_process_vtime(current);
354 calculate_steal_time(); 354 calculate_steal_time();
355 355
356 /*
357 * We can't take a PMU exception inside _switch() since there is a
358 * window where the kernel stack SLB and the kernel stack are out
359 * of sync. Hard disable here.
360 */
361 hard_irq_disable();
356 last = _switch(old_thread, new_thread); 362 last = _switch(old_thread, new_thread);
357 363
358 local_irq_restore(flags); 364 local_irq_restore(flags);
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 7673e9865733..2a9fe97e4521 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -530,15 +530,21 @@ static int gpr32_set(struct task_struct *target,
530 --count; 530 --count;
531 } 531 }
532 532
533 if (kbuf) 533 if (kbuf) {
534 for (; count > 0 && pos <= PT_MAX_PUT_REG; --count) 534 for (; count > 0 && pos <= PT_MAX_PUT_REG; --count)
535 regs[pos++] = *k++; 535 regs[pos++] = *k++;
536 else 536 for (; count > 0 && pos < PT_TRAP; --count, ++pos)
537 ++k;
538 } else {
537 for (; count > 0 && pos <= PT_MAX_PUT_REG; --count) { 539 for (; count > 0 && pos <= PT_MAX_PUT_REG; --count) {
538 if (__get_user(reg, u++)) 540 if (__get_user(reg, u++))
539 return -EFAULT; 541 return -EFAULT;
540 regs[pos++] = reg; 542 regs[pos++] = reg;
541 } 543 }
544 for (; count > 0 && pos < PT_TRAP; --count, ++pos)
545 if (__get_user(reg, u++))
546 return -EFAULT;
547 }
542 548
543 if (count > 0 && pos == PT_TRAP) { 549 if (count > 0 && pos == PT_TRAP) {
544 if (kbuf) 550 if (kbuf)