Re: [PATCH 2.6.25-rc3] cpuidle: fix cpuidle time and usage overflow

2008-02-25 Thread Yi Yang
On Mon, 2008-02-25 at 11:15 +0100, Ingo Molnar wrote: > * Yi Yang <[EMAIL PROTECTED]> wrote: > > > cpuidle C-state sysfs node time and usage are very easy to overflow > > because they are all of unsigned int type, time will overflow within > > about two hours,

[PATCH 2.6.25-rc3] cpuidle: fix cpuidle time and usage overflow

2008-02-25 Thread Yi Yang
: Yi Yang <[EMAIL PROTECTED]> --- drivers/cpuidle/cpuidle.c |2 +- drivers/cpuidle/sysfs.c | 10 -- include/linux/cpuidle.h |4 ++-- --- a/include/linux/cpuidle.h 2008-02-25 02:31:26.0 -0500 +++ b/include/linux/cpuidle.h 2008-02-25 04:30:24.0 -0500 @@

[PATCH 2.6.25-rc1] cpufreq: fix cpufreq policy refcount imbalance

2008-02-15 Thread Yi Yang
fix a power-off issue to remove kobject_get statement block, but i think that isn't the best way because those code block has existed very long and it is helpful because the successive statements are invoking relevant data. Signed-off-by: Yi Yang <[EMAIL PROTECTED]> --- cpufreq.c

[PATCH 2.6.25-rc1] cpufreq: fix cpufreq policy refcount imbalance

2008-02-15 Thread Yi Yang
fix a power-off issue to remove kobject_get statement block, but i think that isn't the best way because those code block has existed very long and it is helpful because the successive statements are invoking relevant data. Signed-off-by: Yi Yang <[EMAIL PROTECTED]> --- cpufreq.c

[PATCH 2.6.24] Add new string functions strict_strto* and convert kernel params to use them, take 3

2008-02-01 Thread Yi Yang
TED] /]# echo -n 4096 > /sys/module/e1000/parameters/copybreak [EMAIL PROTECTED] /]# cat /sys/module/e1000/parameters/copybreak 4096 [EMAIL PROTECTED] /]# Signed-off-by: Yi Yang <[EMAIL PROTECTED]> --- include/linux/kernel.h |4 + kernel/params.c

[PATCH 2.6.24] Add new string functions strict_strto* and convert kernel params to use them, take 2

2008-01-31 Thread Yi Yang
error: Invalid argument [EMAIL PROTECTED] /]# cat /sys/module/e1000/parameters/copybreak 4096 [EMAIL PROTECTED] /]# echo -n 4096 > /sys/module/e1000/parameters/copybreak [EMAIL PROTECTED] /]# cat /sys/module/e1000/parameters/copybreak 4096 [EMAIL PROTECTED] /]# Signed-off-by: Yi Yang <

Re: [PATCH 2.6.24] Add new string functions real_strtoul and change kernel params to use them

2008-01-31 Thread Yi Yang
On Thu, 2008-01-31 at 09:03 -0800, Randy Dunlap wrote: > On Thu, 31 Jan 2008 09:18:22 +0800 Yi Yang wrote: > > > Currently, for every sysfs node, the callers will be responsible for > > implementing store operation, so many many callers are doing duplicate > > things to v

[PATCH 2.6.24] Add new string functions real_strtoul and change kernel params to use them

2008-01-31 Thread Yi Yang
/]# echo -n 4096 > /sys/module/e1000/parameters/copybreak [EMAIL PROTECTED] /]# cat /sys/module/e1000/parameters/copybreak 4096 [EMAIL PROTECTED] /]# Signed-off-by: Yi Yang <[EMAIL PROTECTED]> --- include/linux/kernel.h |4 kernel/params.c| 20 ++

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

2008-01-30 Thread Yi Yang
0 0x0001 0x2010 [EMAIL PROTECTED] /]# ls /sys/devices/system/cpu/cpu1/cpuid avail_levels cur_cpuid cur_level [EMAIL PROTECTED] /]# Signed-off-by: Yi Yang <[EMAIL PROTECTED]> --- cpuid.c | 255 +++- 1 file changed, 254 ins

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 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 > >>

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 d

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 d

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

2008-01-29 Thread Yi Yang
# Signed-off-by: Yi Yang <[EMAIL PROTECTED]> --- cpuid.c | 233 +++- 1 file changed, 232 insertions(+), 1 deletion(-) --- a/arch/x86/kernel/cpuid.c 2008-01-28 01:28:48.0 +0800 +++ b/arch/x86/kernel/cpuid.c 2008-01-29 06

