Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Paul Burton <paul.burton@mips.com>
Cc: Firoz Khan <firoz.khan@linaro.org>,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	James Hogan <jhogan@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Philippe Ombredanne <pombredanne@nexb.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	"y2038@lists.linaro.org" <y2038@lists.linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"deepa.kernel@gmail.com" <deepa.kernel@gmail.com>,
	"marcin.juszkiewicz@linaro.org" <marcin.juszkiewicz@linaro.org>
Subject: Re: [PATCH v4 3/7] mips: rename macros and files from '64' to 'n64'
Date: Tue, 11 Dec 2018 10:58:39 +0000 (GMT)	[thread overview]
Message-ID: <alpine.LFD.2.21.1812110321220.11202@eddie.linux-mips.org> (raw)
In-Reply-To: <20181210234620.rcmapky2aj7eb2wh@pburton-laptop>

Hi Paul,

> >  My feeling has been n32 was invented at SGI as an afterthought, hence the 
> > choice of having ABI32 or ABI64 defined for the 32-bit (now o32) and the 
> > 64-bit (now n64) ABI respectively was reasonable.
> 
> I'd agree if _MIPS_SIM were defined as _ABI32 for o32, but:
> 
>   $ mips-linux-gcc -mabi=32 -dM -E - </dev/null | grep ABIO32
>   #define _ABIO32 1
>   #define _MIPS_SIM _ABIO32
> 
> ...so _MIPS_SIM is:
> 
>   _ABIO32 for o32
>   _ABIN32 for n32
>   _ABI64 for n64
> 
> That doesn't seem very consistent to me, and means that there inevitably
> has to be some ugliness once there are multiple 64-bit ABIs.

 The _ABI* macros were invented as a GNU feature long after _MIPS_SIM_* 
ones, i.e. IIRC early 2000s vs mid 1990s.  Only _MIPS_SIM_* macros are 
referred in SGI documentation.

 It is inconsistent and I don't know why whoever invented the _ABI* macros 
didn't follow the original naming convention chosen by SGI for _MIPS_SIM_* 
ones, i.e. _ABI32, _NABI32, _ABI64 (but then I don't know either why some 
people have troubles with recognising patterns in existing code and then 
following those patterns when making changes or additions to that code; I 
guess that's just what some people are like).

 BTW in case anybody wondered SIM stands for Subprogram Interface Model.

> To me it feels like the result of someone thinking "one 64-bit MIPS ABI
> ought to be enough for anybody". I'm undecided whether that person was
> shortsighted or a genius whose vision was simply incomprehensible to
> those of us that followed.

 I think back when 64-bit processors were a new invention hardly anyone 
thought about proliferating 64-bit ABIs.  Remember that first MIPS systems 
were high-end workstations and servers and n32 was invented as a means to 
conserve memory, which wasn't seen as a necessity at the beginning.  A 
secondary goal might have been improving the performance of badly-written 
32-bit software, by means of the better function calling convention n32 
has over o32.

 Notice for example that for a long time x86-64 only had a single native 
64-bit ABI, which is LP64 like our n64, and it was only quite recently 
that the x86-64 x32 ILP32 ABI was added, which is like our n32.  And yet 
at this very moment it is being discussed on LKML whether x32 actually has 
any users beyond developers who maintain it and consequently whether it is 
worth it to keep support for it in our kernel.  To me it means in the 
workstation and server segment there is still no need to conserve memory 
(and with the ubiquity of 64-bit systems nowadays the need to maintain 
unportable 32-bit software has largely disappeared).

 So if anything was not expected it was the expansion of 64-bit MIPS 
processors into the embedded market or indeed the scale of the expansion 
of the embedded market itself, but I wouldn't call the lack of such an 
expectation short-sightedness.  It would be too bold a statement to me, 
because the change was simply too revolutionary to be considered some 25 
years ago.  Nobody in early 1990s would think of a 64-bit computer in a 
ballpoint pen or suchlike being a common device and the consequences for 
code design it would have.

 FWIW,

  Maciej

  reply	other threads:[~2018-12-11 10:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06  5:18 [PATCH v4 0/7] mips: system call table generation support Firoz Khan
2018-12-06  5:18 ` [PATCH v4 1/7] mips: add __NR_syscalls along with __NR_Linux_syscalls Firoz Khan
2018-12-06  5:18 ` [PATCH v4 2/7] mips: remove unused macros Firoz Khan
2018-12-06  5:18 ` [PATCH v4 3/7] mips: rename macros and files from '64' to 'n64' Firoz Khan
2018-12-10 19:51   ` Paul Burton
2018-12-10 23:32     ` Maciej W. Rozycki
2018-12-10 23:46       ` Paul Burton
2018-12-11 10:58         ` Maciej W. Rozycki [this message]
2018-12-11  8:45     ` Firoz Khan
2018-12-11 18:59       ` Paul Burton
2018-12-12  4:34         ` Firoz Khan
2018-12-12 22:28           ` Paul Burton
2018-12-13  8:53             ` Firoz Khan
2018-12-13 20:15               ` Paul Burton
2018-12-14  5:50                 ` Firoz Khan
2018-12-06  5:18 ` [PATCH v4 4/7] mips: add +1 to __NR_syscalls in uapi header Firoz Khan
2018-12-06  5:18 ` [PATCH v4 5/7] mips: remove syscall table entries Firoz Khan
2018-12-06  5:18 ` [PATCH v4 6/7] mips: add system call table generation support Firoz Khan
2018-12-06  5:18 ` [PATCH v4 7/7] mips: generate uapi header and system call table files Firoz Khan
2018-12-10  5:35 ` [PATCH v4 0/7] mips: system call table generation support Firoz Khan
2018-12-10  5:41   ` Paul Burton
2018-12-10  8:05     ` Firoz Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.21.1812110321220.11202@eddie.linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=arnd@arndb.de \
    --cc=deepa.kernel@gmail.com \
    --cc=firoz.khan@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jhogan@kernel.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=marcin.juszkiewicz@linaro.org \
    --cc=paul.burton@mips.com \
    --cc=pombredanne@nexb.com \
    --cc=ralf@linux-mips.org \
    --cc=tglx@linutronix.de \
    --cc=y2038@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox