Date: Tue, 02 Dec 2008 21:03:32 +0200 From: Alexander Motin <mav@FreeBSD.org> To: Jung-uk Kim <jkim@FreeBSD.org> Cc: freebsd-acpi@FreeBSD.org, freebsd-amd64@FreeBSD.org, peter@FreeBSD.org Subject: Re: Semi-working patch for amd64 suspend/resume Message-ID: <49358684.7010508@FreeBSD.org> In-Reply-To: <200812021243.08513.jkim@FreeBSD.org> References: <1224616985.00027652.1224606603@10.7.7.3> <1224728582.00028075.1224715806@10.7.7.3> <4932F34C.1040804@FreeBSD.org> <200812021243.08513.jkim@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
Hi.
Jung-uk Kim wrote:
>> Here is problems I still have now:
>> - SMP kernel resume is not working, system reboots while doing
>> acpi_wakeup_cpus();
>
> My dual-core CPU seems to resume okay but quite unstable. Can you try
> something like the following in amd64/mp_machdep.c and tell me if it
> helps?
>
> ------------
> @@ -57,6 +57,7 @@
> #include <vm/vm_extern.h>
>
> #include <machine/apicreg.h>
> +#include <machine/cpufunc.h>
> #include <machine/md_var.h>
> #include <machine/mp_watchdog.h>
> #include <machine/pcb.h>
> @@ -1121,6 +1121,8 @@
> int cpumask = PCPU_GET(cpumask);
>
> if (savectx2(&stopxpcbs[cpu])) {
> + /* Flush CPU cache. */
> + wbinvd();
> /* Indicate that we are suspended. */
> atomic_set_int(&stopped_cpus, cpumask);
> } else {
> ------------
Wow, it works!
I am writing this letter just after suspending/resuming my dual-core C2D
system 4 times straight. Music plays, USB, SATA, all other hardware
works fine. What kind of instability do you have?
The only strange effect I have noticed was incorrect CPU time some
processes got:
%ps ax
PID TT STAT TIME COMMAND
12 ?? WL 280503:38,05 [intr]
1430 ?? Ss 280503:38,34 icewm
But I think it is more timer driver related then resume itself.
> Thanks for the feedback!
Many thanks to you! I hope this long-waited feature will be finished!
--
Alexander Motin
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49358684.7010508>