[PATCH] ACPI: create proc entry 'power' only if C2 or C3 is supported

2008-01-24 Thread Yi Yang
Subject: ACPI: Create proc entry 'power' only C2 or C3 is supported From: Yi Yang <[EMAIL PROTECTED]> ACPI processor idle driver makes sense only if the processor supports C2 or C3. For legacy C0 and C1, just the original pm_idle is working , statistics info about promotion, d

[PATCH 2.6.24-rc8] cpufreq: fix obvious condition statement error

2008-01-23 Thread Yi Yang
te error: Invalid argument [EMAIL PROTECTED] /]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1596000 [EMAIL PROTECTED] /]# echo "1596000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq [EMAIL PROTECTED] /]# echo "2394000" > /sys/devices/system/

Re: [PATCH] ACPI: Add sysfs interface for acpi device wakeup

2008-01-11 Thread Yi Yang
> > I think that it would be much much better to place wake-up attributes under > > corresponding PCI and PNP devices. > > Probably it is even better to link this code to PCI code, so PCI drivers > > will be aware of ACPI. > I like this idea, maxim. :) > And that's what we actually did about half

Re: [PATCH] ACPI: Add sysfs interface for acpi device wakeup

2008-01-10 Thread Yi Yang
On Thu, 2008-01-10 at 09:43 +0200, Maxim Levitsky wrote: > On Thursday, 10 January 2008 00:21:46 Yi Yang wrote: > > Subject: ACPI: convert procfs to sysfs for /proc/acpi/wakeup > > From: Yi Yang <[EMAIL PROTECTED]> > > > > /proc/acpi/wakeup is deprecated but it ha

[PATCH] ACPI: Add sysfs interface for acpi device wakeup

2008-01-09 Thread Yi Yang
Subject: ACPI: convert procfs to sysfs for /proc/acpi/wakeup From: Yi Yang <[EMAIL PROTECTED]> /proc/acpi/wakeup is deprecated but it has to exist because we haven't a sysfs interface to replace it yet, this patch converts /proc/acpi/wakeup to sysfs interface, under every acpi device

[PATCH] ACPI: fix processor limit set error

2008-01-07 Thread Yi Yang
Subject: ACPI: fix processor limit set error From: Yi Yang <[EMAIL PROTECTED]> when echo some invalid values to /proc/acpi/processor/CPU*/limit, it doesn't return any error info, on the contrary, it successes and sets some other values, for example: [EMAIL PROTECTED] /]# echo "0

[PATCH] ACPI: fix processor throttling set error

