Re: [Fwd: Re: long-term regression - Parallel Port broken?]

2007-07-29 Thread david

On Sun, 29 Jul 2007, Bjorn Helgaas wrote:



Could you try the attached patch and collect the dmesg log and contents
of /proc/interrupts?


done, see the files
2.6.22-rc4.interrupts
2.6.22-rc4.dmesg.test
at http://lang.hm/linux


Thanks, but you booted with "pnpacpi=off", so we didn't learn anything.
The port works with "pnpacpi=off" even without the patch.  Somebody
else tried my "disable/init/activate" patch with terrible results, so
that approach will need more work.


Ok, the new versions are there now.


This seems an awful lot like this bug report:
 http://bugzilla.kernel.org/show_bug.cgi?id=5832

Can you take a look at 5832, and maybe we can combine your problem
with that one if you agree they look the same?


yes, it definantly looks like the same thing.

David Lang


Bjorn


-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Fwd: Re: long-term regression - Parallel Port broken?]

2007-07-29 Thread david

On Sun, 29 Jul 2007, Bjorn Helgaas wrote:


of /proc/interrupts?


done, see the files
2.6.22-rc4.interrupts
2.6.22-rc4.dmesg.test
at http://lang.hm/linux


Thanks, but you booted with "pnpacpi=off", so we didn't learn anything.
The port works with "pnpacpi=off" even without the patch.  Somebody
else tried my "disable/init/activate" patch with terrible results, so
that approach will need more work.


I did?? I thought I had changed that.

Ok, I'll try again.

David Lang


This seems an awful lot like this bug report:
 http://bugzilla.kernel.org/show_bug.cgi?id=5832

Can you take a look at 5832, and maybe we can combine your problem
with that one if you agree they look the same?

Bjorn


-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Fwd: Re: long-term regression - Parallel Port broken?]

2007-07-29 Thread Bjorn Helgaas
On Sunday 29 July 2007 07:22:41 pm [EMAIL PROTECTED] wrote:
> On Tue, 24 Jul 2007, Bjorn Helgaas wrote:
> 
> > On Saturday 21 July 2007 08:09:11 pm [EMAIL PROTECTED] wrote:
> >> On Fri, 6 Jul 2007, Bjorn Helgaas wrote:
> >>> Ultimately, you should have CONFIG_ACPI=y and CONFIG_PNPACPI=y, and you
> >>> should not have to boot with "noisapnp" or "pnpacpi=off".  My guess is
> >>> that you only need "pnpacpi=off" to work around the current problem.
> >>
> >> these two options are enabled and pnpacpi=off does solve the problem.
> >> ...
> >> there's now a dmesg.pnpacpi_off which works, and you are correct that the
> >> dmesg that's there is the non working one.
> >
> > Thanks.  Here's what I glean from that.  With no arguments, it doesn't work:
> >
> >parport_pc 00:0a: reported by Plug and Play ACPI
> >parport0: PC-style at 0x378 (0x778), irq 7, dma 3 
> > [PCSPP,TRISTATE,COMPAT,ECP,DMA]
> >parport0: Printer, Brother HL-5040 series
> >lp0: using parport0 (interrupt-driven).
> >
> > With pnpacpi=off, it works:
> >
> >parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
> >parport0: irq 7 detected
> >parport0: Printer, Brother HL-5040 series
> >lp0: using parport0 (polling).
> >
> > With pnpacpi=off, or a kernel without PNPACPI, we just probe at 0x378
> > and use the port in polling mode, and it works.
> >
> > PNPACPI claims the device supports interrupts, so we try to use it in
> > interrupt mode, and it doesn't work.  It's possible that ACPI is lying
> > to us, and the interrupt really doesn't work.  Or maybe the interrupt
> > *does* work, but the BIOS left it half-configured.
> >
> > Could you try the attached patch and collect the dmesg log and contents
> > of /proc/interrupts?
> 
> done, see the files
> 2.6.22-rc4.interrupts
> 2.6.22-rc4.dmesg.test
> at http://lang.hm/linux

Thanks, but you booted with "pnpacpi=off", so we didn't learn anything.
The port works with "pnpacpi=off" even without the patch.  Somebody
else tried my "disable/init/activate" patch with terrible results, so
that approach will need more work.

This seems an awful lot like this bug report:
  http://bugzilla.kernel.org/show_bug.cgi?id=5832

Can you take a look at 5832, and maybe we can combine your problem
with that one if you agree they look the same?

Bjorn
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Update: ide problems: 2.6.22-git17 working, 2.6.23-rc1* is not:

2007-07-29 Thread Danny ter Haar
Quoting Gabriel C ([EMAIL PROTECTED]):
> Now while we think is ACPI this should be easy for you to bisect.
> This commit 
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=39804b20f62532fa05c2a8c3e2d1ae551fd0327b
> merged ACPI so this one should be your first bad one.
> Maybe Len has some idea and you don't need to bisect :)

Thanks to personal coaching of Gabriel i bisected the last few days.

It looked like this was the cullprit:

22aadf8a07067644e101267ed5003043f2ad05bf is first bad commit

2.6.23-rc1-git[1-6] all lockup solid after either direct or
within a couple of minutes (less than 2) after reboot.

They all run fine with "acpi=off" as boot argument.


However, i'm currently running 2.6.23-rc1-git6 with this reverted:

diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 
b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 18c8b67..6f846be 100644 (file)
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -665,8 +665,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy 
*policy)
data->max_freq = perf->states[0].core_frequency * 1000;
/* table init */
for (i=0; istate_count; i++) {
-   if (i>0 && perf->states[i].core_frequency ==
-   perf->states[i-1].core_frequency)
+   if (i>0 && perf->states[i].core_frequency >=
+   data->freq_table[valid_states-1].frequency / 1000)
continue;

---

I could hardly believe this could be the cause.
And indeed after about 16 minutes the kernel froze again, though longer
uptime than other kernels :-(

This hardware is a via epia 5000 with latest bios available (2.07)

It's remarkable that with acpi=off the machine is rocksolid.
As is with 2.6.22* kernels _with_ acpi enabled!
weeks of uptime before i wanted to upgrade to a new kernel ;-)

I'm thinking of redoing the git disect but this time really powercycle
the unit between kernels since it "seems/feels" like a timer which 
really counts to 0 and then locks the machine. 
After a lockup/freeze i cant boot the kernel another time with acpi 
enabled: it will simply hang after booting init.
And again nobody home: no keyboard activity whatsoever.

I've put the dmesg of 2.6.23-rc1-git6 with and without acpi=off online:
http://www.dth.net/kernel/via_output_2.6.23-rc1-git6-acpi_off
http://www.dth.net/kernel/via_output_2.6.23-rc1-git6-acpi_on

I would like to hear if someone has an idea how to tackle this problem.

Danny
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] Introduce CONFIG_SUSPEND

2007-07-29 Thread Kyle Moffett

On Jul 29, 2007, at 17:30:40, Richard Hughes wrote:

So are you guys using:

"standby" = idle state, ~0.5 seconds
"suspend" = sleep to ram, ~10 seconds
"hibernate" = sleep to disk, ~30 seconds

If so - you rock. This is the common nomenclature I've been pushing  
for
a few months now in GNOME, KDE and general userspace. I've written  
up a

spec here:
http://cvs.gnome.org/viewcvs/*checkout*/gnome-power-manager/docs/ 
sleep-names.html


Well, those times don't quite work for my PowerBook.  If we fixed  
suspend-to-RAM to reinitialize devices in parallel then it would  
easily hit 0.5 second transition times, but even now it's only at  
most 2 seconds.  Also once in a while I'll be too hasty plugging my  
USB devices and manage to hardlock one of the USB busses, but that's  
an isolated USB driver suspend issue.


And it's certainly not called "standby", because the box can  
literally remain asleep for 7 days on a full charge, versus about 5  
hours when just idle with wireless, backlight, and HDD off.


