linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ppc32: removed usage of <asm/segment.h>
@ 2005-08-16 22:00 Kumar Gala
  2005-08-17  1:38 ` Paul Mackerras
  0 siblings, 1 reply; 13+ messages in thread
From: Kumar Gala @ 2005-08-16 22:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linuxppc-dev, linux-kernel

Made <asm/segment.h> a dummy include like it is in ppc64 and removed any
users if it in arch/ppc.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>

---
commit f63ab7e926d6c5e96de501ec9eac7f28af188a65
tree adcc67a572ec8e4d1520a7a5493ea909028e76f9
parent d88b795bc4c4b59c29a98e2a551c2ad4d65901c5
author Kumar K. Gala <kumar.gala@freescale.com> Tue, 16 Aug 2005 16:59:22 -0500
committer Kumar K. Gala <kumar.gala@freescale.com> Tue, 16 Aug 2005 16:59:22 -0500

 arch/ppc/kernel/temp.c         |    1 -
 arch/ppc/kernel/time.c         |    1 -
 arch/ppc/platforms/chrp_time.c |    1 -
 include/asm-ppc/segment.h      |    7 ++++++-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/ppc/kernel/temp.c b/arch/ppc/kernel/temp.c
--- a/arch/ppc/kernel/temp.c
+++ b/arch/ppc/kernel/temp.c
@@ -21,7 +21,6 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 
-#include <asm/segment.h>
 #include <asm/io.h>
 #include <asm/reg.h>
 #include <asm/nvram.h>
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c
--- a/arch/ppc/kernel/time.c
+++ b/arch/ppc/kernel/time.c
@@ -58,7 +58,6 @@
 #include <linux/init.h>
 #include <linux/profile.h>
 
-#include <asm/segment.h>
 #include <asm/io.h>
 #include <asm/nvram.h>
 #include <asm/cache.h>
diff --git a/arch/ppc/platforms/chrp_time.c b/arch/ppc/platforms/chrp_time.c
--- a/arch/ppc/platforms/chrp_time.c
+++ b/arch/ppc/platforms/chrp_time.c
@@ -22,7 +22,6 @@
 #include <linux/init.h>
 #include <linux/bcd.h>
 
-#include <asm/segment.h>
 #include <asm/io.h>
 #include <asm/nvram.h>
 #include <asm/prom.h>
diff --git a/include/asm-ppc/segment.h b/include/asm-ppc/segment.h
--- a/include/asm-ppc/segment.h
+++ b/include/asm-ppc/segment.h
@@ -1 +1,6 @@
-#include <asm/uaccess.h>
+#ifndef __PPC_SEGMENT_H
+#define __PPC_SEGMENT_H
+
+/* Only here because we have some old header files that expect it.. */
+
+#endif /* __PPC_SEGMENT_H */

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] ppc32: removed usage of <asm/segment.h>
  2005-08-16 22:00 [PATCH] ppc32: removed usage of <asm/segment.h> Kumar Gala
@ 2005-08-17  1:38 ` Paul Mackerras
  2005-08-17  3:33   ` David S. Miller
  0 siblings, 1 reply; 13+ messages in thread
From: Paul Mackerras @ 2005-08-17  1:38 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Andrew Morton, linuxppc-dev, linux-kernel

Kumar Gala writes:

> Made <asm/segment.h> a dummy include like it is in ppc64 and removed any
> users if it in arch/ppc.

Why can't we just delete asm-ppc/segment.h (and asm-ppc64/segment.h
too, for that matter) entirely?

Paul.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] ppc32: removed usage of <asm/segment.h>
  2005-08-17  1:38 ` Paul Mackerras
@ 2005-08-17  3:33   ` David S. Miller
  2005-08-17  5:43     ` Kumar Gala
  0 siblings, 1 reply; 13+ messages in thread
From: David S. Miller @ 2005-08-17  3:33 UTC (permalink / raw)
  To: paulus; +Cc: akpm, linuxppc-dev, linux-kernel, galak

From: Paul Mackerras <paulus@samba.org>
Date: Wed, 17 Aug 2005 11:38:20 +1000

> Kumar Gala writes:
> 
> > Made <asm/segment.h> a dummy include like it is in ppc64 and removed any
> > users if it in arch/ppc.
> 
> Why can't we just delete asm-ppc/segment.h (and asm-ppc64/segment.h
> too, for that matter) entirely?

