[PATCH] Software Suspend 2 for ppc64 (1/2 - core)

Anton Blanchard anton at samba.org
Tue Jul 19 11:22:06 EST 2005


> These patches add support for software-suspend-2 on the ppc64
> platform... I have tested and works nicely on a PAPR pSeries partition
> with virtual console, disk , and network (hvc_console, ibmvscsi, and
> ibmveth, respectively) hibernating to a file... It applies to the latest
> ssusp2 development version ( which applies to the
> kernel)...



> +	/* Restore TB */
> +	asm volatile ("li 3,0; mttbl 3; \n"
> +		      "lwz 3,%0\n; lwz 4,%1\n"
> +		      "mttbu 3; mttbl 4" :
> +		      "=m" (s->tb[0]),
> +		      "=m" (s->tb[1]) : : "r3");

We cant write to the timebase on a partitioned machine. Also it looks
like on a non partitioned machine we will restore the timebase without
synchronising it between cpus.

We probably need a callback to reset our timebase code on resume. Not
sure what we do about userspace gettimeofday, if you suspend at exactly
the wrong time I could imagine your time could go crazy for the first
call :) 


More information about the Linuxppc64-dev mailing list