[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OFE8F25211.6F919E29-ON482575EF.0031BE0C-482575EF.00328689@sunplusct.com>
Date: Fri, 10 Jul 2009 17:06:27 +0800
From: liqin.chen@...plusct.com
To: Roland McGrath <roland@...hat.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Christoph Hellwig <hch@...radead.org>,
linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] score: add regsets support for score
Roland McGrath <roland@...hat.com> 写于 2009-07-10 05:03:56:
> > > + ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
> > > + regs->regs,
> > > + offsetof(struct pt_regs, regs),
> > > + end_pos);
>
> This looks odd to me. The last two arguments here are offsets into
> the userland ABI format defined by the user_regset layout. Unless
> offsetof(struct pt_regs, regs) is zero, then you need to precede
> this call with one that fills in the initial stretch of the userland
> format layout from its 0 up to offsetof(struct pt_regs, regs). If
> in fact offsetof(struct pt_regs, regs) is zero, then it would be far
> less confusing to just write 0 there IMHO. Using offsetof on
> pt_regs at all here is very confusing to me unless pt_regs describes
> the userland ABI layout (in which case the use here still doesn't
> make sense).
Thanks Roland,
Maybe I misunderstand the arguments meaning of
user_regset_copy(in/out), I rewrite these code,
use userland ABI format the same as score's pt_regs,
just like sh arch do, maybe it's easy to understand.
It will be sent out latter.
Best Regards
Liqin
Powered by blists - more mailing lists