Today I worked for enabling swsusp for ppc440, again
on kernel 2.6.12.
I wrote some changes for arch/ppc/kernel/swsusp.S, however
kernel was stopped, before hibernation is taken place with
following messages.
# echo disk > state
PM: prepare: Attempting to freeze processes.
Stopping tasks: ===|
Freeing memory... done (0 pages freed)
PM: prepare: OK.
ide-disk 0.0: suspending
serial8250 serial8250: suspending
.. nothing happen
It seems to be stopped at console device.
Do anyone point out where and how to exclude system devices
like console and swap from device suspend procedure as
preparation of swsusp?
Thanks,
Hiroyuki Machida
Hi
> It seems to be stopped at console device.
> Do anyone point out where and how to exclude system devices
> like console and swap from device suspend procedure as
> preparation of swsusp?
>
As long as I think, what you want may be realized by changing the condition
to suspend serial device(this is written in serial8250_suspend function
in drivers/serial/8250.c, line: 2334).
Following trivial patch may help you(But I've not tried this patch on PowerPC actually, sorry).
Regards,
diff -Nupr linux-2.6.orig/drivers/serial/8250.c linux-2.6/drivers/serial/8250.c
--- linux-2.6.orig/drivers/serial/8250.c 2005-07-20 05:37:20.000000000 +0900
+++ linux-2.6/drivers/serial/8250.c 2005-07-20 22:07:36.000000000 +0900
@@ -2331,7 +2331,7 @@ static int serial8250_suspend(struct dev
{
int i;
- if (level != SUSPEND_DISABLE)
+ if ( (level != SUSPEND_DISABLE) || (state == PMSG_FREEZE) )
return 0;
for (i = 0; i < UART_NR; i++) {