Re: [PATCH v2 23/44] metag: Traps

2012-12-06 Thread James Hogan
Hi Al, On 05/12/12 17:40, Al Viro wrote: > On Wed, Dec 05, 2012 at 04:08:41PM +, James Hogan wrote: >> +TBIRES tail_end(TBIRES State, unsigned long orig_syscall) >> +{ >> +struct pt_regs *regs = (struct pt_regs *)State.Sig.pCtx; >> +unsigned long flags; >> + >> +if (user_mode(regs)

Re: [PATCH v2 23/44] metag: Traps

2012-12-05 Thread Al Viro
On Wed, Dec 05, 2012 at 04:08:41PM +, James Hogan wrote: > +TBIRES tail_end(TBIRES State, unsigned long orig_syscall) > +{ > + struct pt_regs *regs = (struct pt_regs *)State.Sig.pCtx; > + unsigned long flags; > + > + if (user_mode(regs)) { > + local_irq_enable(); > +

[PATCH v2 23/44] metag: Traps

2012-12-05 Thread James Hogan
Add trap code for metag. At the lowest level Meta traps (and return from interrupt instruction - RTI) simply swap the PC and PCX registers and optionally toggle the interrupt status bit (ISTAT). Low level TBX code in tbipcx.S handles the core context save, determine the TBX signal number based on t