Cheers,
Kyle Moffett
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Fwd: Re: long-term regression - Parallel Port broken?]

2007-07-29 Thread david

On Tue, 24 Jul 2007, Bjorn Helgaas wrote:


On Saturday 21 July 2007 08:09:11 pm [EMAIL PROTECTED] wrote:

On Fri, 6 Jul 2007, Bjorn Helgaas wrote:

Ultimately, you should have CONFIG_ACPI=y and CONFIG_PNPACPI=y, and you
should not have to boot with "noisapnp" or "pnpacpi=off".  My guess is
that you only need "pnpacpi=off" to work around the current problem.


these two options are enabled and pnpacpi=off does solve the problem.
...
there's now a dmesg.pnpacpi_off which works, and you are correct that the
dmesg that's there is the non working one.


Thanks.  Here's what I glean from that.  With no arguments, it doesn't work:

   parport_pc 00:0a: reported by Plug and Play ACPI
   parport0: PC-style at 0x378 (0x778), irq 7, dma 3 
[PCSPP,TRISTATE,COMPAT,ECP,DMA]
   parport0: Printer, Brother HL-5040 series
   lp0: using parport0 (interrupt-driven).

With pnpacpi=off, it works:

   parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
   parport0: irq 7 detected
   parport0: Printer, Brother HL-5040 series
   lp0: using parport0 (polling).

With pnpacpi=off, or a kernel without PNPACPI, we just probe at 0x378
and use the port in polling mode, and it works.

PNPACPI claims the device supports interrupts, so we try to use it in
interrupt mode, and it doesn't work.  It's possible that ACPI is lying
to us, and the interrupt really doesn't work.  Or maybe the interrupt
*does* work, but the BIOS left it half-configured.

Could you try the attached patch and collect the dmesg log and contents
of /proc/interrupts?


done, see the files
2.6.22-rc4.interrupts
2.6.22-rc4.dmesg.test
at http://lang.hm/linux

David Lang


Thanks,
 Bjorn

Index: w/drivers/pnp/pnpacpi/core.c
===
--- w.orig/drivers/pnp/pnpacpi/core.c   2007-07-24 15:05:25.0 -0600
+++ w/drivers/pnp/pnpacpi/core.c2007-07-24 15:29:50.0 -0600
@@ -216,6 +216,13 @@
pnp_add_device(dev);
num ++;

+   if (dev->active) {
+   printk("%s: configuring %s (%s)\n", __FUNCTION__, dev->dev.bus_id, 
dev_id->id);
+   pnp_disable_dev(dev);
+   pnp_init_resource_table(&dev->res);
+   pnp_activate_dev(dev);
+   }
+
return AE_OK;
err1:
kfree(dev_id);


-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Frequency scaling, Dell Inspiron 6000

2007-07-29 Thread Matthew Garrett
On Sun, Jul 29, 2007 at 04:03:31PM +0200, Sune Mølgaard wrote:

> The CPU of the machine is labeled as centrino compliant, but is in fact 
> a Celeron-M, and hence does not support _Enhanced_ Speedstep. However, I 
> clearly remember having frequency scaling working with Ubuntu kernel 
> 2.6.15, but failing with Ubuntu 2.6.17 (possibly with some 2.6.18 code 
> backported).

It doesn't support Speedstep at all. You were probably using p4-clockmod 
in the past, which is a mechanism for temperature control rather than 
any sort of useful power saving.

-- 
Matthew Garrett | [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC PATCH] report acpi video hot key event through input device

2007-07-29 Thread Matthew Garrett
On Sun, Jul 29, 2007 at 12:40:16PM -0400, Luming Yu wrote:
>   switch (event) {
>   case ACPI_VIDEO_NOTIFY_SWITCH:  /* User requested a switch,
>* most likely via hotkey. */
>   acpi_bus_generate_event(device, event, 0);
> + keycode = KEY_UNKNOWN;

KEY_SWITCHVIDEOMODE ?

> 
>   case ACPI_VIDEO_NOTIFY_PROBE:   /* User plugged in or removed a video
> @@ -1734,21 +1741,37 @@ static void acpi_video_bus_notify(acpi_h
>   acpi_video_device_rebind(video);
>   acpi_video_switch_output(video, event);
>   acpi_bus_generate_event(device, event, 0);
> + keycode = KEY_UNKNOWN;
>   break;

Here too.

>   case ACPI_VIDEO_NOTIFY_SWITCH:  /* change in status (cycle output 
> device) */
>   case ACPI_VIDEO_NOTIFY_PROBE:   /* change in status (output device 
> status) */
>   acpi_bus_generate_event(device, event, 0);
> + keycode = KEY_UNKNOWN;
>   break;

And these? I'm not sure in this case, though.

> +#define KEY_VIDEO_NEXT   0x1f9
> +#define KEY_VIDEO_PREV   0x1fa
> +#define KEY_BRIGHTNESS_UP0x1fb
> +#define KEY_BRIGHTNESS_DOWN  0x1fc

What's wrong with the existing KEY_BRIGHTNESSDOWN and KEY_BRIGHTNESSUP?

> +#define KEY_BRIGHTNESS_ZERO  0x1fd
> +#define KEY_BRIGHTNESS_OFF   0x1fe

You almost certainly want to go via linux-input if you're adding new 
keycodes.

-- 
Matthew Garrett | [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/2] Introduce CONFIG_HIBERNATION and CONFIG_SUSPEND (updated)

2007-07-29 Thread Linus Torvalds


Ok, I took this, and modified Len's patch to re-introduce ACPI_SLEEP on 
top of it (I took the easy way out, and just made PM_SLEEP imply 
ACPI_SLEEP, which should make everything come out right. I could have 
dropped ACPI_SLEEP entirely in favour of PM_SLEEP, but that would have 
implied changing more of Len's patch than I was really comfy with).

Len, Rafael, please do check that the end result looks ok. 

I suspect ACPI could now take the PM_SLEEP/SUSPEND/HIBERNATE details into 
account, and that some of the code is not necessary when HIBERNATE is not 
selected, for example, but I'm not at all sure that it's worth it being 
very fine-grained.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] Introduce CONFIG_SUSPEND

2007-07-29 Thread Rafael J. Wysocki
On Sunday, 29 July 2007 23:30, Richard Hughes wrote:
> On Sun, 2007-07-29 at 23:36 +0200, Rafael J. Wysocki wrote:
> > On Sunday, 29 July 2007 23:18, Adrian Bunk wrote:
> > > On Sun, Jul 29, 2007 at 11:17:20PM +0200, Rafael J. Wysocki wrote:
> > > > On Sunday, 29 July 2007 22:40, Adrian Bunk wrote:
> > > > > On Sun, Jul 29, 2007 at 02:38:05PM +0200, Rafael J. Wysocki wrote:
> > > > > >...
> > > > > > +config SUSPEND
> > > > > > +   bool "Suspend"
> > > > >  "Suspend to RAM"
> > > > 
> > > > Not only.  This also includes "standby".
> > > 
> > > Whatever it includes - please tell it to the user in the prompt.
> > > 
> > > Technical issues are important, but it's often forgotten how many 
> > > problems people run into because the description of a kconfig option 
> > > could have been better.
> > 
> > Sure.  Please see the updated patch I've just sent. :-)
> 
> So are you guys using:
> 
> "standby" = idle state, ~0.5 seconds
> "suspend" = sleep to ram, ~10 seconds
> "hibernate" = sleep to disk, ~30 seconds

Something like this, but "suspend" is not reserved as a name of specific state.

The second state is usually referred to as "suspend to RAM" or "STR" and is
denoted by "mem" in /sys/power/state, if implemented.  Moreover, "standby" and
"mem" are both entered using the same code path, so they may generally be
referred to as "suspend" states.

The times aren't strictly defined for "mem" and "standby", too.  The general
rule is that the times for "mem" are greater then for "standby" and the power
drawn in "mem" is smaller than the power drawn in "standby", but the exact
values will always depend on the platform.  Apart from this, if the platform
supports only one "suspend" state, it decides if that's "mem" or "standby".

On ACPI systems "standby" and "mem" correspond to the S1 and S3 sleep states,
respectively.

Greetings,
Rafael
 

-- 
"Premature optimization is the root of all evil." - Donald Knuth
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] Introduce CONFIG_SUSPEND

