This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv2] PowerPC - Add a faster way to read the Time Base register
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Steve Munroe <sjmunroe at us dot ibm dot com>
- Cc: libc-alpha at sourceware dot org, rth at twiddle dot net, ryan dot arnold at gmail dot com, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Date: Thu, 23 Feb 2012 11:25:03 -0500
- Subject: Re: [PATCHv2] PowerPC - Add a faster way to read the Time Base register
- Authentication-results: mr.google.com; spf=pass (google.com: domain of patofiero@gmail.com designates 10.236.77.102 as permitted sender) smtp.mail=patofiero@gmail.com; dkim=pass header.i=patofiero@gmail.com
- References: <20120215195109.GB3592@linux.vnet.ibm.com><1329932962-8962-1-git-send-email-tuliom@linux.vnet.ibm.com><CADZpyiyRHwd+TeZTSGJyXO=G7ECx4Z_fxoWGBJgPLkZQav7r7w@mail.gmail.com><OFB3F2C55C.652DCB5A-ON862579AC.00722F0F-862579AC.0073E19F@us.ibm.com>
On Wed, Feb 22, 2012 at 4:05 PM, Steve Munroe <sjmunroe@us.ibm.com> wrote:
>> I have nothing to say about the code itself, and I understand the
>> reason for wanting these kinds of snippets in user.h on glibc since
>> all users can use them immediately.
>>
>> However, I guess my question is as follows, and please stop me if I'm
>> completely wrong, wouldn't it be better to add this kind of routine to
>> the Power ABI and export it via a different header?
>>
> The Timebase is defined by the PowerISA and has been since V1.0.
I'm not talking about an ISA.
> We get this request alot! And it looks like user.h was intended for this
> type of platform dependent stuff.
I agree that it's a useful request and users often butcher the inline assembly.
I do not agree that sys/user.h was intended for this type of platform
dependent stuff.
As far as I can tell it is a BSD legacy header intended to contain
`struct user' and the things it required.
> The ABI does not have headers, Packages do! So I don't see how defining it
> in the ABI helps.
If you don't want to call it an ABI, call it a standard.
> So what package and what header would you propose? That normal people can
> find and use?
I am OK with shipping the header in glibc, these kinds of core headers
belong with the implementation in either gcc or glibc.
What I would like to see is a discussion about "What do we do with
platform macros that follow no standard and how do we expose them to
users?"
I would rather we create a whole new header, platform.h, and ship that
as the location for platform macros that follow no standard.
Cheers,
Carlos.