Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367943
b: refs/heads/master
c: 60c4ba9
h: refs/heads/master
i:
  367941: 80402a3
  367939: 0b93aa0
  367935: 2717a0e
v: v3
  • Loading branch information
Richard Kuo committed May 1, 2013
1 parent d162c12 commit 4ccdc5a
Show file tree
Hide file tree
Showing 9 changed files with 207 additions and 49 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: 444dd742d3b0353c55c92f77e6732d932120c829
refs/heads/master: 60c4ba99e015afe879c2682967c8ca8d233f6d3c
11 changes: 9 additions & 2 deletions trunk/arch/hexagon/include/uapi/asm/registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,17 @@ struct pt_regs {
};
union {
struct {
unsigned long gp;
unsigned long ugp;
unsigned long gp;
};
long long int gpugp;
};
union {
struct {
unsigned long cs0;
unsigned long cs1;
};
long long int ugpgp;
long long int cs1cs0;
};
/*
* Be extremely careful with rearranging these, if at all. Some code
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/hexagon/include/uapi/asm/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,15 @@ struct user_regs_struct {
unsigned long pc;
unsigned long cause;
unsigned long badva;
#if CONFIG_HEXAGON_ARCH_VERSION < 4
unsigned long pad1; /* pad out to 48 words total */
unsigned long pad2; /* pad out to 48 words total */
unsigned long pad3; /* pad out to 48 words total */
#else
unsigned long cs0;
unsigned long cs1;
unsigned long pad1; /* pad out to 48 words total */
#endif
};

#endif
3 changes: 2 additions & 1 deletion trunk/arch/hexagon/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ int main(void)

COMMENT("Hexagon pt_regs definitions");
OFFSET(_PT_SYSCALL_NR, pt_regs, syscall_nr);
OFFSET(_PT_UGPGP, pt_regs, ugpgp);
OFFSET(_PT_GPUGP, pt_regs, gpugp);
OFFSET(_PT_CS1CS0, pt_regs, cs1cs0);
OFFSET(_PT_R3130, pt_regs, r3130);
OFFSET(_PT_R2928, pt_regs, r2928);
OFFSET(_PT_R2726, pt_regs, r2726);
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/hexagon/kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] = {
{ "lc1", GDB_SIZEOF_REG, offsetof(struct pt_regs, lc1)},
{ " gp", GDB_SIZEOF_REG, offsetof(struct pt_regs, gp)},
{ "ugp", GDB_SIZEOF_REG, offsetof(struct pt_regs, ugp)},
{ "cs0", GDB_SIZEOF_REG, offsetof(struct pt_regs, cs0)},
{ "cs1", GDB_SIZEOF_REG, offsetof(struct pt_regs, cs1)},
{ "psp", GDB_SIZEOF_REG, offsetof(struct pt_regs, hvmer.vmpsp)},
{ "elr", GDB_SIZEOF_REG, offsetof(struct pt_regs, hvmer.vmel)},
{ "est", GDB_SIZEOF_REG, offsetof(struct pt_regs, hvmer.vmest)},
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/hexagon/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ static int genregs_get(struct task_struct *target,
dummy = pt_cause(regs);
ONEXT(&dummy, cause);
ONEXT(&pt_badva(regs), badva);
#if CONFIG_HEXAGON_ARCH_VERSION >=4
ONEXT(&regs->cs0, cs0);
ONEXT(&regs->cs1, cs1);
#endif

/* Pad the rest with zeros, if needed */
if (!ret)
Expand Down Expand Up @@ -123,6 +127,11 @@ static int genregs_set(struct task_struct *target,
INEXT(&bucket, cause);
INEXT(&bucket, badva);

#if CONFIG_HEXAGON_ARCH_VERSION >=4
INEXT(&regs->cs0, cs0);
INEXT(&regs->cs1, cs1);
#endif

/* Ignore the rest, if needed */
if (!ret)
ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
Expand Down
10 changes: 8 additions & 2 deletions trunk/arch/hexagon/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ static int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
err |= __put_user(regs->preds, &sc->sc_regs.p3_0);
err |= __put_user(regs->gp, &sc->sc_regs.gp);
err |= __put_user(regs->ugp, &sc->sc_regs.ugp);

#if CONFIG_HEXAGON_ARCH_VERSION >= 4
err |= __put_user(regs->cs0, &sc->sc_regs.cs0);
err |= __put_user(regs->cs1, &sc->sc_regs.cs1);
#endif
tmp = pt_elr(regs); err |= __put_user(tmp, &sc->sc_regs.pc);
tmp = pt_cause(regs); err |= __put_user(tmp, &sc->sc_regs.cause);
tmp = pt_badva(regs); err |= __put_user(tmp, &sc->sc_regs.badva);
Expand All @@ -93,7 +96,10 @@ static int restore_sigcontext(struct pt_regs *regs,
err |= __get_user(regs->preds, &sc->sc_regs.p3_0);
err |= __get_user(regs->gp, &sc->sc_regs.gp);
err |= __get_user(regs->ugp, &sc->sc_regs.ugp);

#if CONFIG_HEXAGON_ARCH_VERSION >= 4
err |= __get_user(regs->cs0, &sc->sc_regs.cs0);
err |= __get_user(regs->cs1, &sc->sc_regs.cs1);
#endif
err |= __get_user(tmp, &sc->sc_regs.pc); pt_set_elr(regs, tmp);

return err;
Expand Down
Loading

0 comments on commit 4ccdc5a

Please sign in to comment.