Subject: [RFC][PATCH] Adds support for PF_FREEZE on ppc

From: Sylvain Munaut <[email-masked]>
Date: Thu, 16 Dec 2004 15:26:35 +0100

Hello,

While trying to use the /sys/power interface on a ppc target,
I noticed that the processes didn't freeze. Apparently, since
that interface was never used on ppc beforce, signal.c didn't handle the
signal.

The patch below fixes that for me.

Sylvain

Signed-Off-By: Sylvain Munaut <[email-masked]>

===== arch/ppc/kernel/signal.c 1.40 vs edited =====
--- 1.40/arch/ppc/kernel/signal.c       2004-10-28 09:39:49 +02:00
+++ edited/arch/ppc/kernel/signal.c     2004-12-01 09:25:55 +01:00
@@ -24,6 +24,7 @@
 #include <linux/wait.h>
 #include <linux/ptrace.h>
 #include <linux/unistd.h>
+#include <linux/suspend.h>
 #include <linux/stddef.h>
 #include <linux/elf.h>
 #include <linux/tty.h>
@@ -616,6 +617,11 @@

        if (!oldset)
                oldset = &current->blocked;
+
+       if (current->flags & PF_FREEZE) {
+               refrigerator(0);
+               return 0;
+       }

        newsp = frame = 0;