Re: [BUG] New Kernel Bugs

2007-11-13 Thread Rafael J. Wysocki
On Tuesday, 13 of November 2007, Mark Lord wrote:
 Matthew Wilcox wrote:
  On Tue, Nov 13, 2007 at 01:43:53PM -0500, Mark Lord wrote:
 
  mkdir t
  cd t
  git clone 
  git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
  (wait half an hour)
  /usr/bin/du -s linux-2.6
  522732  linux-2.6
  
  You're assuming that everything in linux-2.6 was downloaded; that's
  not true.  Everything in linux-2.6/.git was downloaded; but then you do a
  checkout which happens to approximately double the size of the linux-2.6
  directory. 
 ..
 
 Ah, I wondered why it took only half an hour to download.
 
 ..
  When you compare it to the 60MB tarballs that are published, it's really
  not that bad.
 ..
 
 The tarballs I download are only 45MB.

You clone the git repo once.  Afterwards, you only update it and that usually
doesn't take that much time and a little effort.

Greetings,
Rafael


Re: [PATCH] Enable GPEs before _WAK is called

2007-07-31 Thread Rafael J. Wysocki
On Tuesday, 31 July 2007 16:26, Thomas Renninger wrote:
 On Tue, 2007-07-31 at 15:42 +0200, Rafael J. Wysocki wrote:
  On Tuesday, 31 July 2007 12:42, Thomas Renninger wrote:
   On Tue, 2007-07-31 at 10:07 +0100, Richard Hughes wrote:
On Tue, 2007-07-31 at 11:08 +0200, Rafael J. Wysocki wrote:
 On Monday, 30 July 2007 17:33, Richard Hughes wrote:
  On Mon, 2007-07-30 at 17:21 +0200, Thomas Renninger wrote:
   On Tue, 2007-07-17 at 12:15 +0100, Richard Hughes wrote:
[--snip--]
  I wouldn't move that before _BFS, just in case someone actually implements 
  it.
 Yes you are right, thanks.
 (ACPI spec):
 ---
 OSPM will execute the _BFS control method before performing any other
 physical I/O or enabling any interrupt servicing upon returning
 from a sleeping state.
 ---
 
 Now it makes sense to have _BFS and _WAK, before it had not made a
 difference from BIOS programmer point of view to use _BFS or _WAK.
 
 With some luck this fixes some other things, I remember a weird bug on
 (X60?) thinkpad:
 If you suspend to RAM you can wakeup with the blue FN key, after doing a
 suspend to disk and then doing a suspend to RAM the blue FN key does not
 wake the machine anymore from STR :)
 
 Attached an updated patch (Rafael, I added your Acked from comments
 above. I just moved GPE enabling between _BFS and _WAK as you
 suggested, pls scream if you still find something bad).

I think the patch (below) is correct.

Greetings,
Rafael


 
 
 
 Enable GPEs before calling _WAK on resume
 
 It seems it's required to enable GPEs before _WAK.
 E.g. X60 triggers a LID related GPE instead of doing a Notify in WAK.
 Now the GPE reaches the kernel and the Notify for LID status
 change gets thrown from there.
 
 Signed-off-by: Thomas Renninger [EMAIL PROTECTED]
 Acked-by: Rafael J. Wysocki [EMAIL PROTECTED]
 
 ---
  drivers/acpi/hardware/hwsleep.c |   19 +++
  1 file changed, 11 insertions(+), 8 deletions(-)
 
 Index: linux-2.6.22.1/drivers/acpi/hardware/hwsleep.c
 ===
 --- linux-2.6.22.1.orig/drivers/acpi/hardware/hwsleep.c
 +++ linux-2.6.22.1/drivers/acpi/hardware/hwsleep.c
 @@ -576,13 +576,10 @@ acpi_status acpi_leave_sleep_state(u8 sl
   ACPI_EXCEPTION((AE_INFO, status, During Method _BFS));
   }
  
 - status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, arg_list, NULL);
 - if (ACPI_FAILURE(status)  status != AE_NOT_FOUND) {
 - ACPI_EXCEPTION((AE_INFO, status, During Method _WAK));
 - }
 - /* TBD: _WAK sometimes returns stuff - do we want to look at it? */
 -
   /*
 +  * GPEs must be enabled before _WAK is called as GPEs
 +  * might get fired there
 +  *
* Restore the GPEs:
* 1) Disable/Clear all GPEs
* 2) Enable all runtime GPEs
 @@ -591,13 +588,19 @@ acpi_status acpi_leave_sleep_state(u8 sl
   if (ACPI_FAILURE(status)) {
   return_ACPI_STATUS(status);
   }
 - acpi_gbl_system_awake_and_running = TRUE;
 -
   status = acpi_hw_enable_all_runtime_gpes();
   if (ACPI_FAILURE(status)) {
   return_ACPI_STATUS(status);
   }
  
 + status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, arg_list, NULL);
 + if (ACPI_FAILURE(status)  status != AE_NOT_FOUND) {
 + ACPI_EXCEPTION((AE_INFO, status, During Method _WAK));
 + }
 + /* TBD: _WAK sometimes returns stuff - do we want to look at it? */
 +
 + acpi_gbl_system_awake_and_running = TRUE;
 +
   /* Enable power button */
  
   (void)
 
 
 -
 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
 
 

-- 
Premature optimization is the root of all evil. - Donald Knuth