public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Userspace visible of 3 include/asm/ headers
@ 2006-08-03 19:39 Adrian Bunk
  2006-08-03 19:44 ` Dave Jones
  0 siblings, 1 reply; 10+ messages in thread
From: Adrian Bunk @ 2006-08-03 19:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: David Woodhouse, H. Peter Anvin

Could anyone help me regarding the desired userspace visibility of the 
following three headers under include/asm/?


Header        : cpufeature.h
Architectures : i386, x86_64
Is there any reason why this header is exported to userspace?

Header        : setup.h
Architectures : i386, ia64, x86_64
Contents:
- COMMAND_LINE_SIZE on ia64, x86_64
- much more on i386
Should COMMAND_LINE_SIZE be visible to userspace?
Anything else from the i386 setup.h?

Header        : timex.h
Architectures : all architectures
Offers CLOCK_TICK_RATE on all architectures, but on some architectures
(like i386) this depends on the kernel configuration.
-> not a userspace header?


TIA
Adrian

-- 

    Gentoo kernels are 42 times more popular than SUSE kernels among
    KLive users  (a service by SUSE contractor Andrea Arcangeli that
    gathers data about kernels from many users worldwide).

       There are three kinds of lies: Lies, Damn Lies, and Statistics.
                                                    Benjamin Disraeli


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

* Re: Userspace visible of 3 include/asm/ headers
  2006-08-03 19:39 Userspace visible of 3 include/asm/ headers Adrian Bunk
@ 2006-08-03 19:44 ` Dave Jones
  2006-08-03 20:14   ` Alexey Dobriyan
  2006-08-03 21:28   ` H. Peter Anvin
  0 siblings, 2 replies; 10+ messages in thread
From: Dave Jones @ 2006-08-03 19:44 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel, David Woodhouse, H. Peter Anvin

On Thu, Aug 03, 2006 at 09:39:52PM +0200, Adrian Bunk wrote:
 > Could anyone help me regarding the desired userspace visibility of the 
 > following three headers under include/asm/?
 > 
 > 
 > Header        : cpufeature.h
 > Architectures : i386, x86_64
 > Is there any reason why this header is exported to userspace?

Probably not. The only apps I've seen that care about feature bits
define them theirselves rather than use these.

 > Header        : setup.h
 > Architectures : i386, ia64, x86_64
 > Contents:
 > - COMMAND_LINE_SIZE on ia64, x86_64
 > - much more on i386
 > Should COMMAND_LINE_SIZE be visible to userspace?

Bootloaders probably need to know this.

 > Header        : timex.h
 > Architectures : all architectures
 > Offers CLOCK_TICK_RATE on all architectures, but on some architectures
 > (like i386) this depends on the kernel configuration.
 > -> not a userspace header?

Also longer term,  CLOCK_TICK_RATE will make no sense should we go
to a tickless kernel.

		Dave

-- 
http://www.codemonkey.org.uk

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

* Re: Userspace visible of 3 include/asm/ headers
  2006-08-03 19:44 ` Dave Jones
@ 2006-08-03 20:14   ` Alexey Dobriyan
  2006-08-03 20:17     ` Dave Jones
  2006-08-03 21:28   ` H. Peter Anvin
  1 sibling, 1 reply; 10+ messages in thread
From: Alexey Dobriyan @ 2006-08-03 20:14 UTC (permalink / raw)
  To: Dave Jones, Adrian Bunk, linux-kernel, David Woodhouse,
	H. Peter Anvin

On Thu, Aug 03, 2006 at 03:44:10PM -0400, Dave Jones wrote:
> On Thu, Aug 03, 2006 at 09:39:52PM +0200, Adrian Bunk wrote:
>  > Could anyone help me regarding the desired userspace visibility of the
>  > following three headers under include/asm/?
>  >
>  > Header        : cpufeature.h
>  > Architectures : i386, x86_64
>  > Is there any reason why this header is exported to userspace?
>
> Probably not. The only apps I've seen that care about feature bits
> define them theirselves rather than use these.

Feature bits are only (indirectly) visible via /proc/cpuinfo.
struct cpuinfo_x86, AFAICS, is never copied to userspace. So, it's safe
to remove this header.


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

* Re: Userspace visible of 3 include/asm/ headers
  2006-08-03 20:14   ` Alexey Dobriyan
@ 2006-08-03 20:17     ` Dave Jones
  0 siblings, 0 replies; 10+ messages in thread
