Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-02-01 Thread H. Peter Anvin
H. Peter Anvin wrote: dean gaudet wrote: why do we need another kernel cpuid reading method when sched_setaffinity exists and cpuid is available in ring3? Because /dev/cpu/*/cpuid: a) predates sched_setaffinity by quite a few years b) is already widely used c) doesn't have issues with

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-02-01 Thread H. Peter Anvin
dean gaudet wrote: why do we need another kernel cpuid reading method when sched_setaffinity exists and cpuid is available in ring3? Because /dev/cpu/*/cpuid: a) predates sched_setaffinity by quite a few years b) is already widely used c) doesn't have issues with relative priorities (using

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-02-01 Thread dean gaudet
why do we need another kernel cpuid reading method when sched_setaffinity exists and cpuid is available in ring3? -dean -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-02-01 Thread dean gaudet
why do we need another kernel cpuid reading method when sched_setaffinity exists and cpuid is available in ring3? -dean -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-02-01 Thread H. Peter Anvin
dean gaudet wrote: why do we need another kernel cpuid reading method when sched_setaffinity exists and cpuid is available in ring3? Because /dev/cpu/*/cpuid: a) predates sched_setaffinity by quite a few years b) is already widely used c) doesn't have issues with relative priorities (using

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-02-01 Thread H. Peter Anvin
H. Peter Anvin wrote: dean gaudet wrote: why do we need another kernel cpuid reading method when sched_setaffinity exists and cpuid is available in ring3? Because /dev/cpu/*/cpuid: a) predates sched_setaffinity by quite a few years b) is already widely used c) doesn't have issues with

Re: [RFC PATCH 2.6.24] x86: add sysfs interface for cpuid module, try 2

