Skip to contentSkip to conversation

Userspace visible of 3 include/asm/ headers

DISCUSSION Adrian Bunk 4 participants 10 messages Aug 3, 2006 – Aug 4, 2006

lore
Share & tools
lore
#0 lore raw

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

Signature · 6 lines
    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
#1 lore raw
Quoted 7 lines · Adrian Bunk

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.

Quoted 6 lines

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.

Quoted 5 lines

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

Signature · 1 line
http://www.codemonkey.org.uk
#2 lore raw
Quoted 10 lines · Dave Jones
Quoted 6 lines · Adrian Bunk

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.

#3 lore raw
Quoted 9 lines · Alexey Dobriyan
Quoted 8 lines · Dave Jones
Quoted 6 lines · Adrian Bunk

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?

Quoted 6 lines
Quoted 2 lines

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

Signature · 1 line
http://www.codemonkey.org.uk
#4 lore raw
In reply to Dave Jones
Quoted 10 lines · Dave Jones
Quoted 7 lines

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

#5 lore raw
Quoted 9 lines · H. Peter Anvin
Quoted 8 lines · Dave Jones
Quoted 7 lines

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?

Quoted 5 lines
Quoted 2 lines

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?

Quoted 1 line

-hpa

cu
Adrian

Signature · 4 lines
       "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
#6 lore raw
Quoted 8 lines · Adrian Bunk

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

Quoted 5 lines

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

#7 lore raw
Quoted 14 lines · H. Peter Anvin
Quoted 12 lines · Adrian Bunk

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

What should be the common value?
4096?

Quoted 7 lines
Quoted 4 lines

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?

Quoted 1 line

-hpa

cu
Adrian

Signature · 4 lines
       "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
#8 lore raw
Quoted 15 lines · Adrian Bunk
Quoted 14 lines · H. Peter Anvin
Quoted 12 lines · Adrian Bunk

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?

Quoted 9 lines
Quoted 1 line

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