2007-07-29 Thread Richard Hughes
On Sun, 2007-07-29 at 23:36 +0200, Rafael J. Wysocki wrote:
> On Sunday, 29 July 2007 23:18, Adrian Bunk wrote:
> > On Sun, Jul 29, 2007 at 11:17:20PM +0200, Rafael J. Wysocki wrote:
> > > On Sunday, 29 July 2007 22:40, Adrian Bunk wrote:
> > > > On Sun, Jul 29, 2007 at 02:38:05PM +0200, Rafael J. Wysocki wrote:
> > > > >...
> > > > > +config SUSPEND
> > > > > + bool "Suspend"
> > > >  "Suspend to RAM"
> > > 
> > > Not only.  This also includes "standby".
> > 
> > Whatever it includes - please tell it to the user in the prompt.
> > 
> > Technical issues are important, but it's often forgotten how many 
> > problems people run into because the description of a kconfig option 
> > could have been better.
> 
> Sure.  Please see the updated patch I've just sent. :-)

So are you guys using:

"standby" = idle state, ~0.5 seconds
"suspend" = sleep to ram, ~10 seconds
"hibernate" = sleep to disk, ~30 seconds

If so - you rock. This is the common nomenclature I've been pushing for
a few months now in GNOME, KDE and general userspace. I've written up a
spec here:
http://cvs.gnome.org/viewcvs/*checkout*/gnome-power-manager/docs/sleep-names.html

Richard.


-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] Introduce CONFIG_SUSPEND

2007-07-29 Thread Rafael J. Wysocki
On Sunday, 29 July 2007 23:18, Adrian Bunk wrote:
> On Sun, Jul 29, 2007 at 11:17:20PM +0200, Rafael J. Wysocki wrote:
> > On Sunday, 29 July 2007 22:40, Adrian Bunk wrote:
> > > On Sun, Jul 29, 2007 at 02:38:05PM +0200, Rafael J. Wysocki wrote:
> > > >...
> > > > +config SUSPEND
> > > > +   bool "Suspend"
> > >  "Suspend to RAM"
> > 
> > Not only.  This also includes "standby".
> 
> Whatever it includes - please tell it to the user in the prompt.
> 
> Technical issues are important, but it's often forgotten how many 
> problems people run into because the description of a kconfig option 
> could have been better.

Sure.  Please see the updated patch I've just sent. :-)

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION (updated)

2007-07-29 Thread Rafael J. Wysocki
From: Rafael J. Wysocki <[EMAIL PROTECTED]>

Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION to avoid confusion
(among other things, with CONFIG_SUSPEND introduced in the next patch).

Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
---
 arch/i386/Kconfig.debug |4 ++--
 arch/i386/kernel/e820.c |2 +-
 arch/i386/mm/init.c |2 +-
 arch/i386/power/Makefile|2 +-
 arch/powerpc/Kconfig.debug  |2 +-
 arch/powerpc/configs/lite5200_defconfig |2 +-
 arch/powerpc/configs/pmac32_defconfig   |2 +-
 arch/powerpc/kernel/Makefile|6 +++---
 arch/ppc/configs/TQM8540_defconfig  |2 +-
 arch/ppc/configs/TQM8541_defconfig  |2 +-
 arch/ppc/configs/TQM8555_defconfig  |2 +-
 arch/ppc/configs/TQM8560_defconfig  |2 +-
 arch/ppc/configs/ev64360_defconfig  |2 +-
 arch/ppc/configs/ml300_defconfig|2 +-
 arch/ppc/configs/ml403_defconfig|2 +-
 arch/ppc/configs/mpc834x_sys_defconfig  |2 +-
 arch/ppc/configs/prep_defconfig |2 +-
 arch/sparc64/Kconfig.debug  |2 +-
 arch/x86_64/defconfig   |2 +-
 arch/x86_64/kernel/Makefile |2 +-
 arch/x86_64/kernel/suspend.c|4 ++--
 drivers/acpi/sleep/main.c   |6 +++---
 drivers/acpi/sleep/proc.c   |2 +-
 drivers/i2c/chips/tps65010.c|2 +-
 include/asm-i386/e820.h |2 +-
 include/linux/suspend.h |8 
 kernel/power/Kconfig|6 +++---
 kernel/power/Makefile   |2 +-
 kernel/power/main.c |2 +-
 kernel/power/power.h|2 +-
 kernel/sys.c|2 +-
 mm/Kconfig  |4 ++--
 mm/swapfile.c   |6 +++---
 33 files changed, 47 insertions(+), 47 deletions(-)

Index: linux-2.6/arch/i386/Kconfig.debug
===
--- linux-2.6.orig/arch/i386/Kconfig.debug  2007-05-10 21:34:50.0 
+0200
+++ linux-2.6/arch/i386/Kconfig.debug   2007-07-29 18:49:05.0 +0200
@@ -36,11 +36,11 @@ config DEBUG_STACK_USAGE
  This option will slow down process creation somewhat.
 
 comment "Page alloc debug is incompatible with Software Suspend on i386"
-   depends on DEBUG_KERNEL && SOFTWARE_SUSPEND
+   depends on DEBUG_KERNEL && HIBERNATION
 
 config DEBUG_PAGEALLOC
bool "Debug page memory allocations"
-   depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND && !HUGETLBFS
+   depends on DEBUG_KERNEL && !HIBERNATION && !HUGETLBFS
help
  Unmap pages from the kernel linear mapping after free_pages().
  This results in a large slowdown, but helps to find certain types
Index: linux-2.6/arch/i386/kernel/e820.c
===
--- linux-2.6.orig/arch/i386/kernel/e820.c  2007-07-27 21:34:36.0 
+0200
+++ linux-2.6/arch/i386/kernel/e820.c   2007-07-29 18:49:05.0 +0200
@@ -321,7 +321,7 @@ static int __init request_standard_resou
 
 subsys_initcall(request_standard_resources);
 