2008-01-30 Thread H. Peter Anvin
Yi Yang wrote: This patch is try 2, it should cover VIA/Cyrix and Transmeta Crusoe, please help to test it if anybody has VIA/Cyrix and Transmeta Crusoe. This patch just makes users get cpuid raw data more conveniently by /sys/devices/syste/cpu/cpu*/cpuid/* without using any userspace

[RFC PATCH 2.6.24] x86: add sysfs interface for cpuid module, try 2

2008-01-30 Thread Yi Yang
This patch is try 2, it should cover VIA/Cyrix and Transmeta Crusoe, please help to test it if anybody has VIA/Cyrix and Transmeta Crusoe. This patch just makes users get cpuid raw data more conveniently by /sys/devices/syste/cpu/cpu*/cpuid/* without using any userspace application. Current cpuid

[RFC PATCH 2.6.24] x86: add sysfs interface for cpuid module, try 2

2008-01-30 Thread Yi Yang
This patch is try 2, it should cover VIA/Cyrix and Transmeta Crusoe, please help to test it if anybody has VIA/Cyrix and Transmeta Crusoe. This patch just makes users get cpuid raw data more conveniently by /sys/devices/syste/cpu/cpu*/cpuid/* without using any userspace application. Current cpuid

Re: [RFC PATCH 2.6.24] x86: add sysfs interface for cpuid module, try 2

2008-01-30 Thread H. Peter Anvin
Yi Yang wrote: This patch is try 2, it should cover VIA/Cyrix and Transmeta Crusoe, please help to test it if anybody has VIA/Cyrix and Transmeta Crusoe. This patch just makes users get cpuid raw data more conveniently by /sys/devices/syste/cpu/cpu*/cpuid/* without using any userspace

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Sam Ravnborg
On Wed, Jan 30, 2008 at 06:22:43AM +0800, Yi Yang wrote: > On Tue, 2008-01-29 at 09:44 +0100, Sam Ravnborg wrote: > > > + > > > +static struct notifier_block __cpuinitdata cpuid_sysfs_cpu_notifier = { > > > + .notifier_call = cpuid_sysfs_cpu_callback, > > > +}; > > Data is annotated _cpuintidata >

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Yi Yang
On Tue, 2008-01-29 at 09:44 +0100, Sam Ravnborg wrote: > > + > > +static struct notifier_block __cpuinitdata cpuid_sysfs_cpu_notifier = { > > + .notifier_call = cpuid_sysfs_cpu_callback, > > +}; > Data is annotated _cpuintidata > > but > > > + > Data is annotated _cpuintidata > > > @@ -217,11

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread H. Peter Anvin
Yi Yang wrote: Function cpuid has reset ecx to 0 immediate before calling to __cpuid, so this shouldn't be a problem now. Unless, of course, you want to get to the information for the higher CPUID levels. The easiest way to fix that would be to use cpuid_count() and let /dev/cpu/*/cpuid

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Yi Yang
On Tue, 2008-01-29 at 23:17 -0800, H. Peter Anvin wrote: > Yi Yang wrote: > >> > >> It's broken, because it doesn't take into account the fact that Intel > >> broke CPUID level 4 and made it "repeating" (neither did the cpuid char > >> device, because it predated the Intel braindamage; I've had

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread H. Peter Anvin
Yi Yang wrote: It's broken, because it doesn't take into account the fact that Intel broke CPUID level 4 and made it "repeating" (neither did the cpuid char device, because it predated the Intel braindamage; I've had a patch for it privately for a while, but didn't push it upstream because

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Yi Yang
On Tue, 2008-01-29 at 07:51 -0800, H. Peter Anvin wrote: > Yi Yang wrote: > > Current cpuid module will create a char device for every logical cpu, > > when a user cats /dev/cpu/*/cpuid, he/she will enter a limitless loop, > > the root cause is that cpuid module doesn't decide wether a cpuid level

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread H. Peter Anvin
Yi Yang wrote: It's broken, because it doesn't take into account the fact that Intel broke CPUID level 4 and made it "repeating" (neither did the cpuid char device, because it predated the Intel braindamage; I've had a patch for it privately for a while, but didn't push it upstream because

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Yi Yang
On Tue, 2008-01-29 at 07:51 -0800, H. Peter Anvin wrote: > Yi Yang wrote: > > Current cpuid module will create a char device for every logical cpu, > > when a user cats /dev/cpu/*/cpuid, he/she will enter a limitless loop, > > the root cause is that cpuid module doesn't decide wether a cpuid level

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread H. Peter Anvin
Yi Yang wrote: Current cpuid module will create a char device for every logical cpu, when a user cats /dev/cpu/*/cpuid, he/she will enter a limitless loop, the root cause is that cpuid module doesn't decide wether a cpuid level is valid, it just uses an offset to denote cpuid level and take it

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Sam Ravnborg
> + > +static struct notifier_block __cpuinitdata cpuid_sysfs_cpu_notifier = { > + .notifier_call = cpuid_sysfs_cpu_callback, > +}; Data is annotated _cpuintidata but > + Data is annotated _cpuintidata > @@ -217,11 +445,14 @@ static void __exit cpuid_exit(void) > { > int cpu = 0; >

[PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Yi Yang
Current cpuid module will create a char device for every logical cpu, when a user cats /dev/cpu/*/cpuid, he/she will enter a limitless loop, the root cause is that cpuid module doesn't decide wether a cpuid level is valid, it just uses an offset to denote cpuid level and take it to cpuid

[PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Yi Yang
Current cpuid module will create a char device for every logical cpu, when a user cats /dev/cpu/*/cpuid, he/she will enter a limitless loop, the root cause is that cpuid module doesn't decide wether a cpuid level is valid, it just uses an offset to denote cpuid level and take it to cpuid

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Sam Ravnborg
+ +static struct notifier_block __cpuinitdata cpuid_sysfs_cpu_notifier = { + .notifier_call = cpuid_sysfs_cpu_callback, +}; Data is annotated _cpuintidata but + Data is annotated _cpuintidata @@ -217,11 +445,14 @@ static void __exit cpuid_exit(void) { int cpu = 0; -

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread H. Peter Anvin
Yi Yang wrote: Current cpuid module will create a char device for every logical cpu, when a user cats /dev/cpu/*/cpuid, he/she will enter a limitless loop, the root cause is that cpuid module doesn't decide wether a cpuid level is valid, it just uses an offset to denote cpuid level and take it

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Yi Yang
On Tue, 2008-01-29 at 07:51 -0800, H. Peter Anvin wrote: Yi Yang wrote: Current cpuid module will create a char device for every logical cpu, when a user cats /dev/cpu/*/cpuid, he/she will enter a limitless loop, the root cause is that cpuid module doesn't decide wether a cpuid level is

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread H. Peter Anvin
Yi Yang wrote: It's broken, because it doesn't take into account the fact that Intel broke CPUID level 4 and made it repeating (neither did the cpuid char device, because it predated the Intel braindamage; I've had a patch for it privately for a while, but didn't push it upstream because

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Yi Yang
On Tue, 2008-01-29 at 23:17 -0800, H. Peter Anvin wrote: Yi Yang wrote: It's broken, because it doesn't take into account the fact that Intel broke CPUID level 4 and made it repeating (neither did the cpuid char device, because it predated the Intel braindamage; I've had a patch for

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread H. Peter Anvin
Yi Yang wrote: It's broken, because it doesn't take into account the fact that Intel broke CPUID level 4 and made it repeating (neither did the cpuid char device, because it predated the Intel braindamage; I've had a patch for it privately for a while, but didn't push it upstream because

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Yi Yang
On Tue, 2008-01-29 at 07:51 -0800, H. Peter Anvin wrote: Yi Yang wrote: Current cpuid module will create a char device for every logical cpu, when a user cats /dev/cpu/*/cpuid, he/she will enter a limitless loop, the root cause is that cpuid module doesn't decide wether a cpuid level is

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Yi Yang
On Tue, 2008-01-29 at 09:44 +0100, Sam Ravnborg wrote: + +static struct notifier_block __cpuinitdata cpuid_sysfs_cpu_notifier = { + .notifier_call = cpuid_sysfs_cpu_callback, +}; Data is annotated _cpuintidata but + Data is annotated _cpuintidata @@ -217,11 +445,14 @@ static

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread Sam Ravnborg
On Wed, Jan 30, 2008 at 06:22:43AM +0800, Yi Yang wrote: On Tue, 2008-01-29 at 09:44 +0100, Sam Ravnborg wrote: + +static struct notifier_block __cpuinitdata cpuid_sysfs_cpu_notifier = { + .notifier_call = cpuid_sysfs_cpu_callback, +}; Data is annotated _cpuintidata but +

Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module

2008-01-29 Thread H. Peter Anvin
Yi Yang wrote: Function cpuid has reset ecx to 0 immediate before calling to __cpuid, so this shouldn't be a problem now. Unless, of course, you want to get to the information for the higher CPUID levels. The easiest way to fix that would be to use cpuid_count() and let /dev/cpu/*/cpuid