Re: [PATCH 0/3] System call table generation support

From: Paul Burton
Date: Fri Sep 21 2018 - 15:32:27 EST


Hi Christoph,

On Thu, Sep 20, 2018 at 11:09:41PM -0700, Christoph Hellwig wrote:
> On Thu, Sep 20, 2018 at 08:48:37PM +0000, Paul Burton wrote:
> > > Speaking of nanoMIPS, what is your plan for the syscall ABI there?
> > > I can see two ways of approaching it:
> > >
> > > a) keep all the MIPSisms in the data structures, and just use a subset of
> > > o32 that drops all the obsolete entry points
> > > b) start over and stay as close as possible to the generic ABI, using the
> > > asm-generic versions of both the syscall table and the uapi header
> > > files instead of the traditional version.
> >
> > We've taken option b in our current downstream kernel & that's what I
> > hope we'll get upstream too. There's no expectation that we'll ever need
> > to mix pre-nanoMIPS & nanoMIPS ISAs or their associated ABIs across the
> > kernel/user boundary so it's felt like a great opportunity to clean up &
> > standardise.
> >
> > Getting nanoMIPS/p32 support submitted upstream is on my to-do list, but
> > there's a bunch of prep work to get in first & of course that to-do list
> > is forever growing. Hopefully in the next couple of cycles.
>
> p32 is just the ABI name for nanoMIPS or yet another MIPS ABI?

p32 is the ABI for nanoMIPS - ie. it is a new ABI, but it's not for use
with pre-nanoMIPS ISAs & nanoMIPS isn't used with o32/n32/n64.

Some of the code density improvements nanoMIPS brings are due to the ISA
& p32 ABI being developed together - eg. the load/store multiple &
save/restore instructions make it easy to save sequences of $sp, $fp,
$ra & some number of the $sN callee-saved registers. Compressed register
number encodings generally include registers that make sense for the p32
ABI, and I'm sure there were other things I've forgotten.

> Either way, Ð think if there is yet another ABI even on an existing port
> we should always aim for the asm-generic syscall table indeed.
>
> Especially for mips where o32 has a rather awkward ABI only explained by
> odd decisions more than 20 years ago.

Glad to hear we're on the same page :)

I'm all for being less "special" & couldn't care less if our nanoMIPS
support isn't compatible with IRIX.

Thanks,
Paul