Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Sep 2007 14:16:23 -0700
From:      Nate Lawson <nate@root.org>
To:        Mikael Ikivesi <mikael.ikivesi@pp.inet.fi>
Cc:        freebsd-acpi@freebsd.org
Subject:   Re: PATCH: ecng for 6.x and 7.x
Message-ID:  <46E462A7.4080802@root.org>
In-Reply-To: <200709081054.14073.mikael.ikivesi@pp.inet.fi>
References:  <46E0777A.8070901@root.org> <200709081054.14073.mikael.ikivesi@pp.inet.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------050606020709050303060101
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Mikael Ikivesi wrote:
> Note still:  If I try to suspend machine I get kernel panic. I dont know if it 
> was you patch or some other update, but before I got only messages and bounce 
> back to system without crashing. Because of the updates I cannot now access 
> the messages but if I remember correctly they were something about:
> device physically ejected? and they had something to do with cardbus if I 
> remember correctly...
> ...sorry for being so vague!
> 
> 
> BUT about that panic I can be more precise :)
> 
> 
> acpi_button0: sleep button pressed
> Kernel page fault with the following non-sleepable locks held:
> exclusive sleep mutex ACPI global lock r = 0 (0xffffffff808ac4a0) locked 
> @ /usr/src/sys/dev/acpica/acpi.c:2222
> KDB: stack backtrace:
> db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
> witness_warn() at witness_warn+0x248
> trap() at trap+0x25e
> calltrap() at calltrap+0x8
> --- trap 0xc, rip = 0xffffffff801d9cf4, rsp = 0xffffffff9ed4aa00, rbp = 
> 0xffffffff9ed4aa30 ---
> acpi_AckSleepState() at acpi_AckSleepState+0x34
> devfs_ioctl_f() at devfs_ioctl_f+0x6d
> kern_ioctl() at kern_ioctl+0xa3
> ioctl() at ioctl+0xf9
> syscall() at syscall+0x1ce
> Xfast_syscall() at Xfast_syscall+0xab
> --- syscall (54, FreeBSD ELF64, ioctl), rip = 0x8007187ec, rsp = 
> 0x7fffffffecd8, rbp = 0x7fffffffee50 ---
> 
> 
> Fatal trap 12: page fault while in kernel mode
> cpuid = 0; apic id = 00
> fault virtual address	= 0x18
> fault code		= supervisor read data, page not present
> instruction pointer	= 0x8:0xffffffff801d9cf4
> stack pointer	        = 0x10:0xffffffff9ed4aa00
> frame pointer	        = 0x10:0xffffffff9ed4aa30
> code segment		= base 0x0, limit 0xfffff, type 0x1b
> 			= DPL 0, pres 1, long 1, def32 0, gran 1
> processor eflags	= interrupt enabled, resume, IOPL = 0
> current process		= 748 (acpiconf)

Try the attached patch.  It will reject suspend requests while still
allowing power-off.  This will have to be this way until amd64
suspend/resume is implemented.

-Nate

--------------050606020709050303060101
Content-Type: text/x-patch;
 name="acpi-wake.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="acpi-wake.diff"

Index: sys/dev/acpica/acpi.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/acpica/acpi.c,v
retrieving revision 1.241
diff -u -r1.241 acpi.c
--- sys/dev/acpica/acpi.c	30 Jun 2007 17:27:31 -0000	1.241
+++ sys/dev/acpica/acpi.c	9 Sep 2007 21:13:04 -0000
@@ -2173,6 +2173,11 @@
 	    return (ENXIO);
     }
 
+#if !defined(__i386__)
+    /* This platform does not support acpi suspend/resume. */
+    return (EOPNOTSUPP);
+#endif
+
     /* If a suspend request is already in progress, just return. */
     ACPI_LOCK(acpi);
     if (sc->acpi_next_sstate != 0) {

--------------050606020709050303060101--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46E462A7.4080802>