I concur, in fact we should really kill that thing off entirely.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] ppc32: removed usage of <asm/segment.h>
  2005-08-17  3:33   ` David S. Miller
@ 2005-08-17  5:43     ` Kumar Gala
  2005-08-17  8:16       ` Geert Uytterhoeven
  2005-08-17  8:30       ` Christoph Hellwig
  0 siblings, 2 replies; 13+ messages in thread
From: Kumar Gala @ 2005-08-17  5:43 UTC (permalink / raw)
  To: David S. Miller
  Cc: Andrew Morton, Zachary Amsden, linux-kernel list,
	linuxppc-dev list, Gala Kumar K.-galak


On Aug 16, 2005, at 10:33 PM, David S. Miller wrote:

> From: Paul Mackerras <paulus@samba.org>
> Date: Wed, 17 Aug 2005 11:38:20 +1000
>
>
>> Kumar Gala writes:
>>
>>
>>> Made <asm/segment.h> a dummy include like it is in ppc64 and removed
>>>
> any
>
>>> users if it in arch/ppc.
>>>
>>
>> Why can't we just delete asm-ppc/segment.h (and asm-ppc64/segment.h
>> too, for that matter) entirely?
>>
>
> I concur, in fact we should really kill that thing off entirely.

I'm all for killing it off entirely but got some feedback that on  
i386 segment.h can be included by userspace programs.

Here is the in kernel consumers that are outside of arch specific  
directories:

./drivers/char/mxser.c:#include <asm/segment.h>
./drivers/isdn/hisax/hisax.h:#include <asm/segment.h>
./drivers/media/video/adv7170.c:#include <asm/segment.h>
./drivers/media/video/adv7175.c:#include <asm/segment.h>
./drivers/media/video/bt819.c:#include <asm/segment.h>
./drivers/media/video/bt856.c:#include <asm/segment.h>
./drivers/media/video/saa7111.c:#include <asm/segment.h>
./drivers/media/video/saa7114.c:#include <asm/segment.h>
./drivers/media/video/saa7185.c:#include <asm/segment.h>
./drivers/serial/68328serial.c:#include <asm/segment.h>
./drivers/serial/crisv10.c:#include <asm/segment.h>
./drivers/serial/icom.c:#include <asm/segment.h>
./drivers/serial/mcfserial.c:#include <asm/segment.h>
./drivers/video/q40fb.c:#include <asm/segment.h>
./include/linux/isdn.h:#include <asm/segment.h>
./sound/oss/os.h:#include <asm/segment.h>

- kumar

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] ppc32: removed usage of <asm/segment.h>
  2005-08-17  5:43     ` Kumar Gala
@ 2005-08-17  8:16       ` Geert Uytterhoeven
  2005-08-17  8:30       ` Christoph Hellwig
  1 sibling, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2005-08-17  8:16 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Andrew Morton, Zachary Amsden, linux-kernel list,
	linuxppc-dev list, Gala Kumar K.-galak, David S. Miller

On Wed, 17 Aug 2005, Kumar Gala wrote:
> I'm all for killing it off entirely but got some feedback that on i386
> segment.h can be included by userspace programs.
> 
> Here is the in kernel consumers that are outside of arch specific directories:

> ./drivers/video/q40fb.c:#include <asm/segment.h>

M68k-only, so doesn't affect ppc.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] ppc32: removed usage of <asm/segment.h>
  2005-08-17  5:43     ` Kumar Gala
  2005-08-17  8:16       ` Geert Uytterhoeven
@ 2005-08-17  8:30       ` Christoph Hellwig
  2005-08-17  8:56         ` Miklos Szeredi
  1 sibling, 1 reply; 13+ messages in thread
From: Christoph Hellwig @ 2005-08-17  8:30 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Andrew Morton, Zachary Amsden, linux-kernel list,
	linuxppc-dev list, Gala Kumar K.-galak, David S. Miller

On Wed, Aug 17, 2005 at 12:43:37AM -0500, Kumar Gala wrote:
> >I concur, in fact we should really kill that thing off entirely.
> 
> I'm all for killing it off entirely but got some feedback that on  
> i386 segment.h can be included by userspace programs.

No kernel headers can be included by userland anymore.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] ppc32: removed usage of <asm/segment.h>
  2005-08-17  8:30       ` Christoph Hellwig
@ 2005-08-17  8:56         ` Miklos Szeredi
  2005-08-17  9:09           ` Christoph Hellwig
  0 siblings, 1 reply; 13+ messages in thread
From: Miklos Szeredi @ 2005-08-17  8:56 UTC (permalink / raw)
  To: hch; +Cc: akpm, zach, linux-kernel, linuxppc-dev, galak, davem

> On Wed, Aug 17, 2005 at 12:43:37AM -0500, Kumar Gala wrote:
> > >I concur, in fact we should really kill that thing off entirely.
> > 
> > I'm all for killing it off entirely but got some feedback that on  
> > i386 segment.h can be included by userspace programs.
> 
> No kernel headers can be included by userland anymore.

I know nothing about <asm/segment.h> but this generic statement is
simply not true.

There are perfectly valid uses of kernel headers from userspace.  For
example if a program uses the netlink interface, it should include
<linux/netlink.h>.  It's the interface definition after all.

Glibc headers also include <linux/*> and <asm/*> in quite few places.

Miklos

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] ppc32: removed usage of <asm/segment.h>
  2005-08-17  8:56         ` Miklos Szeredi
@ 2005-08-17  9:09           ` Christoph Hellwig
  2005-08-17  9:15             ` Miklos Szeredi
  0 siblings, 1 reply; 13+ messages in thread
From: Christoph Hellwig @ 2005-08-17  9:09 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: akpm, zach, linux-kernel, hch, linuxppc-dev, galak, davem

On Wed, Aug 17, 2005 at 10:56:24AM +0200, Miklos Szeredi wrote:
> > On Wed, Aug 17, 2005 at 12:43:37AM -0500, Kumar Gala wrote:
> > > >I concur, in fact we should really kill that thing off entirely.
> > > 
> > > I'm all for killing it off entirely but got some feedback that on  
> > > i386 segment.h can be included by userspace programs.
> > 
> > No kernel headers can be included by userland anymore.
> 
> I know nothing about <asm/segment.h> but this generic statement is
> simply not true.
> 
> There are perfectly valid uses of kernel headers from userspace.  For
> example if a program uses the netlink interface, it should include
> <linux/netlink.h>.  It's the interface definition after all.
> 
> Glibc headers also include <linux/*> and <asm/*> in quite few places.

But these files in /usr/include/ aren't provided by the kernel anymore.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] ppc32: removed usage of <asm/segment.h>
  2005-08-17  9:09           ` Christoph Hellwig
@ 2005-08-17  9:15             ` Miklos Szeredi
  2005-08-17  9:20               ` Christoph Hellwig
  0 siblings, 1 reply; 13+ messages in thread
From: Miklos Szeredi @ 2005-08-17  9:15 UTC (permalink / raw)
  To: hch; +Cc: akpm, zach, linux-kernel, linuxppc-dev, galak, davem

> > There are perfectly valid uses of kernel headers from userspace.  For
> > example if a program uses the netlink interface, it should include
> > <linux/netlink.h>.  It's the interface definition after all.
> > 
> > Glibc headers also include <linux/*> and <asm/*> in quite few places.
> 
> But these files in /usr/include/ aren't provided by the kernel anymore.

They are provided by _one_ kernel, not necessarily the running kernel.

That doesn't make them any less a kernel header.

So if some userspace program depends on header <linux/x.h> to get the
interface definition for feature x, and you remove <linux/x.h> from
the current kernel, it _will_ break the userspace program some time
later, when glibc picks up the new kernel.

Having said that that, <asm/segment.h> may or may not be validly
exported to userspace.

Miklos

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] ppc32: removed usage of <asm/segment.h>
  2005-08-17  9:15             ` Miklos Szeredi
@ 2005-08-17  9:20               ` Christoph Hellwig
  2005-08-17 10:07                 ` Miklos Szeredi
  0 siblings, 1 reply; 13+ messages in thread
From: Christoph Hellwig @ 2005-08-17  9:20 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: akpm, zach, linux-kernel, hch, linuxppc-dev, galak, davem

On Wed, Aug 17, 2005 at 11:15:39AM +0200, Miklos Szeredi wrote:
> They are provided by _one_ kernel, not necessarily the running kernel.

No, they're provided by packages like glibc-kernheaders or similar
that are maintained separately.  They're split from the kernel headers
and we don't need to keep obsolete junk around.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] ppc32: removed usage of <asm/segment.h>
  2005-08-17  9:20               ` Christoph Hellwig
@ 2005-08-17 10:07                 ` Miklos Szeredi
  2005-08-18 16:25                   ` Kumar Gala
  0 siblings, 1 reply; 13+ messages in thread
From: Miklos Szeredi @ 2005-08-17 10:07 UTC (permalink / raw)
  To: hch; +Cc: akpm, zach, linux-kernel, linuxppc-dev, galak, davem

> > They are provided by _one_ kernel, not necessarily the running kernel.
> 
> No, they're provided by packages like glibc-kernheaders or similar
> that are maintained separately.

Yes.  And "maintenance" I presume means "copy" the kernel headers and
do some cleanup to be compliant to the relevant standards (which the
kernel maintainers couldn't be bothered to do).

> They're split from the kernel headers and we don't need to keep
> obsolete junk around.

I agree about obsolete junk.

However statements like "No kernel headers can be included by userland
anymore" can be slightly misleading.

Miklos

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] ppc32: removed usage of <asm/segment.h>
  2005-08-17 10:07                 ` Miklos Szeredi
@ 2005-08-18 16:25                   ` Kumar Gala
  2005-08-18 23:40                     ` Paul Mackerras
  0 siblings, 1 reply; 13+ messages in thread
From: Kumar Gala @ 2005-08-18 16:25 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: akpm, zach, linux-kernel, hch, linuxppc-dev, Gala Kumar K.-galak,
	davem


On Aug 17, 2005, at 5:07 AM, Miklos Szeredi wrote:

>>> They are provided by _one_ kernel, not necessarily the running
>>>
> kernel.
>
>>
>> No, they're provided by packages like glibc-kernheaders or similar
>> that are maintained separately.
>>
>
> Yes.  And "maintenance" I presume means "copy" the kernel headers and
> do some cleanup to be compliant to the relevant standards (which the
> kernel maintainers couldn't be bothered to do).
>
>
>> They're split from the kernel headers and we don't need to keep
>> obsolete junk around.
>>
>
> I agree about obsolete junk.
>
> However statements like "No kernel headers can be included by userland
> anymore" can be slightly misleading.

So after all of this its not clear to me if its acceptable to kill  
all users of <asm/segment.h> in the kernel and to move code that  
exists in <asm/segment.h> to <asm/uaccess.h> for arch's that need it.

- kumar

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] ppc32: removed usage of <asm/segment.h>
  2005-08-18 16:25                   ` Kumar Gala
@ 2005-08-18 23:40                     ` Paul Mackerras
  0 siblings, 0 replies; 13+ messages in thread
From: Paul Mackerras @ 2005-08-18 23:40 UTC (permalink / raw)
  To: Kumar Gala
  Cc: akpm, zach, Miklos Szeredi, linux-kernel, hch, linuxppc-dev,
	Gala Kumar K.-galak, davem

Kumar Gala writes:

> So after all of this its not clear to me if its acceptable to kill  
> all users of <asm/segment.h> in the kernel and to move code that  
> exists in <asm/segment.h> to <asm/uaccess.h> for arch's that need it.

<asm/segment.h> doesn't describe any part of the user/kernel ABI, so
we should be OK to kill it.  I would say we should remove the ppc and
ppc64 versions of it once 2.6.13 is out, and offer the other arch
maintainers a patch that moves their stuff as you suggest.  I think
also we could submit patches to remove the places where it is included
in generic kernel code post 2.6.13.

Paul.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-08-18 23:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-16 22:00 [PATCH] ppc32: removed usage of <asm/segment.h> Kumar Gala
2005-08-17  1:38 ` Paul Mackerras
2005-08-17  3:33   ` David S. Miller
2005-08-17  5:43     ` Kumar Gala
2005-08-17  8:16       ` Geert Uytterhoeven
2005-08-17  8:30       ` Christoph Hellwig
2005-08-17  8:56         ` Miklos Szeredi
2005-08-17  9:09           ` Christoph Hellwig
2005-08-17  9:15             ` Miklos Szeredi
2005-08-17  9:20               ` Christoph Hellwig
2005-08-17 10:07                 ` Miklos Szeredi
2005-08-18 16:25                   ` Kumar Gala
2005-08-18 23:40                     ` Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).