-#if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND)
+#if defined(CONFIG_PM) && defined(CONFIG_HIBERNATION)
 /**
  * e820_mark_nosave_regions - Find the ranges of physical addresses that do not
  * correspond to e820 RAM areas and mark the corresponding pages as nosave for
Index: linux-2.6/arch/i386/mm/init.c
===
--- linux-2.6.orig/arch/i386/mm/init.c  2007-07-27 21:34:36.0 +0200
+++ linux-2.6/arch/i386/mm/init.c   2007-07-29 18:49:05.0 +0200
@@ -432,7 +432,7 @@ static void __init pagetable_init (void)
paravirt_pagetable_setup_done(pgd_base);
 }
 
-#if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI)
+#if defined(CONFIG_HIBERNATION) || defined(CONFIG_ACPI)
 /*
  * Swap suspend & friends need this for resume because things like the 
intel-agp
  * driver might have split up a kernel 4MB mapping.
Index: linux-2.6/arch/i386/power/Makefile
===
--- linux-2.6.orig/arch/i386/power/Makefile 2007-05-10 21:34:50.0 
+0200
+++ linux-2.6/arch/i386/power/Makefile  2007-07-29 18:49:05.0 +0200
@@ -1,2 +1,2 @@
 obj-$(CONFIG_PM)   += cpu.o
-obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o suspend.o
+obj-$(CONFIG_HIBERNATION)  += swsusp.o suspend.o
Index: linux-2.6/arch/powerpc/Kconfig.debug
===
--- linux-2.6.orig/arch/powerpc/Kconfig.debug   2007-07-27 21:34:36.0 
+0200
+++ linux-2.6/arch/powerpc/Kconfig.debug2007-07-29 18:49:05.0 
+0200
@@ -20,7 +20,7 @@ config DEBUG_STACK_USAGE
 
 config DEBU

[PATCH 2/2] Introduce CONFIG_SUSPEND (updated)

2007-07-29 Thread Rafael J. Wysocki
From: Rafael J. Wysocki <[EMAIL PROTECTED]>

Introduce CONFIG_SUSPEND representing the ability to enter system sleep states,
such as the ACPI S3 state, and allow the user to choose SUSPEND and HIBERNATION
independently of each other.

Make HOTPLUG_CPU be selected automatically if SUSPEND or HIBERNATION has been
chosen and the kernel is intended for SMP systems.

Also, introduce CONFIG_PM_SLEEP which is automatically selected if
CONFIG_SUSPEND or CONFIG_HIBERNATION is set and use it to select the code
needed for both suspend and hibernation.

The top-level power management headers and the ACPI code related to suspend and
hibernation are modified to use the new definitions (the changes in
drivers/acpi/sleep/main.c are, mostly, moving code to reduce the number of
ifdefs).  Still, there are many other files in which CONFIG_PM can be replaced
with CONFIG_PM_SLEEP or even with CONFIG_SUSPEND, but they can be updated in
the future.

Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
---
 drivers/acpi/Kconfig|8 +++
 drivers/acpi/sleep/Makefile |2 
 drivers/acpi/sleep/main.c   |   94 +++-
 drivers/acpi/sleep/proc.c   |   10 ++--
 drivers/acpi/sleep/sleep.h  |2 
 drivers/base/power/Makefile |2 
 drivers/base/power/power.h  |4 -
 include/acpi/acpi_bus.h |9 
 include/acpi/acpi_drivers.h |4 +
 include/linux/freezer.h |6 +-
 include/linux/pm.h  |   15 +--
 include/linux/suspend.h |   10 ++--
 kernel/power/Kconfig|   39 ++
 kernel/power/Makefile   |3 -
 kernel/power/main.c |   26 
 kernel/power/power.h|   10 
 mm/page_alloc.c |4 -
 17 files changed, 163 insertions(+), 85 deletions(-)

Index: linux-2.6/kernel/power/Kconfig
===
--- linux-2.6.orig/kernel/power/Kconfig 2007-07-29 19:06:26.0 +0200
+++ linux-2.6/kernel/power/Kconfig  2007-07-29 19:06:48.0 +0200
@@ -46,7 +46,7 @@ config PM_VERBOSE
 
 config DISABLE_CONSOLE_SUSPEND
bool "Keep console(s) enabled during suspend/resume (DANGEROUS)"
-   depends on PM_DEBUG
+   depends on PM_DEBUG && PM_SLEEP
default n
---help---
This option turns off the console suspend mechanism that prevents
@@ -57,7 +57,7 @@ config DISABLE_CONSOLE_SUSPEND
 
 config PM_TRACE
bool "Suspend/resume event tracing"
-   depends on PM_DEBUG && X86 && EXPERIMENTAL
+   depends on PM_DEBUG && X86 && PM_SLEEP && EXPERIMENTAL
default n
---help---
This enables some cheesy code to save the last PM event point in the
@@ -72,9 +72,37 @@ config PM_TRACE
CAUTION: this option will cause your machine's real-time clock to be
set to an invalid time after a resume.
 
+config SUSPEND_SMP_POSSIBLE
+   bool
+   depends on (X86 && !X86_VOYAGER) || (PPC64 && (PPC_PSERIES || PPC_PMAC))
+   depends on SMP
+   default y
+
+config SUSPEND_SMP
+   bool
+   depends on SUSPEND_SMP_POSSIBLE && PM_SLEEP
+   select HOTPLUG_CPU
+   default y
+
+config PM_SLEEP
+   bool
+   depends on SUSPEND || HIBERNATION
+   default y
+
+config SUSPEND
+   bool "Suspend to RAM and standby"
+   depends on PM
+   depends on !SMP || SUSPEND_SMP_POSSIBLE
+   default y
+   ---help---
+ Allow the system to enter sleep states in which main memory is
+ powered and thus its contents are preserved, such as the
+ suspend-to-RAM state (i.e. the ACPI S3 state).
+
 config HIBERNATION
bool "Hibernation"
-   depends on PM && SWAP && (((X86 || PPC64_SWSUSP) && (!SMP || 
SUSPEND_SMP)) || ((FRV || PPC32) && !SMP))
+   depends on PM && SWAP
+   depends on ((X86 || PPC64_SWSUSP || FRV || PPC32) && !SMP) || 
SUSPEND_SMP_POSSIBLE
---help---
  Enable the suspend to disk (STD) functionality, which is usually
  called "hibernation" in user interfaces.  STD checkpoints the
@@ -132,11 +160,6 @@ config PM_STD_PARTITION
  suspended image to. It will simply pick the first available swap 
  device.
 
-config SUSPEND_SMP
-   bool
-   depends on HOTPLUG_CPU && (X86 || PPC64) && PM
-   default y
-
 config APM_EMULATION
tristate "Advanced Power Management Emulation"
depends on PM && SYS_SUPPORTS_APM_EMULATION
Index: linux-2.6/kernel/power/Makefile
===
--- linux-2.6.orig/kernel/power/Makefile2007-07-29 19:06:26.0 
+0200
+++ linux-2.6/kernel/power/Makefile 2007-07-29 19:06:48.0 +0200
@@ -3,8 +3,9 @@ ifeq ($(CONFIG_PM_DEBUG),y)
 EXTRA_CFLAGS   +=  -DDEBUG
 endif
 
-obj-y  := main.o process.o console.o
+obj-y  := main.o
 obj-$(CONFIG_PM_LEGACY)+= pm.o
+obj-$(CONFIG_PM_SLEEP) += process.o c

[PATCH 0/2] Introduce CONFIG_HIBERNATION and CONFIG_SUSPEND (updated)

2007-07-29 Thread Rafael J. Wysocki
On Sunday, 29 July 2007 12:20, Rafael J. Wysocki wrote:
> On Saturday, 28 July 2007 20:31, Linus Torvalds wrote:
> > 
> > On Sat, 28 Jul 2007, Rafael J. Wysocki wrote:
> > > 
> > > OK, I'll prepare a patch to introduce CONFIG_SUSPEND, but that will 
> > > require
> > > quite a bit of (compilation) testing on different architectures.
> > 
> > Sure. I'm not too worried, the fallout should be of the trivial kind. 
> >
> > Also, mind basing it on the (independent) cleanups that Adrian already 
> > sent out. This is all intertwined..
> 
> OK, it took more time than I had hoped, but I wanted CONFIG_HIBERNATION and
> CONFIG_SUSPEND to be really independent of each other.
> 
> The two patches in the next messages implement the idea:
> * replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION
> * introduce CONFIG_SUSPEND that selects CONFIG_HOTPLUG_CPU, if necessary,
>   and make it possible to choose suspend and hibernation independently of each
>   other.

Unfortunately, the patches that I have posted are against 2.6.23-rc1 with the
suspend and hibernation patchset applied
(http://www.sisk.pl/kernel/hibernation_and_suspend/2.6.23-rc1/patches/) .

Sorry for that.

The corresponding patches on top of the current -git are in the next two
messages.

They do the following:
* replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION
* introduce CONFIG_SUSPEND that selects CONFIG_HOTPLUG_CPU, if necessary,
  and make it possible to choose suspend and hibernation independently of each
  other
* update the top-level PM-related headers and the ACPI code related to suspend
  and hibernation to use the new definitions

Greetings,
Rafael

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] Introduce CONFIG_SUSPEND

2007-07-29 Thread Adrian Bunk
On Sun, Jul 29, 2007 at 11:17:20PM +0200, Rafael J. Wysocki wrote:
> On Sunday, 29 July 2007 22:40, Adrian Bunk wrote:
> > On Sun, Jul 29, 2007 at 02:38:05PM +0200, Rafael J. Wysocki wrote:
> > >...
> > > +config SUSPEND
> > > + bool "Suspend"
> >  "Suspend to RAM"
> 
> Not only.  This also includes "standby".

Whatever it includes - please tell it to the user in the prompt.

Technical issues are important, but it's often forgotten how many 
problems people run into because the description of a kconfig option 
could have been better.

> > >...
> > >  config HIBERNATION
> > >   bool "Hibernation"
> > >... "Hibernation (Suspend to disk)"
> > 
> > cu
> > Adrian
> 
> Greetings,
> Rafael
> 
> 
> -- 
> "Premature optimization is the root of all evil." - Donald Knuth

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

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] Introduce CONFIG_SUSPEND

2007-07-29 Thread Rafael J. Wysocki
On Sunday, 29 July 2007 22:40, Adrian Bunk wrote:
> On Sun, Jul 29, 2007 at 02:38:05PM +0200, Rafael J. Wysocki wrote:
> >...
> > +config SUSPEND
> > +   bool "Suspend"
>  "Suspend to RAM"

Not only.  This also includes "standby".

> >...
> >  config HIBERNATION
> > bool "Hibernation"
> >... "Hibernation (Suspend to disk)"
> 
> cu
> Adrian

Greetings,
Rafael


-- 
"Premature optimization is the root of all evil." - Donald Knuth
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] Introduce CONFIG_SUSPEND

2007-07-29 Thread Adrian Bunk
On Sun, Jul 29, 2007 at 02:38:05PM +0200, Rafael J. Wysocki wrote:
>...
> +config SUSPEND
> + bool "Suspend"
 "Suspend to RAM"
>...
>  config HIBERNATION
>   bool "Hibernation"
>... "Hibernation (Suspend to disk)"

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

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: ACPI on Averatec 2370

2007-07-29 Thread Frank Hale
Your work around seems to do the trick. I took out SMP support, added
ACPI and now it boots normally.

On 7/29/07, Frank Hale <[EMAIL PROTECTED]> wrote:
> > Frank, can you try a non-SMP build with ACPI and see if you still have the
> > problem?
>
> I certainly will, I never tried it without it so now I am curious.
> Thanks a bunch!
>
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: ACPI on Averatec 2370

2007-07-29 Thread Cal Peake
On Sun, 29 Jul 2007, Gabriel C wrote:

> Frank Hale wrote:
> [ added  linux-acpi to CC ]
> > I have an Averatec 2370 laptop with the nVidia MCP51. With kernel
> > 2.6.20 I had no issues with ACPI however with 2.6.21 and higher the
> > kernel will hang on boot until I press the suspend button or the power
> > button in which case the kernel wakes up and finishes the boot
> > process. Including the following support only causes the issue:
> > 
> >  [*] ACPI Support
> > 
> > What I mean by that is every ACPI option has been deactivated and only
> > ACPI support checked. The boot process with 2.6.21 and higher hangs at
> > the point where the Scheduler is being registered.
> > 
> > io scheduler cfq registered (default)
> > 
> > If I allow it to sit there it never comes back to life and finishes
> > booting. If I press the power or suspend button it will finish booting
> > as expected.
> > 
> > I've scoured google for quite a while but cannot find any relevant
> > information pertaining to this issue. For now I've disabled ACPI
> > altogether.

Hi Frank et al.

Same laptop (well 2371 actually - same hardware though), same issue. In my 
testing I've determined that SMP is influential on it hanging up. Building 
my same config with SMP disabled causes the hang to go away. Same with the 
Slackware 12 default kernels, 2.6.21.5 is OK, 2.6.21.5-smp hangs.

Frank, can you try a non-SMP build with ACPI and see if you still have the 
problem?

I've tried so many different option combos I don't remember if I've done 
one with SMP and w/o ACPI but I'll try that sometime today. Haven't tried 
ACPI debugging yet either so we'll see if that shows anything. Maybe we 
can narrow it down to something with ACPI and SMP.

Cheers,
-- 
Cal Peake

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: ACPI on Averatec 2370

2007-07-29 Thread Frank Hale
> Frank, can you try a non-SMP build with ACPI and see if you still have the
> problem?

I certainly will, I never tried it without it so now I am curious.
Thanks a bunch!
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: ACPI on Averatec 2370

2007-07-29 Thread Gabriel C
Frank Hale wrote:
[ added  linux-acpi to CC ]
> I have an Averatec 2370 laptop with the nVidia MCP51. With kernel
> 2.6.20 I had no issues with ACPI however with 2.6.21 and higher the
> kernel will hang on boot until I press the suspend button or the power
> button in which case the kernel wakes up and finishes the boot
> process. Including the following support only causes the issue:
> 
>  [*] ACPI Support
> 
> What I mean by that is every ACPI option has been deactivated and only
> ACPI support checked. The boot process with 2.6.21 and higher hangs at
> the point where the Scheduler is being registered.
> 
> io scheduler cfq registered (default)
> 
> If I allow it to sit there it never comes back to life and finishes
> booting. If I press the power or suspend button it will finish booting
> as expected.
> 
> I've scoured google for quite a while but cannot find any relevant
> information pertaining to this issue. For now I've disabled ACPI
> altogether.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH] report acpi video hot key event through input device

2007-07-29 Thread Luming Yu
report acpi video hot key event through input device

Signed-off-by: Luming Yu <[EMAIL PROTECTED]>
--
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 00d25b3..03d84db 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 
 #include 
@@ -131,6 +132,8 @@ struct acpi_video_bus {
struct semaphore sem;
struct list_head video_device_list;
struct proc_dir_entry *dir;
+   struct input_dev *input;
+   char phys[32];  /* for input device */
 };

 struct acpi_video_device_flags {
@@ -1714,6 +1717,8 @@ static void acpi_video_bus_notify(acpi_h
 {
struct acpi_video_bus *video = data;
struct acpi_device *device = NULL;
+   struct input_dev *input;
+   int keycode;

printk("video bus notify\n");

@@ -1721,11 +1726,13 @@ static void acpi_video_bus_notify(acpi_h
return;

device = video->device;
+   input = video->input;

switch (event) {
case ACPI_VIDEO_NOTIFY_SWITCH:  /* User requested a switch,
 * most likely via hotkey. */
acpi_bus_generate_event(device, event, 0);
+   keycode = KEY_UNKNOWN;
break;

case ACPI_VIDEO_NOTIFY_PROBE:   /* User plugged in or removed a video
@@ -1734,21 +1741,37 @@ static void acpi_video_bus_notify(acpi_h
acpi_video_device_rebind(video);
acpi_video_switch_output(video, event);
acpi_bus_generate_event(device, event, 0);
+   keycode = KEY_UNKNOWN;
break;

case ACPI_VIDEO_NOTIFY_CYCLE:   /* Cycle Display output hotkey pressed. 
*/
+   acpi_video_switch_output(video, event);
+   acpi_bus_generate_event(device, event, 0);
+   keycode = KEY_UNKNOWN;
+   break;
case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey 
pressed. */
+   acpi_video_switch_output(video, event);
+   acpi_bus_generate_event(device, event, 0);
+   keycode = KEY_VIDEO_NEXT;
+   break;
case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output
hotkey pressed. */
acpi_video_switch_output(video, event);
acpi_bus_generate_event(device, event, 0);
+   keycode = KEY_VIDEO_PREV;
break;

default:
+   keycode = KEY_UNKNOWN;
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
  "Unsupported event [0x%x]\n", event));
break;
}

+   input_report_key(input, keycode, 1);
+   input_sync(input);
+   input_report_key(input, keycode, 0);
+   input_sync(input);
+
return;
 }

@@ -1756,30 +1779,60 @@ static void acpi_video_device_notify(acp
 {
struct acpi_video_device *video_device = data;
struct acpi_device *device = NULL;
+   struct acpi_video_bus *bus;
+   struct input_dev *input;
+   int keycode;

if (!video_device)
return;

device = video_device->dev;
+   bus = video_device->video;
+   input = bus->input;

switch (event) {
case ACPI_VIDEO_NOTIFY_SWITCH:  /* change in status (cycle output 
device) */
case ACPI_VIDEO_NOTIFY_PROBE:   /* change in status (output device 
status) */
acpi_bus_generate_event(device, event, 0);
+   keycode = KEY_UNKNOWN;
break;
case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS:/* Cycle brightness */
+   acpi_video_switch_brightness(video_device, event);
+   acpi_bus_generate_event(device, event, 0);
+   keycode = KEY_UNKNOWN;
+   break;
case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS:  /* Increase brightness */
+   acpi_video_switch_brightness(video_device, event);
+   acpi_bus_generate_event(device, event, 0);
+   keycode = KEY_BRIGHTNESS_UP;
+   break;
case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS:  /* Decrease brightness */
+   acpi_video_switch_brightness(video_device, event);
+   acpi_bus_generate_event(device, event, 0);
+   keycode = KEY_BRIGHTNESS_DOWN;
+   break;
case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightnesss */
+   acpi_video_switch_brightness(video_device, event);
+   acpi_bus_generate_event(device, event, 0);
+   keycode = KEY_BRIGHTNESS_ZERO;
+   break;
case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */
acpi_video_switch_brightness(video_device, event);
acpi_bus_generate_event(device, event, 0);
+   keycode = KEY_BRIGHTNESS_OFF;
break;
default:
+   keycode = KEY_UNKNOWN;
AC

acpi_battery_add(): use-after-free

2007-07-29 Thread Adrian Bunk
The Coverity checker spotted the following use-after-free in 
acpi_battery_add():

<--  snip  -->

...
static int acpi_battery_add(struct acpi_device *device)
{
...
if (result) {
acpi_battery_remove_fs(device);
kfree(battery);
}

mutex_unlock(&battery->mutex);
...

<--  snip  -->

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

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6.23 regression fix] acpi_ec_remove(): fix use-after-free

2007-07-29 Thread Adrian Bunk
This patch fixes an obvious use-after-free introduced by
commit 837012ede14a8fc088be3682c964da7fc6af026b.

Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---
--- linux-2.6.23-rc1-mm1/drivers/acpi/ec.c.old  2007-07-28 07:59:49.0 
+0200
+++ linux-2.6.23-rc1-mm1/drivers/acpi/ec.c  2007-07-28 08:00:25.0 
+0200
@@ -730,14 +730,14 @@
 static int acpi_ec_remove(struct acpi_device *device, int type)
 {
struct acpi_ec *ec;
-   struct acpi_ec_query_handler *handler;
+   struct acpi_ec_query_handler *handler, *tmp;
 
if (!device)
return -EINVAL;
 
ec = acpi_driver_data(device);
mutex_lock(&ec->lock);
-   list_for_each_entry(handler, &ec->list, node) {
+   list_for_each_entry_safe(handler, tmp, &ec->list, node) {
list_del(&handler->node);
kfree(handler);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] make struct sony_nc_ids[] static

2007-07-29 Thread Adrian Bunk
sony_nc_ids[] can become static.

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---
--- linux-2.6.23-rc1-mm1/drivers/misc/sony-laptop.c.old 2007-07-26 
16:05:54.0 +0200
+++ linux-2.6.23-rc1-mm1/drivers/misc/sony-laptop.c 2007-07-26 
16:06:05.0 +0200
@@ -845,7 +845,7 @@
 };
 
 /* SNC-only model map */
-struct dmi_system_id sony_nc_ids[] = {
+static struct dmi_system_id sony_nc_ids[] = {
{
.ident = "Sony Vaio FE Series",
.callback = sony_nc_C_enable,

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[2.6 patch] make drivers/acpi/event.c:acpi_event_seqnum static

2007-07-29 Thread Adrian Bunk
This patch makes the needlessly global "acpi_event_seqnum" static.

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---
--- linux-2.6.23-rc1-mm1/drivers/acpi/event.c.old   2007-07-26 
02:32:59.0 +0200
+++ linux-2.6.23-rc1-mm1/drivers/acpi/event.c   2007-07-26 02:33:07.0 
+0200
@@ -108,7 +108,7 @@ static const struct file_operations acpi
 };
 
 #ifdef CONFIG_NET
-unsigned int acpi_event_seqnum;
+static unsigned int acpi_event_seqnum;
 struct acpi_genl_event {
acpi_device_class device_class;
char bus_id[15];

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Frequency scaling, Dell Inspiron 6000

2007-07-29 Thread Sune Mølgaard
Around the time of 2.6.17, I noticed that this machine would no longer 
scale it's frequency as it used to (i.e. it wouldn't at all, it would 
before). Furthermore, It reported an internal temperature somewhat near 
10 centigrade higher than before, leading to increased fan noise.


I am uncertain of whether it used to scale using the speedstep-centrino 
module or another one, but found a remark on google on a similar problem 
stating that it appeared "...after speedstep-centrino had it's guts 
ripped out in 2.6.18..." (cited from memory).


The CPU of the machine is labeled as centrino compliant, but is in fact 
a Celeron-M, and hence does not support _Enhanced_ Speedstep. However, I 
clearly remember having frequency scaling working with Ubuntu kernel 
2.6.15, but failing with Ubuntu 2.6.17 (possibly with some 2.6.18 code 
backported).


Venkatesh Pallipadi did some analysis of the BIOS, and posted a message 
to 
http://www.dellcommunity.com/supportforums/board/message?board.id=insp_bios&thread.id=38979 
, however no replies came forth. I am uncertain as to whether I upgraded 
the kernel or the bios first, but I think it was kernel first.


I am taking this matter up again, as I have given the machine to my gf, 
who complains about the fan noise, which I imagine will be less of a 
problem, if the cpu is frequency scaled.


I hope for anyone to take an interest and advise as to what info I 
should provide.


Best regards,

Sune Mølgaard

--
A motorcycle is a combination of pony, blow dryer, and vibrator - 
perfect for girls of all ages.

- Colin MacDonald
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] Introduce CONFIG_SUSPEND

2007-07-29 Thread Rafael J. Wysocki
From: Rafael J. Wysocki <[EMAIL PROTECTED]>

Introduce CONFIG_SUSPEND representing the ability to enter system sleep states,
such as the ACPI S3 state, and allow the user to choose SUSPEND and HIBERNATION
independently of each other.

Make HOTPLUG_CPU be selected automatically if SUSPEND or HIBERNATION has been
chosen and the kernel is intended for SMP systems.

Also, introduce CONFIG_PM_SLEEP which is automatically selected if
CONFIG_SUSPEND or CONFIG_HIBERNATION is set and make CONFIG_ACPI_SLEEP depend
on it.

The top-level power management headers are modified to use the new definitions.
Still, there are many other files in which CONFIG_PM can be replaced with
CONFIG_PM_SLEEP or even with CONFIG_SUSPEND, but they can be updated in the
future.

Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
---
 drivers/acpi/Kconfig|2 +-
 drivers/base/power/Makefile |6 +++---
 drivers/base/power/power.h  |4 ++--
 include/acpi/acpi_bus.h |7 +++
 include/linux/freezer.h |6 +++---
 include/linux/pm.h  |8 
 include/linux/suspend.h |   16 
 kernel/power/Kconfig|   39 +++
 kernel/power/Makefile   |3 ++-
 kernel/power/main.c |   26 ++
 kernel/power/power.h|   10 +-
 mm/page_alloc.c |4 ++--
 12 files changed, 90 insertions(+), 41 deletions(-)

Index: linux-2.6.23-rc1/kernel/power/Kconfig
===
--- linux-2.6.23-rc1.orig/kernel/power/Kconfig  2007-07-29 11:05:14.0 
+0200
+++ linux-2.6.23-rc1/kernel/power/Kconfig   2007-07-29 11:18:49.0 
+0200
@@ -46,7 +46,7 @@ config PM_VERBOSE
 
 config DISABLE_CONSOLE_SUSPEND
bool "Keep console(s) enabled during suspend/resume (DANGEROUS)"
-   depends on PM_DEBUG
+   depends on PM_DEBUG && PM_SLEEP
default n
---help---
This option turns off the console suspend mechanism that prevents
@@ -57,7 +57,7 @@ config DISABLE_CONSOLE_SUSPEND
 
 config PM_TRACE
bool "Suspend/resume event tracing"
-   depends on PM_DEBUG && X86 && EXPERIMENTAL
+   depends on PM_DEBUG && X86 && PM_SLEEP && EXPERIMENTAL
default n
---help---
This enables some cheesy code to save the last PM event point in the
@@ -72,9 +72,37 @@ config PM_TRACE
CAUTION: this option will cause your machine's real-time clock to be
set to an invalid time after a resume.
 
+config SUSPEND_SMP_POSSIBLE
+   bool
+   depends on (X86 && !X86_VOYAGER) || (PPC64 && (PPC_PSERIES || PPC_PMAC))
+   depends on SMP
+   default y
+
+config SUSPEND_SMP
+   bool
+   depends on SUSPEND_SMP_POSSIBLE && PM_SLEEP
+   select HOTPLUG_CPU
+   default y
+
+config PM_SLEEP
+   bool
+   depends on SUSPEND || HIBERNATION
+   default y
+
+config SUSPEND
+   bool "Suspend"
+   depends on PM
+   depends on !SMP || SUSPEND_SMP_POSSIBLE
+   default y
+   ---help---
+ Allow the system to enter sleep states in which main memory is
+ powered and thus its contents are preserved, such as the
+ suspend-to-RAM state (i.e. the ACPI S3 state).
+
 config HIBERNATION
bool "Hibernation"
-   depends on PM && SWAP && (((X86 || PPC64_SWSUSP) && (!SMP || 
SUSPEND_SMP)) || ((FRV || PPC32) && !SMP))
+   depends on PM && SWAP
+   depends on ((X86 || PPC64_SWSUSP || FRV || PPC32) && !SMP) || 
SUSPEND_SMP_POSSIBLE
---help---
  Enable the suspend to disk (STD) functionality, which is usually
  called "hibernation" in user interfaces.  STD checkpoints the
@@ -132,11 +160,6 @@ config PM_STD_PARTITION
  suspended image to. It will simply pick the first available swap 
  device.
 
-config SUSPEND_SMP
-   bool
-   depends on HOTPLUG_CPU && (X86 || PPC64) && PM
-   default y
-
 config APM_EMULATION
tristate "Advanced Power Management Emulation"
depends on PM && SYS_SUPPORTS_APM_EMULATION
Index: linux-2.6.23-rc1/kernel/power/Makefile
===
--- linux-2.6.23-rc1.orig/kernel/power/Makefile 2007-07-29 11:05:14.0 
+0200
+++ linux-2.6.23-rc1/kernel/power/Makefile  2007-07-29 12:53:13.0 
+0200
@@ -3,8 +3,9 @@ ifeq ($(CONFIG_PM_DEBUG),y)
 EXTRA_CFLAGS   +=  -DDEBUG
 endif
 
-obj-y  := main.o process.o console.o
+obj-y  := main.o
 obj-$(CONFIG_PM_LEGACY)+= pm.o
+obj-$(CONFIG_PM_SLEEP) += process.o console.o
 obj-$(CONFIG_HIBERNATION)  += swsusp.o disk.o snapshot.o swap.o user.o
 
 obj-$(CONFIG_MAGIC_SYSRQ)  += poweroff.o
Index: linux-2.6.23-rc1/drivers/base/power/Makefile
===
--- linux-2.6.23-rc1.orig/drivers/base/power/Makefile   2007-07-29 
1

dmidecode output for Sony Vaio VGN-FZ11M laptop

2007-07-29 Thread Ian Snow
Hi,

It doesn't matter if i boot with acpi_osi=!Linux I still get the message:
ACPI: System BIOS is requesting _OSI(Linux)
ACPI: Please test with "acpi_osi=!Linux"

Below is the output of dmidecode for this laptop

# dmidecode 2.9
SMBIOS 2.4 present.
17 structures occupying 710 bytes.
Table at 0x000DC010.

Handle 0x, DMI type 0, 24 bytes
BIOS Information
Vendor: Phoenix Technologies LTD
Version: R0050J7
Release Date: 04/18/2007
Address: 0xE62C0
Runtime Size: 105792 bytes
ROM Size: 1024 kB
Characteristics:
PCI is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
ESCD support is available
Boot from CD is supported
Selectable boot is supported
EDD is supported
8042 keyboard services are supported (int 9h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
AGP is supported
Smart battery is supported
BIOS boot specification is supported
Function key-initiated network boot is supported
Targeted content distribution is supported
BIOS Revision: 5.0
Firmware Revision: 5.0

Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: Sony Corporation
Product Name: VGN-FZ11M
Version: C3LP8MZ3
Serial Number: 28201150-5000954
UUID: 25BBA8A0-08D1-11DC-874E-0013A9C09B3B
Wake-up Type: Power Switch
SKU Number: N/A
Family: N/A

Handle 0x0002, DMI type 2, 10 bytes
Base Board Information
Manufacturer: Sony Corporation
Product Name: VAIO
Version: N/A
Serial Number: N/A

Handle 0x0003, DMI type 3, 17 bytes
Chassis Information
Manufacturer: Sony Corporation
Type: Notebook
Lock: Not Present
Version: N/A
Serial Number: N/A
Asset Tag: N/A
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: None
OEM Information: 0x

Handle 0x0004, DMI type 4, 35 bytes
Processor Information
Socket Designation: N/A
Type: Central Processor
Family: Other
Manufacturer: GenuineIntel
ID: FD 06 00 00 FF FB EB BF
Version: Intel(R) Core(TM)2 Duo CPU T7100  @ 1.80GHz
Voltage: 1.2 V
External Clock: 200 MHz
Max Speed: 1800 MHz
Current Speed: 1800 MHz
Status: Populated, Enabled
Upgrade: None
L1 Cache Handle: 0x0005
L2 Cache Handle: 0x0006
L3 Cache Handle: 0x0007
Serial Number: N/A
Asset Tag: N/A
Part Number: N/A

Handle 0x0005, DMI type 7, 19 bytes
Cache Information
Socket Designation: L1 Cache
Configuration: Enabled, Socketed, Level 1
Operational Mode: Write Back
Location: Internal
Installed Size: 64 KB
Maximum Size: 64 KB
Supported SRAM Types:
Burst
Pipeline Burst
Asynchronous
Installed SRAM Type: Other
Speed: Unknown
Error Correction Type: Single-bit ECC
System Type: Data
Associativity: 8-way Set-associative

Handle 0x0006, DMI type 7, 19 bytes
Cache Information
Socket Designation: L2 Cache
Configuration: Enabled, Socketed, Level 2
Operational Mode: Write Back
Location: Internal
Installed Size: 2048 KB
Maximum Size: 2048 KB
Supported SRAM Types:
Burst
Pipeline Burst
Asynchronous
Installed SRAM Type: Burst
Speed: Unknown
Error Correction Type: Single-bit ECC
System Type: Unified
Associativity: 8-way Set-associative

Handle 0x0007, DMI type 7, 19 bytes
Cache Information
Socket Designation: L3 Cache
Configuration: Disabled, Not Socketed, Level 3
Operational Mode: Unknown
Location: Unknown
Installed Size: 0 KB
Maximum Size: 0 KB
Supported SRAM Types:
Burst
Pipeline Burst
Asynchronous
Installed SRAM Type: Unknown
Speed: Unknown
Error Correction Type: Unknown
System Type: Unknown
Associativity: Unknown

Handle 0x0008, DMI type 11, 5 bytes
OEM Strings
String 1: JPBL-003584
String 2: FNC-CCIA0sodEXTB
String 3: 381M75257818136C5D53
String 4: Reserved
String 5: Reserved

Handle 0x0009, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 2048 GB
Error Information Handle: Not Provided
Number Of Devices: 2

Handle 0x000A, DMI type 17, 21 bytes
Memory Device
Array Handle: 0x0009
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: SODIMM
Set: None
Locator: SODIMM1
Bank Locator: Bank 0
Type: DDR2
Type Detail: Unknown

Handle 0x000B, DMI type 17, 21 bytes
Memory Device
Array Handle: 0x0009
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: SODIMM
Set: None
Locator: SODIMM2
Bank Locator: Ban

[PATCH 1/2] Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION

2007-07-29 Thread Rafael J. Wysocki
From: Rafael J. Wysocki <[EMAIL PROTECTED]>

Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION to avoid confusion
(among other things, with CONFIG_SUSPEND introduced in the next patch).

Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
---
 arch/i386/Kconfig.debug |4 ++--
 arch/i386/kernel/e820.c |2 +-
 arch/i386/mm/init.c |2 +-
 arch/i386/power/Makefile|2 +-
 arch/powerpc/Kconfig.debug  |2 +-
 arch/powerpc/configs/lite5200_defconfig |2 +-
 arch/powerpc/configs/pmac32_defconfig   |2 +-
 arch/powerpc/kernel/Makefile|6 +++---
 arch/ppc/configs/TQM8540_defconfig  |2 +-
 arch/ppc/configs/TQM8541_defconfig  |2 +-
 arch/ppc/configs/TQM8555_defconfig  |2 +-
 arch/ppc/configs/TQM8560_defconfig  |2 +-
 arch/ppc/configs/ev64360_defconfig  |2 +-
 arch/ppc/configs/ml300_defconfig|2 +-
 arch/ppc/configs/ml403_defconfig|2 +-
 arch/ppc/configs/mpc834x_sys_defconfig  |2 +-
 arch/ppc/configs/prep_defconfig |2 +-
 arch/sparc64/Kconfig.debug  |2 +-
 arch/x86_64/defconfig   |2 +-
 arch/x86_64/kernel/Makefile |2 +-
 arch/x86_64/kernel/suspend.c|4 ++--
 drivers/acpi/sleep/main.c   |6 +++---
 drivers/acpi/sleep/proc.c   |2 +-
 drivers/i2c/chips/tps65010.c|2 +-
 include/asm-i386/e820.h |2 +-
 include/linux/suspend.h |8 
 kernel/power/Kconfig|6 +++---
 kernel/power/Makefile   |2 +-
 kernel/power/main.c |2 +-
 kernel/power/power.h|2 +-
 kernel/sys.c|2 +-
 mm/Kconfig  |4 ++--
 mm/swapfile.c   |6 +++---
 33 files changed, 47 insertions(+), 47 deletions(-)

Index: linux-2.6.23-rc1/arch/i386/Kconfig.debug
===
--- linux-2.6.23-rc1.orig/arch/i386/Kconfig.debug   2007-07-28 
20:56:27.0 +0200
+++ linux-2.6.23-rc1/arch/i386/Kconfig.debug2007-07-28 20:57:00.0 
+0200
@@ -36,11 +36,11 @@ config DEBUG_STACK_USAGE
  This option will slow down process creation somewhat.
 
 comment "Page alloc debug is incompatible with Software Suspend on i386"
-   depends on DEBUG_KERNEL && SOFTWARE_SUSPEND
+   depends on DEBUG_KERNEL && HIBERNATION
 
 config DEBUG_PAGEALLOC
bool "Debug page memory allocations"
-   depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND && !HUGETLBFS
+   depends on DEBUG_KERNEL && !HIBERNATION && !HUGETLBFS
help
  Unmap pages from the kernel linear mapping after free_pages().
  This results in a large slowdown, but helps to find certain types
Index: linux-2.6.23-rc1/arch/i386/kernel/e820.c
===
--- linux-2.6.23-rc1.orig/arch/i386/kernel/e820.c   2007-07-28 
20:56:27.0 +0200
+++ linux-2.6.23-rc1/arch/i386/kernel/e820.c2007-07-28 20:57:00.0 
+0200
@@ -321,7 +321,7 @@ static int __init request_standard_resou
 
 subsys_initcall(request_standard_resources);
 
-#if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND)
+#if defined(CONFIG_PM) && defined(CONFIG_HIBERNATION)
 /**
  * e820_mark_nosave_regions - Find the ranges of physical addresses that do not
  * correspond to e820 RAM areas and mark the corresponding pages as nosave for
Index: linux-2.6.23-rc1/arch/i386/mm/init.c
===
--- linux-2.6.23-rc1.orig/arch/i386/mm/init.c   2007-07-28 20:56:27.0 
+0200
+++ linux-2.6.23-rc1/arch/i386/mm/init.c2007-07-28 20:57:00.0 
+0200
@@ -432,7 +432,7 @@ static void __init pagetable_init (void)
paravirt_pagetable_setup_done(pgd_base);
 }
 
-#if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI_SLEEP)
+#if defined(CONFIG_HIBERNATION) || defined(CONFIG_ACPI_SLEEP)
 /*
  * Swap suspend & friends need this for resume because things like the 
intel-agp
  * driver might have split up a kernel 4MB mapping.
Index: linux-2.6.23-rc1/arch/i386/power/Makefile
===
--- linux-2.6.23-rc1.orig/arch/i386/power/Makefile  2007-07-28 
20:56:27.0 +0200
+++ linux-2.6.23-rc1/arch/i386/power/Makefile   2007-07-28 20:57:00.0 
+0200
@@ -1,2 +1,2 @@
 obj-$(CONFIG_PM)   += cpu.o
-obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o suspend.o
+obj-$(CONFIG_HIBERNATION)  += swsusp.o suspend.o
Index: linux-2.6.23-rc1/arch/powerpc/Kconfig.debug
===
--- linux-2.6.23-rc1.orig/arch/powerpc/Kconfig.debug2007-07-28 
20:56:27.0 +0200
+++ linux-2.6.23-r

[PATCH 0/2] Introduce CONFIG_HIBERNATION and CONFIG_SUSPEND (was: CONFIG_SUSPEND?)

2007-07-29 Thread Rafael J. Wysocki
On Saturday, 28 July 2007 20:31, Linus Torvalds wrote:
> 
> On Sat, 28 Jul 2007, Rafael J. Wysocki wrote:
> > 
> > OK, I'll prepare a patch to introduce CONFIG_SUSPEND, but that will require
> > quite a bit of (compilation) testing on different architectures.
> 
> Sure. I'm not too worried, the fallout should be of the trivial kind. 
>
> Also, mind basing it on the (independent) cleanups that Adrian already 
> sent out. This is all intertwined..

OK, it took more time than I had hoped, but I wanted CONFIG_HIBERNATION and
CONFIG_SUSPEND to be really independent of each other.

The two patches in the next messages implement the idea:
* replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION
* introduce CONFIG_SUSPEND that selects CONFIG_HOTPLUG_CPU, if necessary,
  and make it possible to choose suspend and hibernation independently of each
  other.

Greetings,
Rafael

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html