Re: [2.6 patch] re-add required code to include/asm-v850/unistd.h

From: Adrian Bunk
Date: Wed Jul 11 2007 - 11:15:53 EST


On Sat, Jul 07, 2007 at 11:41:15PM +0200, Arnd Bergmann wrote:
> On Saturday 07 July 2007, Adrian Bunk wrote:
> >
> > Commit f5738ceed46782aea7663d62cb6398eb05fc4ce0 removed a bit too much,
> > resulting in the following compile error:
>
> Sorry about the trouble this has caused you.

No problem, I only ran into it when doing crosscompile tests.

> > Â#ifdef __KERNEL__
> > Â
> > +/* Syscall protocol:
> > + Â Syscall number in r12, args in r6-r9, r13-r14
> > + Â Return value in r10
> > + Â Trap 0 for `short' syscalls, where all the args can fit in function
> > + Â call argument registers, and trap 1 when there are additional args in
> > + Â r13-r14. Â*/
> > +
> > +#define SYSCALL_NUM Â Â"r12"
> > +#define SYSCALL_ARG0 Â "r6"
> > +#define SYSCALL_ARG1 Â "r7"
> > +#define SYSCALL_ARG2 Â "r8"
> > +#define SYSCALL_ARG3 Â "r9"
> > +#define SYSCALL_ARG4 Â "r13"
> > +#define SYSCALL_ARG5 Â "r14"
> > +#define SYSCALL_RET Â Â"r10"
> > +
> > +#define SYSCALL_SHORT_TRAP Â Â "0"
> > +#define SYSCALL_LONG_TRAP Â Â Â"1"
> > +
> > +/* Registers clobbered by any syscall. ÂThis _doesn't_ include the syscall
> > + Â number (r12) or the `extended arg' registers (r13, r14), even though
> > + Â they are actually clobbered too (this is because gcc's `asm' statement
> > + Â doesn't allow a clobber to be used as an input or output). Â*/
> > +#define SYSCALL_CLOBBERS Â Â Â "r1", "r5", "r11", "r15", "r16", \
> > + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "r17", "r18", "r19"
> > +
> > +/* Registers clobbered by a `short' syscall. ÂThis includes all clobbers
> > + Â except the syscall number (r12). Â*/
> > +#define SYSCALL_SHORT_CLOBBERS SYSCALL_CLOBBERS, "r13", "r14"
> > +
>
> Wouldn't it be more appropriate to just open-code the contents of these
> macros in the place where they are used?
>
> Even better probably would be to convert the v850 kernel_thread code
> to call do_fork directly, like most other architectures do.

The bigger problem seems to be that v850 is not that near at compiling
at all... :-(

> Arnd <><

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/