[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200907131624.28286.arnd@arndb.de>
Date: Mon, 13 Jul 2009 16:24:28 +0200
From: Arnd Bergmann <arnd@...db.de>
To: liqin.chen@...plusct.com
Cc: Christoph Hellwig <hch@...radead.org>, linux-arch@...r.kernel.org,
linux-arch-owner@...r.kernel.org, linux-kernel@...r.kernel.org,
Roland McGrath <roland@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH V2] score: add regset support
On Monday 13 July 2009, liqin.chen@...plusct.com wrote:
>
> unsigned long pad0[6];
>
> was place at the start of pt_regs use
> to hold the arguments from userland.
> caller(exception handler) not need to
> change stack pointer.
>
> unsigned long orig_r4;
> unsigned long orig_r7;
> move to end of the pt_regs haven't
> problem.
Ok, I see.
Maybe to get a nicer layout, you can define separate
structures then:
struct user_regs_struct {
unsigned long regs[32];
unsigned long cel;
unsigned long ceh;
unsigned long sr0; /* cnt */
unsigned long sr1; /* lcr */
unsigned long sr2; /* scr */
unsigned long cp0_epc;
unsigned long cp0_ema;
unsigned long cp0_psr;
unsigned long cp0_ecr;
unsigned long cp0_condition;
unsigned long reserved[6]; /* future extensions */
};
#ifdef __KERNEL__
struct pt_regs {
/* stack arguments */
unsigned long pad0[6];
/* internal use */
unsigned long orig_r4;
unsigned long orig_r7;
long is_syscall;
/* saved registers */
struct user_regs_struct uregs;
};
#endif
That would keep the user struct relatively clean.
Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists