NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/43565: acpi and no acpi on boot and halt or poweroff



The following reply was made to PR kern/43565; it has been noted by GNATS.

From: Jukka Ruohonen <jruohonen%iki.fi@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/43565: acpi and no acpi on boot and halt or poweroff
Date: Mon, 5 Jul 2010 14:16:55 +0300

 --ReaqsoxgOBHFXBhH
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Sun, Jul 04, 2010 at 08:15:12PM +0000, David Holland wrote:
 >   > if I boot without acpi, there is always a problem, if I use halt or
 >   > if I use poweroff to halt the system:
 >   > 
 >   > for example, if I use halt, this message is displayed:
 >   > 
 >   > ACPI Error (hwacpi-0156): No SMI_CMD in FADT, mode transition failed 
 > [20080321]
 >   > ACPI Error (evxfevnt-0221): Could not exit ACPI mode to legacy mode 
 > [20080321]
 >  
 >  If you've disabled ACPI it shouldn't be doing that... or so I'd think...
 
 Yes.
 
 If you have time, can you try the following patch? It is not a real fix, but
 mainly addresses the observation that all ACPI callbacks should be audited
 due cases like this.
 
 --ReaqsoxgOBHFXBhH
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="off.diff"
 
 Index: acpi.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/acpi/acpi.c,v
 retrieving revision 1.205
 diff -u -p -r1.205 acpi.c
 --- acpi.c     2 Jul 2010 05:18:38 -0000       1.205
 +++ acpi.c     5 Jul 2010 11:11:04 -0000
 @@ -1380,6 +1380,9 @@ acpi_enter_sleep_state(struct acpi_softc
        ACPI_STATUS rv;
        int err;
  
 +      if (acpi_active == 0)
 +              return;
 +
        if (state == sc->sc_sleepstate)
                return;
  
 Index: amd64/amd64/machdep.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/amd64/amd64/machdep.c,v
 retrieving revision 1.145
 diff -u -p -r1.145 machdep.c
 --- amd64/amd64/machdep.c      4 May 2010 23:27:13 -0000       1.145
 +++ amd64/amd64/machdep.c      5 Jul 2010 11:15:08 -0000
 @@ -693,8 +693,10 @@ haltsys:
        x86_broadcast_ipi(X86_IPI_HALT);
  
        if (howto & RB_HALT) {
 +
  #if NACPICA > 0
 -              AcpiDisable();
 +              if (acpi_active != 0)
 +                      AcpiDisable();
  #endif
  
                printf("\n");
 Index: i386/i386/machdep.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/i386/i386/machdep.c,v
 retrieving revision 1.687
 diff -u -p -r1.687 machdep.c
 --- i386/i386/machdep.c        4 May 2010 23:27:13 -0000       1.687
 +++ i386/i386/machdep.c        5 Jul 2010 11:15:18 -0000
 @@ -941,8 +941,10 @@ haltsys:
  #endif
  
        if (howto & RB_HALT) {
 +
  #if NACPICA > 0
 -              AcpiDisable();
 +              if (acpi_active != 0)
 +                      AcpiDisable();
  #endif
  
                printf("\n");
 
 --ReaqsoxgOBHFXBhH--
 


Home | Main Index | Thread Index | Old Index