Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83996
b: refs/heads/master
c: 80fdf47
h: refs/heads/master
v: v3
  • Loading branch information
Roland McGrath authored and Paul Mackerras committed Feb 7, 2008
1 parent ef10d38 commit c790f0f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44dd3f50d3848e332b49e83a142b39b960ec962e
refs/heads/master: 80fdf4709497a276a826c9d8426ef1effc8f8e33
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Makefile for the linux kernel.
#

CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'

ifeq ($(CONFIG_PPC64),y)
CFLAGS_prom_init.o += -mno-minimal-toc
endif
Expand Down
52 changes: 52 additions & 0 deletions trunk/arch/powerpc/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,58 @@ static int set_evrregs(struct task_struct *task, unsigned long *data)
#endif /* CONFIG_SPE */


/*
* These are our native regset flavors.
*/
enum powerpc_regset {
REGSET_GPR,
REGSET_FPR,
#ifdef CONFIG_ALTIVEC
REGSET_VMX,
#endif
#ifdef CONFIG_SPE
REGSET_SPE,
#endif
};

static const struct user_regset native_regsets[] = {
[REGSET_GPR] = {
.core_note_type = NT_PRSTATUS, .n = ELF_NGREG,
.size = sizeof(long), .align = sizeof(long),
.get = gpr_get, .set = gpr_set
},
[REGSET_FPR] = {
.core_note_type = NT_PRFPREG, .n = ELF_NFPREG,
.size = sizeof(double), .align = sizeof(double),
.get = fpr_get, .set = fpr_set
},
#ifdef CONFIG_ALTIVEC
[REGSET_VMX] = {
.core_note_type = NT_PPC_VMX, .n = 34,
.size = sizeof(vector128), .align = sizeof(vector128),
.active = vr_active, .get = vr_get, .set = vr_set
},
#endif
#ifdef CONFIG_SPE
[REGSET_SPE] = {
.n = 35,
.size = sizeof(u32), .align = sizeof(u32),
.active = evr_active, .get = evr_get, .set = evr_set
},
#endif
};

static const struct user_regset_view user_ppc_native_view = {
.name = UTS_MACHINE, .e_machine = ELF_ARCH, .ei_osabi = ELF_OSABI,
.regsets = native_regsets, .n = ARRAY_SIZE(native_regsets)
};

const struct user_regset_view *task_user_regset_view(struct task_struct *task)
{
return &user_ppc_native_view;
}


void user_enable_single_step(struct task_struct *task)
{
struct pt_regs *regs = task->thread.regs;
Expand Down

0 comments on commit c790f0f

Please sign in to comment.