2008-01-06 Thread Yi Yang
Subject: ACPI: fix processor throttling set error From: Yi Yang <[EMAIL PROTECTED]> When echo some invalid values to /proc/acpi/processor/*/throttling, there isn't any error info returned, on the contray, it sets throttling value to some T* successfully, obviously, this is incorrect

Re: [linux-pm][PATCH] base: Change power/wakeup output from "" to "unsupported" if wakeup feature isn't supported by a device

2008-01-06 Thread Yi Yang
On Mon, 2008-01-07 at 02:57 +0100, Rafael J. Wysocki wrote: > On Monday, 7 of January 2008, Yi Yang wrote: > > On Fri, 2008-01-04 at 08:09 -0800, David Brownell wrote: > > > > > This patch changes empty output to "unsupported" in order that a user > > &g

Re: [linux-pm][PATCH] base: Change power/wakeup output from "" to "unsupported" if wakeup feature isn't supported by a device

2008-01-06 Thread Yi Yang
On Fri, 2008-01-04 at 18:20 +0100, Oliver Neukum wrote: > Am Freitag, 4. Januar 2008 17:52:14 schrieb Olivier Galibert: > > On Fri, Jan 04, 2008 at 11:38:29AM -0500, Alan Stern wrote: > > > How about changing it to say "unavailable"? That doesn't imply > > > permanence. > > > > How about not cha

Re: [linux-pm][PATCH] base: Change power/wakeup output from "" to "unsupported" if wakeup feature isn't supported by a device

2008-01-06 Thread Yi Yang
On Fri, 2008-01-04 at 17:52 +0100, Olivier Galibert wrote: > On Fri, Jan 04, 2008 at 11:38:29AM -0500, Alan Stern wrote: > > How about changing it to say "unavailable"? That doesn't imply > > permanence. > > How about not changing a userland-visible interface gratuitously? "empty" can't tell a u

Re: [linux-pm][PATCH] base: Change power/wakeup output from "" to "unsupported" if wakeup feature isn't supported by a device

2008-01-06 Thread Yi Yang
On Fri, 2008-01-04 at 11:38 -0500, Alan Stern wrote: > On Fri, 4 Jan 2008, David Brownell wrote: > > > > > This patch changes empty output to "unsupported" in order that a user > > > > knows > > > > wakeup feature isn't supported by this device when he/she > > > > 'cat /sys/devices/.../power/wake

Re: [linux-pm][PATCH] base: Change power/wakeup output from "" to "unsupported" if wakeup feature isn't supported by a device

2008-01-06 Thread Yi Yang
On Fri, 2008-01-04 at 08:31 -0800, David Brownell wrote: > > This patch changes empty output to "unsupported" in order that a user knows > > wakeup feature isn't supported by this device when he/she > > 'cat /sys/devices/.../power/wakeup', please consider to apply, thanks. > > I don't much like th

Re: [linux-pm][PATCH] base: Change power/wakeup output from "" to "unsupported" if wakeup feature isn't supported by a device

2008-01-06 Thread Yi Yang
On Fri, 2008-01-04 at 08:09 -0800, David Brownell wrote: > > > This patch changes empty output to "unsupported" in order that a user > > > knows > > > wakeup feature isn't supported by this device when he/she > > > 'cat /sys/devices/.../power/wakeup', please consider to apply, > > > thanks. > > >

Re: [linux-pm][PATCH] base: Change power/wakeup output from "" to "unsupported" if wakeup feature isn't supported by a device

2008-01-06 Thread Yi Yang
On Fri, 2008-01-04 at 12:48 +0100, Pavel Machek wrote: > Hi! > > > If a device can't support wakeup, its /sys/devices/.../power/wakeup output > > is > > empty, this is confusing, a user doesn't know if it supports wakeup feature > > unless he/she read the ralated source code, for this case, it is

[linux-pm][PATCH] base: Change power/wakeup output from "" to "unsupported" if wakeup feature isn't supported by a device

2008-01-04 Thread Yi Yang
27;cat /sys/devices/.../power/wakeup', please consider to apply, thanks. Signed-off-by: Yi Yang <[EMAIL PROTECTED]> --- sysfs.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/base/power/sysfs.c2008-01-04 16:50:54.0 +0800 +++ b/drivers/base/power/sys

[PATCH linux-acpi] fix acpi fan state set error

2008-01-04 Thread Yi Yang
Subject: ACPI: fix acpi fan state set error From: Yi Yang <[EMAIL PROTECTED]> Under /proc/acpi, there is a fan control interface, a user can set 0 or 3 to /proc/acpi/fan/*/state, 0 denotes D0 state, 3 denotes D3 state, but in current implementation, a user can set a fan to D1 state by an

Re: [PATCH linux-acpi] Correct wakeup set error and append a new column PCI ID

2008-01-02 Thread Yi Yang
On Wed, 2008-01-02 at 17:09 +0100, Pavel Machek wrote: > On Wed 2008-01-02 10:03:59, Yi Yang wrote: > > On Wed, 2008-01-02 at 00:20 +0100, Pavel Machek wrote: > > > Hi! > > > > > > > /proc/acpi/wakeup is also case-sensitive, case-insensitive is better. >

Re: [PATCH linux-acpi] Correct wakeup set error and append a new column PCI ID

2008-01-02 Thread Yi Yang
On Wed, 2008-01-02 at 17:09 +0100, Pavel Machek wrote: > On Wed 2008-01-02 10:03:59, Yi Yang wrote: > > On Wed, 2008-01-02 at 00:20 +0100, Pavel Machek wrote: > > > Hi! > > > > > > > /proc/acpi/wakeup is also case-sensitive, case-insensitive is better. >

Re: [PATCH linux-acpi] Correct wakeup set error and append a new column PCI ID

2008-01-01 Thread Yi Yang
On Wed, 2008-01-02 at 00:20 +0100, Pavel Machek wrote: > Hi! > > > /proc/acpi/wakeup is also case-sensitive, case-insensitive is better. > > Why? A user uses device bus id like 'C093' to enable or disable wakeup of the device, for example echo "C093" > /proc/acpi/wakeup but i think "c093" shoul

[PATCH linux-acpi] Correct wakeup set error and append a new column PCI ID

2007-12-29 Thread Yi Yang
Subject: ACPI: Correct wakeup set error and append a new column PCI ID From: Yi Yang <[EMAIL PROTECTED]> The user can't get any information when echo an invalid value to /proc/acpi/wakeup although it is failed, but the user can set /proc/acpi/wakeup successfully if echo an value whose

[PATCH linux-acpi] Remove superfluous code and correct counting error in function acpi_system_write_alarm

2007-12-27 Thread Yi Yang
00:00:00" > /proc/acpi/alarm [EMAIL PROTECTED] ~]# cat /proc/acpi/alarm 2007-12-00 00:00:00 [EMAIL PROTECTED] ~]# echo "-00-00 96:180:180" > /proc/acpi/alarm [EMAIL PROTECTED] ~]# cat /proc/acpi/alarm 0007-12-04 03:03:00 [EMAIL PROTECTED] ~]# Signed-off by Yi Yang <[EMAIL P

[PATCH linux-acpi] Fix /proc/acpi/alarm set error

2007-12-26 Thread Yi Yang
lid argument [EMAIL PROTECTED] /]# Signed-off by Yi Yang <[EMAIL PROTECTED]> diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c index 1538355..fce78fb 100644 --- a/drivers/acpi/sleep/proc.c +++ b/drivers/acpi/sleep/proc.c @@ -178,6 +178,9 @@ static int get_date_field(char *

[PATCH 2.6.23] SysRq: print hotkey info while pressing undef key, try 3

2007-10-18 Thread Yi Yang
TE s Emergency Sync t Show State u Emergency Remount R/O w Show Blocked State Signed-off-by: Yi Yang <[EMAIL PROTECTED]> --- sysrq.c | 38 ++ 1 file changed, 26 insertions(+), 12 deletions(-) --- a/drivers/char/sysrq.

Re: [PATCH 2.6.23] SysRq: print hotkey info while pressing undef key, try 2

2007-10-18 Thread Yi Yang
Frans Pop 写道: > Yi Yang wrote: > >> Hot KeyFunction Description >> === >>0 Changing Loglevel to this value >>1 Changing Loglevel to this value >>2 Changing Loglevel to this value >>3

Re: [PATCH 2.6.23] SysRq: print hotkey info while pressing undef key, try 2

2007-10-18 Thread Yi Yang
[EMAIL PROTECTED] 写道: On Wed, 17 Oct 2007 23:22:58 +0800, Yi Yang said: SysRq has already provided a similiar help before this patch, but it is not so clear that the user doesn't know what happened and what he/she should do. The person is in one of two states: 1) He has been

[PATCH 2.6.23] SysRq: print hotkey info while pressing undef key, try 2

2007-10-17 Thread Yi Yang
ency Remount R/O v Not defined w Show Blocked State x Not defined y Not defined z Not defined Signed-off-by: Yi Yang <[EMAIL PROTECTED]> --- sysrq.c | 38 ++ 1 file changed, 26 insertions(+), 12 deletions(-)

Re: [PATCH 2.6.23] SysRq: print hotkey info while pressing undef key

2007-10-17 Thread Yi Yang
Pavel Machek 写道: Hi! For SysRq, we just can get hot key list from Documentation/sysrq.txt , but in the most of cases, the user can't access it by hand on using SysRq to debug, so it is better for SysRq to provide an online help for the users. SysRq has already provided a similiar help befor

Re: [PATCH 2.6.23] SysRq: print hotkey info while pressing undef key

2007-10-17 Thread Yi Yang
Andreas Schwab 写道: Yi Yang <[EMAIL PROTECTED]> writes: For SysRq, we just can get hot key list from Documentation/sysrq.txt , but in the most of cases, the user can't access it by hand on using SysRq to debug, so it is better for SysRq to provide an online help for the users.

[PATCH 2.6.23] SysRq: print hotkey info while pressing undef key

2007-10-16 Thread Yi Yang
Show Pending Timers ALT+SysRq+rKeyboard mode set to XLATE ALT+SysRq+sEmergency Sync ALT+SysRq+tShow State ALT+SysRq+uEmergency Remount R/O ALT+SysRq+vNot defined ALT+SysRq+wShow Blocked State ALT+SysRq+xNot defined ALT+SysRq+y Not defined ALT+SysRq+zNot defined