Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60519
b: refs/heads/master
c: abd0650
h: refs/heads/master
i:
  60517: 5e3e1b1
  60515: 2655681
  60511: 4ce3fe4
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Jun 14, 2007
1 parent 17db5b0 commit add8f65
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 95 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 912000e73ee8fcb97831b123c9c3a7274b71cab7
refs/heads/master: abd0650541604d6c028bcbf5002e4a68aaf56e90
35 changes: 0 additions & 35 deletions trunk/arch/powerpc/kernel/ptrace-ppc32.h

This file was deleted.

51 changes: 0 additions & 51 deletions trunk/arch/powerpc/kernel/ptrace-ppc64.h

This file was deleted.

45 changes: 39 additions & 6 deletions trunk/arch/powerpc/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,28 @@
#include <asm/pgtable.h>
#include <asm/system.h>

#ifdef CONFIG_PPC64
#include "ptrace-ppc64.h"
/*
* does not yet catch signals sent when the child dies.
* in exit.c or in signal.c.
*/

/*
* Set of msr bits that gdb can change on behalf of a process.
*/
#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
#define MSR_DEBUGCHANGE 0
#else
#include "ptrace-ppc32.h"
#define MSR_DEBUGCHANGE (MSR_SE | MSR_BE)
#endif

/*
* does not yet catch signals sent when the child dies.
* in exit.c or in signal.c.
* Max register writeable via put_reg
*/
#ifdef CONFIG_PPC32
#define PT_MAX_PUT_REG PT_MQ
#else
#define PT_MAX_PUT_REG PT_CCR
#endif

/*
* Get contents of register REGNO in task TASK.
Expand All @@ -58,7 +70,7 @@ unsigned long ptrace_get_reg(struct task_struct *task, int regno)

if (regno == PT_MSR) {
tmp = ((unsigned long *)task->thread.regs)[PT_MSR];
return PT_MUNGE_MSR(tmp, task);
return tmp | task->thread.fpexc_mode;
}

if (regno < (sizeof(struct pt_regs) / sizeof(unsigned long)))
Expand Down Expand Up @@ -274,6 +286,27 @@ static void clear_single_step(struct task_struct *task)
clear_tsk_thread_flag(task, TIF_SINGLESTEP);
}

#ifdef CONFIG_PPC64
static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
unsigned long data)
{
/* We only support one DABR and no IABRS at the moment */
if (addr > 0)
return -EINVAL;

/* The bottom 3 bits are flags */
if ((data & ~0x7UL) >= TASK_SIZE)
return -EIO;

/* Ensure translation is on */
if (data && !(data & DABR_TRANSLATION))
return -EIO;

task->thread.dabr = data;
return 0;
}
#endif

/*
* Called by kernel/ptrace.c when detaching..
*
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/powerpc/kernel/ptrace32.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
#include <asm/pgtable.h>
#include <asm/system.h>

#include "ptrace-ppc64.h"

/*
* does not yet catch signals sent when the child dies.
* in exit.c or in signal.c.
Expand Down

0 comments on commit add8f65

Please sign in to comment.