* Re: + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree
2006-05-14 19:13 + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree David Woodhouse
@ 2006-05-14 21:13 ` Andreas Schwab
2006-05-14 21:17 ` Christoph Hellwig
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Andreas Schwab @ 2006-05-14 21:13 UTC (permalink / raw)
To: linux-ia64
David Woodhouse <dwmw2@infradead.org> writes:
> On Sun, 2006-05-14 at 11:01 -0700, akpm@osdl.org wrote:
>>
>> diff -puN include/asm-ia64/page.h~git-hdrcleanup-vs-git-klibc-on-ia64-2 include/asm-ia64/page.h
>> --- 25/include/asm-ia64/page.h~git-hdrcleanup-vs-git-klibc-on-ia64-2 Mon May 15 01:48:22 2006
>> +++ 25-akpm/include/asm-ia64/page.h Mon May 15 01:49:38 2006
>> @@ -36,7 +36,11 @@
>> #elif defined(CONFIG_IA64_PAGE_SIZE_64KB)
>> # define PAGE_SHIFT 16
>> #else
>> +#ifdef __KERNEL__
>> # error Unsupported page size!
>> +#else
>> +#define PAGE_SHIFT 12
>> +#endif
>> #endif
>>
>> #define PAGE_SIZE (__IA64_UL_CONST(1) << PAGE_SHIFT)
>
> Hm, same applies here as to the last one. The __KERNEL__ ifdef applies
> to the whole crap around PAGE_SHIFT _and_ PAGE_SIZE, at least.
Userspace should be using getpagesize() anyway.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree
2006-05-14 19:13 + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree David Woodhouse
2006-05-14 21:13 ` Andreas Schwab
@ 2006-05-14 21:17 ` Christoph Hellwig
2006-05-14 21:37 ` David Woodhouse
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Christoph Hellwig @ 2006-05-14 21:17 UTC (permalink / raw)
To: linux-ia64
On Sun, May 14, 2006 at 08:13:05PM +0100, David Woodhouse wrote:
> In the long term I think we want to drop page.h and elf.h from the list
> of files which are exported to userspace altogether.
elf.h shouldn't be exported to userspace at all. there's a separate incarnation
of elf.h in userland, so anyone importing the kernel one is plain stupid.
similarly no one should be using page.h, there is nothing in there userspace
should ever look at
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree
2006-05-14 19:13 + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree David Woodhouse
2006-05-14 21:13 ` Andreas Schwab
2006-05-14 21:17 ` Christoph Hellwig
@ 2006-05-14 21:37 ` David Woodhouse
2006-05-14 22:03 ` H. Peter Anvin
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: David Woodhouse @ 2006-05-14 21:37 UTC (permalink / raw)
To: linux-ia64
On Sun, 2006-05-14 at 23:13 +0200, Andreas Schwab wrote:
> > Hm, same applies here as to the last one. The __KERNEL__ ifdef applies
> > to the whole crap around PAGE_SHIFT _and_ PAGE_SIZE, at least.
>
> Userspace should be using getpagesize() anyway.
Yes. That's why I say all the PAGE_SIZE crap should be in #ifdef
__KERNEL__.
I also suspect a lot of the _rest_ of that file shouldn't be visible
either. What's in there that we actually _need_ to export?
--
dwmw2
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree
2006-05-14 19:13 + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree David Woodhouse
` (2 preceding siblings ...)
2006-05-14 21:37 ` David Woodhouse
@ 2006-05-14 22:03 ` H. Peter Anvin
2006-05-14 22:05 ` H. Peter Anvin
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: H. Peter Anvin @ 2006-05-14 22:03 UTC (permalink / raw)
To: linux-ia64
Christoph Hellwig wrote:
> On Sun, May 14, 2006 at 08:13:05PM +0100, David Woodhouse wrote:
>> In the long term I think we want to drop page.h and elf.h from the list
>> of files which are exported to userspace altogether.
>
> elf.h shouldn't be exported to userspace at all. there's a separate incarnation
> of elf.h in userland, so anyone importing the kernel one is plain stupid.
>
Keep in mind that userland isn't necessarily glibc. In particular, for
klibc it would be a pain in the arse to have two largely identical
copies of the same header file in the kernel tree.
Data duplication is NOT a good thing.
-hpa
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree
2006-05-14 19:13 + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree David Woodhouse
` (3 preceding siblings ...)
2006-05-14 22:03 ` H. Peter Anvin
@ 2006-05-14 22:05 ` H. Peter Anvin
2006-05-14 22:11 ` David Woodhouse
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: H. Peter Anvin @ 2006-05-14 22:05 UTC (permalink / raw)
To: linux-ia64
Christoph Hellwig wrote:
> On Sun, May 14, 2006 at 08:13:05PM +0100, David Woodhouse wrote:
>> In the long term I think we want to drop page.h and elf.h from the list
>> of files which are exported to userspace altogether.
>
> elf.h shouldn't be exported to userspace at all. there's a separate incarnation
> of elf.h in userland, so anyone importing the kernel one is plain stupid.
>
Keep in mind that userland isn't necessarily glibc. In particular, for
klibc it would be a pain in the arse to have two largely identical
copies of the same header file in the kernel tree.
Data duplication is NOT a good thing.
-hpa
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree
2006-05-14 19:13 + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree David Woodhouse
` (4 preceding siblings ...)
2006-05-14 22:05 ` H. Peter Anvin
@ 2006-05-14 22:11 ` David Woodhouse
2006-05-14 22:34 ` H. Peter Anvin
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: David Woodhouse @ 2006-05-14 22:11 UTC (permalink / raw)
To: linux-ia64
On Sun, 2006-05-14 at 15:03 -0700, H. Peter Anvin wrote:
> Keep in mind that userland isn't necessarily glibc. In particular,
> for klibc it would be a pain in the arse to have two largely identical
> copies of the same header file in the kernel tree.
You can still use the copy from the kernel tree even if we don't
actually copy it out in 'make headers_install'.
But yes, this is one of the reasons I haven't touched elf.h (yet).
--
dwmw2
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree
2006-05-14 19:13 + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree David Woodhouse
` (5 preceding siblings ...)
2006-05-14 22:11 ` David Woodhouse
@ 2006-05-14 22:34 ` H. Peter Anvin
2006-05-14 22:41 ` David Woodhouse
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: H. Peter Anvin @ 2006-05-14 22:34 UTC (permalink / raw)
To: linux-ia64
David Woodhouse wrote:
> On Sun, 2006-05-14 at 15:03 -0700, H. Peter Anvin wrote:
>> Keep in mind that userland isn't necessarily glibc. In particular,
>> for klibc it would be a pain in the arse to have two largely identical
>> copies of the same header file in the kernel tree.
>
> You can still use the copy from the kernel tree even if we don't
> actually copy it out in 'make headers_install'.
>
> But yes, this is one of the reasons I haven't touched elf.h (yet).
I could, but that would defeat the purpose somewhat.
I believe "make headers_install" isn't "this is what userspace *has* to
get from the kernel" (which is, after all, the null set -- people wrote
C libraries for DOS for example), but "this is what the kernel provides
to userspace." It's up to userspace to use it or not, depending on the
suitability for any one particular userspace.
-hpa
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree
2006-05-14 19:13 + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree David Woodhouse
` (6 preceding siblings ...)
2006-05-14 22:34 ` H. Peter Anvin
@ 2006-05-14 22:41 ` David Woodhouse
2006-05-14 23:22 ` H. Peter Anvin
2006-05-14 23:35 ` David Woodhouse
9 siblings, 0 replies; 11+ messages in thread
From: David Woodhouse @ 2006-05-14 22:41 UTC (permalink / raw)
To: linux-ia64
On Sun, 2006-05-14 at 15:34 -0700, H. Peter Anvin wrote:
>
> I could, but that would defeat the purpose somewhat.
>
> I believe "make headers_install" isn't "this is what userspace *has* to
> get from the kernel" (which is, after all, the null set -- people wrote
> C libraries for DOS for example), but "this is what the kernel provides
> to userspace." It's up to userspace to use it or not, depending on the
> suitability for any one particular userspace.
Yes, but we have to draw the line somewhere. Otherwise we just continue
exporting crap like stomic.h and letting people shoot themselves in the
foot. I'm inclined to agree with hch that elf.h and page.h fall on the
same side of that line as atomic.h -- but since I know that merits some
discussion, it's something I've deferred for now. Let's get the basic
and obvious stuff done first and then we can argue about the remaining
details.
--
dwmw2
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree
2006-05-14 19:13 + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree David Woodhouse
` (7 preceding siblings ...)
2006-05-14 22:41 ` David Woodhouse
@ 2006-05-14 23:22 ` H. Peter Anvin
2006-05-14 23:35 ` David Woodhouse
9 siblings, 0 replies; 11+ messages in thread
From: H. Peter Anvin @ 2006-05-14 23:22 UTC (permalink / raw)
To: linux-ia64
David Woodhouse wrote:
>
> Yes, but we have to draw the line somewhere. Otherwise we just continue
> exporting crap like stomic.h and letting people shoot themselves in the
> foot. I'm inclined to agree with hch that elf.h and page.h fall on the
> same side of that line as atomic.h -- but since I know that merits some
> discussion, it's something I've deferred for now. Let's get the basic
> and obvious stuff done first and then we can argue about the remaining
> details.
>
page.h I agree with.
elf.h I don't.
page.h and atomic.h both have in common that on some architectures, the
needs of userspace and the needs of the kernel are very different
(what's atomic in kernel space isn't necessarily atomic in userspace.)
Similar, PAGE_SIZE makes sense for the kernel, but not for userspace (it
could vary.)
elf.h is different -- it describes an interface. As such, it *should*
be the same on both sides of the universe.
-hpa
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree
2006-05-14 19:13 + git-hdrcleanup-vs-git-klibc-on-ia64-2.patch added to -mm tree David Woodhouse
` (8 preceding siblings ...)
2006-05-14 23:22 ` H. Peter Anvin
@ 2006-05-14 23:35 ` David Woodhouse
9 siblings, 0 replies; 11+ messages in thread
From: David Woodhouse @ 2006-05-14 23:35 UTC (permalink / raw)
To: linux-ia64
On Sun, 2006-05-14 at 16:22 -0700, H. Peter Anvin wrote:
> elf.h is different -- it describes an interface. As such, it *should*
> be the same on both sides of the universe.
Yes, maybe that's true. I'll buy the argument if the file is _clean_ :)
--
dwmw2
^ permalink raw reply [flat|nested] 11+ messages in thread