Messages in this thread Patch in this message |  | | | Date | Thu, 29 Jan 2004 11:29:48 +0100 | | From | Pavel Machek <> | | Subject | Re: pmdisk working on ppc (WAS: Help port swsusp to ppc) |
Hi!
> > As long as you make sure you save the LR in case you need it, you > > can call asm functions. macros are _evil_ :) > > > > Also, you can remove the code playing with BATs for now, they don't > > really need to be saved. If the boot kernel sets them up any > > differently than the saved kernel, we are in trouble anyway. And the > > G5 has no BATs. > > Thanks, I hate macros too, I'll change code to function as soon as > possible. > > First I would tell you current swusp(2) signal ppc part has a problem. > I has add follow code into do_signal to let process to FREEZE before > suspend. > ppc/ > int signr, ret; > > + if (current->flags & PF_FREEZE) { > + refrigerator(PF_FREEZE); > + return 0; > + } > > if (!oldset) > oldset = ¤t->blocked; > > i386/ > if (current->flags & PF_FREEZE) { > refrigerator(PF_FREEZE); > if (!signal_pending(current)) > goto no_signal; > }
You may want to try this one.. Maybe it helps? Pavel Index: linux/kernel/power/process.c =================================================================== --- linux.orig/kernel/power/process.c 2004-01-13 22:52:40.000000000 +0100 +++ linux/kernel/power/process.c 2004-01-09 20:33:05.000000000 +0100 @@ -49,10 +49,11 @@ pr_debug("%s entered refrigerator\n", current->comm); printk("="); current->flags &= ~PF_FREEZE; - if (flag) - flush_signals(current); /* We have signaled a kernel thread, which isn't normal behaviour - and that may lead to 100%CPU sucking because those threads - just don't manage signals. */ + + spin_lock_irq(¤t->sighand->siglock); + recalc_sigpending(); /* We sent fake signal, clean it up */ + spin_unlock_irq(¤t->sighand->siglock); + current->flags |= PF_FROZEN; while (current->flags & PF_FROZEN) schedule();
-- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |