From: Matthew Wilcox <matthew@wil.cx>
To: Greg McGary <greg@mcgary.org>
Cc: linux-arch@vger.kernel.org
Subject: Re: Proposal: (u)intptr_t replaces (unsigned) long as opaque type
Date: Sat, 18 Sep 2010 22:06:35 -0600 [thread overview]
Message-ID: <20100919040635.GE25139@parisc-linux.org> (raw)
In-Reply-To: <4C9578DE.4090602@mcgary.org>
On Sat, Sep 18, 2010 at 07:43:42PM -0700, Greg McGary wrote:
> On 09/18/10 16:54, Matthew Wilcox wrote:
>> Linux really only supports ILP32 and LP64 models. Pick one, and make
>> your gcc mmtnp-unknown-linux triplet support it.
>>
>> ILP32 may be a better model for you, depending how much RAM your mmtnp
>> processor is likely to support.
>>
> Yes, I know Linux currently supports only ILP32 and LP64. What I propose is a way to make it support something new beyond those models, and do so in a way that has no impact on vmlinux images for existing ports.
But it's only the beginnings of your problems. There's so much userspace
code that's written assuming ILP32 / LP64. Even inside the kernel,
people are going to constantly break your port by introducing new code
that doesn't use uintptr_t.
Then there are other things we use unsigned long for, like interrupt
status flags (spin_lock_irqsave and friends). Should those be converted
to some new type?
> What is mmtnp?
Your processor. I took the acronym of the description you gave.
> ILP32 will not work for me because pointers coerced to long will be truncated. LP64 could work, but performance would suck, so that's not viable.
How bad would performance really suck? x86-32 performance sucks on
64-bit arithmetic, but that's because it has about three registers.
With a decent size register file (16 or 32), I doubt performance will
be that bad.
If you set up your memory map correctly, truncating pointers to 32 bit
may not be a huge problem. You can use the kmap() abstraction to run
your kernel in a 32-bit address space.
Essentially, you're asking us to take on a huge number of changes in
order to make your new processor's performance not suck. I don't think
it likely you're going to find much sympathy here.
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next prev parent reply other threads:[~2010-09-19 4:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-18 21:42 Proposal: (u)intptr_t replaces (unsigned) long as opaque type Greg McGary
2010-09-18 23:54 ` Matthew Wilcox
2010-09-19 2:43 ` Greg McGary
2010-09-19 4:06 ` Matthew Wilcox [this message]
2010-09-19 16:53 ` Greg McGary
2010-09-20 9:30 ` Arnd Bergmann
2010-09-20 20:28 ` Greg McGary
2010-09-21 6:32 ` Arnd Bergmann
2010-09-19 4:33 ` Alexey Zaytsev
2010-09-19 6:50 ` David Howells
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=20100919040635.GE25139@parisc-linux.org \
--to=matthew@wil.cx \
--cc=greg@mcgary.org \
--cc=linux-arch@vger.kernel.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