From: Dave Jones @ 2006-08-03 20:17 UTC (permalink / raw)
  To: Alexey Dobriyan
  Cc: Adrian Bunk, linux-kernel, David Woodhouse, H. Peter Anvin

On Fri, Aug 04, 2006 at 12:14:02AM +0400, Alexey Dobriyan wrote:
 > On Thu, Aug 03, 2006 at 03:44:10PM -0400, Dave Jones wrote:
 > > On Thu, Aug 03, 2006 at 09:39:52PM +0200, Adrian Bunk wrote:
 > >  > Could anyone help me regarding the desired userspace visibility of the
 > >  > following three headers under include/asm/?
 > >  >
 > >  > Header        : cpufeature.h
 > >  > Architectures : i386, x86_64
 > >  > Is there any reason why this header is exported to userspace?
 > >
 > > Probably not. The only apps I've seen that care about feature bits
 > > define them theirselves rather than use these.
 > 
 > Feature bits are only (indirectly) visible via /proc/cpuinfo.
 > struct cpuinfo_x86, AFAICS, is never copied to userspace. So, it's safe
 > to remove this header.

Most of the bits (all but the linux specific ones), are the same bits you
can get from /dev/cpu/0/cpuid, or from calling the cpuid instruction by hand.

		Dave

-- 
http://www.codemonkey.org.uk

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

* Re: Userspace visible of 3 include/asm/ headers
  2006-08-03 19:44 ` Dave Jones
  2006-08-03 20:14   ` Alexey Dobriyan
@ 2006-08-03 21:28   ` H. Peter Anvin
  2006-08-03 21:52     ` Adrian Bunk
  1 sibling, 1 reply; 10+ messages in thread
From: H. Peter Anvin @ 2006-08-03 21:28 UTC (permalink / raw)
  To: Dave Jones, Adrian Bunk, linux-kernel, David Woodhouse,
	H. Peter Anvin

Dave Jones wrote:
> 
>  > Header        : setup.h
>  > Architectures : i386, ia64, x86_64
>  > Contents:
>  > - COMMAND_LINE_SIZE on ia64, x86_64
>  > - much more on i386
>  > Should COMMAND_LINE_SIZE be visible to userspace?
> 
> Bootloaders probably need to know this.
> 

COMMAND_LINE_SIZE should be moved to a different header and be made 
common between all architectures.

	-hpa

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

* Re: Userspace visible of 3 include/asm/ headers
  2006-08-03 21:28   ` H. Peter Anvin
@ 2006-08-03 21:52     ` Adrian Bunk
  2006-08-03 23:51       ` H. Peter Anvin
  0 siblings, 1 reply; 10+ messages in thread
From: Adrian Bunk @ 2006-08-03 21:52 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Dave Jones, linux-kernel, David Woodhouse

On Thu, Aug 03, 2006 at 02:28:43PM -0700, H. Peter Anvin wrote:
> Dave Jones wrote:
> >
> > > Header        : setup.h
> > > Architectures : i386, ia64, x86_64
> > > Contents:
> > > - COMMAND_LINE_SIZE on ia64, x86_64
> > > - much more on i386
> > > Should COMMAND_LINE_SIZE be visible to userspace?
> >
> >Bootloaders probably need to know this.
> >
> 
> COMMAND_LINE_SIZE should be moved to a different header and be made 
> common between all architectures.

On different architectures, we have the following values for 
COMMAND_LINE_SIZE:
- 256
- 512
- 896
- 1024
- 4096

What should be the common value?
4096?

And I have a rough memory of some dependencies of COMMAND_LINE_SIZE and 
boot loaders. What exactly must be taken care of when increasing 
COMMAND_LINE_SIZE?

> 	-hpa

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: Userspace visible of 3 include/asm/ headers
  2006-08-03 21:52     ` Adrian Bunk
@ 2006-08-03 23:51       ` H. Peter Anvin
  2006-08-04  0:12         ` Adrian Bunk
  0 siblings, 1 reply; 10+ messages in thread
From: H. Peter Anvin @ 2006-08-03 23:51 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Dave Jones, linux-kernel, David Woodhouse

Adrian Bunk wrote:

> 
> On different architectures, we have the following values for 
> COMMAND_LINE_SIZE:
> - 256
> - 512
> - 896
> - 1024
> - 4096
> 
> What should be the common value?
> 4096?
> 
> And I have a rough memory of some dependencies of COMMAND_LINE_SIZE and 
> boot loaders. What exactly must be taken care of when increasing 
> COMMAND_LINE_SIZE?
> 

It's architecture-dependent; it probably should be defined in something 
like <asm/cmdline.h>.

	-hpa

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

* Re: Userspace visible of 3 include/asm/ headers
  2006-08-03 23:51       ` H. Peter Anvin
@ 2006-08-04  0:12         ` Adrian Bunk
  2006-08-04  0:59           ` H. Peter Anvin
  2006-08-04  1:00           ` H. Peter Anvin
  0 siblings, 2 replies; 10+ messages in thread
From: Adrian Bunk @ 2006-08-04  0:12 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Dave Jones, linux-kernel, David Woodhouse

On Thu, Aug 03, 2006 at 04:51:38PM -0700, H. Peter Anvin wrote:
> Adrian Bunk wrote:
> 
> >
> >On different architectures, we have the following values for 
> >COMMAND_LINE_SIZE:
> >- 256
> >- 512
> >- 896
> >- 1024
> >- 4096
> >
> >What should be the common value?
> >4096?
> >
> >And I have a rough memory of some dependencies of COMMAND_LINE_SIZE and 
> >boot loaders. What exactly must be taken care of when increasing 
> >COMMAND_LINE_SIZE?
> >
> 
> It's architecture-dependent; it probably should be defined in something 
> like <asm/cmdline.h>.

OK, I did misunderstand you.
I tought you were saying it should be the same value for all 
architectures.

With the exception of frv (in param.h), COMMAND_LINE_SIZE is in setup.h 
on all architectures.

Do we want to move it to a different header, or simply make param.h a 
userspace header on all architectures?

> 	-hpa

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: Userspace visible of 3 include/asm/ headers
  2006-08-04  0:12         ` Adrian Bunk
@ 2006-08-04  0:59           ` H. Peter Anvin
  2006-08-04  1:00           ` H. Peter Anvin
  1 sibling, 0 replies; 10+ messages in thread
From: H. Peter Anvin @ 2006-08-04  0:59 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Dave Jones, linux-kernel, David Woodhouse

Adrian Bunk wrote:
> On Thu, Aug 03, 2006 at 04:51:38PM -0700, H. Peter Anvin wrote:
>> Adrian Bunk wrote:
>>
>>> On different architectures, we have the following values for 
>>> COMMAND_LINE_SIZE:
>>> - 256
>>> - 512
>>> - 896
>>> - 1024
>>> - 4096
>>>
>>> What should be the common value?
>>> 4096?
>>>
>>> And I have a rough memory of some dependencies of COMMAND_LINE_SIZE and 
>>> boot loaders. What exactly must be taken care of when increasing 
>>> COMMAND_LINE_SIZE?
>>>
>> It's architecture-dependent; it probably should be defined in something 
>> like <asm/cmdline.h>.
> 
> OK, I did misunderstand you.
> I tought you were saying it should be the same value for all 
> architectures.
> 
> With the exception of frv (in param.h), COMMAND_LINE_SIZE is in setup.h 
> on all architectures.
> 
> Do we want to move it to a different header, or simply make param.h a 
> userspace header on all architectures?
> 

I figure it should be broken out into a separate header, rather than 
exporting all of setup.h.

	-hpa

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

* Re: Userspace visible of 3 include/asm/ headers
  2006-08-04  0:12         ` Adrian Bunk
  2006-08-04  0:59           ` H. Peter Anvin
@ 2006-08-04  1:00           ` H. Peter Anvin
  1 sibling, 0 replies; 10+ messages in thread
From: H. Peter Anvin @ 2006-08-04  1:00 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Dave Jones, linux-kernel, David Woodhouse

Nevermind, I just realized I did a brainfart.  setup.h should all be 
exported.

	-hpa


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

end of thread, other threads:[~2006-08-04  1:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-03 19:39 Userspace visible of 3 include/asm/ headers Adrian Bunk
2006-08-03 19:44 ` Dave Jones
2006-08-03 20:14   ` Alexey Dobriyan
2006-08-03 20:17     ` Dave Jones
2006-08-03 21:28   ` H. Peter Anvin
2006-08-03 21:52     ` Adrian Bunk
2006-08-03 23:51       ` H. Peter Anvin
2006-08-04  0:12         ` Adrian Bunk
2006-08-04  0:59           ` H. Peter Anvin
2006-08-04  1:00           ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox