Loading Documentation/power/kernel_threads.txt +1 −2 Original line number Original line Diff line number Diff line Loading @@ -12,8 +12,7 @@ refrigerator. Code to do this looks like this: do { do { hub_events(); hub_events(); wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list)); wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list)); if (current->flags & PF_FREEZE) try_to_freeze(); refrigerator(PF_FREEZE); } while (!signal_pending(current)); } while (!signal_pending(current)); from drivers/usb/core/hub.c::hub_thread() from drivers/usb/core/hub.c::hub_thread() Loading Documentation/power/swsusp.txt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -164,7 +164,7 @@ place where the thread is safe to be frozen (no kernel semaphores should be held at that point and it must be safe to sleep there), and should be held at that point and it must be safe to sleep there), and add: add: try_to_freeze(PF_FREEZE); try_to_freeze(); If the thread is needed for writing the image to storage, you should If the thread is needed for writing the image to storage, you should instead set the PF_NOFREEZE process flag when creating the thread (and instead set the PF_NOFREEZE process flag when creating the thread (and Loading arch/frv/kernel/signal.c +1 −3 Original line number Original line Diff line number Diff line Loading @@ -536,10 +536,8 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) if (!user_mode(regs)) if (!user_mode(regs)) return 1; return 1; if (current->flags & PF_FREEZE) { if (try_to_freeze()) refrigerator(0); goto no_signal; goto no_signal; } if (!oldset) if (!oldset) oldset = ¤t->blocked; oldset = ¤t->blocked; Loading arch/h8300/kernel/signal.c +1 −3 Original line number Original line Diff line number Diff line Loading @@ -517,10 +517,8 @@ asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset) if ((regs->ccr & 0x10)) if ((regs->ccr & 0x10)) return 1; return 1; if (current->flags & PF_FREEZE) { if (try_to_freeze()) refrigerator(0); goto no_signal; goto no_signal; } current->thread.esp0 = (unsigned long) regs; current->thread.esp0 = (unsigned long) regs; Loading arch/i386/kernel/io_apic.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -573,7 +573,7 @@ static int balanced_irq(void *unused) for ( ; ; ) { for ( ; ; ) { set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE); time_remaining = schedule_timeout(time_remaining); time_remaining = schedule_timeout(time_remaining); try_to_freeze(PF_FREEZE); try_to_freeze(); if (time_after(jiffies, if (time_after(jiffies, prev_balance_time+balanced_irq_interval)) { prev_balance_time+balanced_irq_interval)) { preempt_disable(); preempt_disable(); Loading Loading
Documentation/power/kernel_threads.txt +1 −2 Original line number Original line Diff line number Diff line Loading @@ -12,8 +12,7 @@ refrigerator. Code to do this looks like this: do { do { hub_events(); hub_events(); wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list)); wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list)); if (current->flags & PF_FREEZE) try_to_freeze(); refrigerator(PF_FREEZE); } while (!signal_pending(current)); } while (!signal_pending(current)); from drivers/usb/core/hub.c::hub_thread() from drivers/usb/core/hub.c::hub_thread() Loading
Documentation/power/swsusp.txt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -164,7 +164,7 @@ place where the thread is safe to be frozen (no kernel semaphores should be held at that point and it must be safe to sleep there), and should be held at that point and it must be safe to sleep there), and add: add: try_to_freeze(PF_FREEZE); try_to_freeze(); If the thread is needed for writing the image to storage, you should If the thread is needed for writing the image to storage, you should instead set the PF_NOFREEZE process flag when creating the thread (and instead set the PF_NOFREEZE process flag when creating the thread (and Loading
arch/frv/kernel/signal.c +1 −3 Original line number Original line Diff line number Diff line Loading @@ -536,10 +536,8 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) if (!user_mode(regs)) if (!user_mode(regs)) return 1; return 1; if (current->flags & PF_FREEZE) { if (try_to_freeze()) refrigerator(0); goto no_signal; goto no_signal; } if (!oldset) if (!oldset) oldset = ¤t->blocked; oldset = ¤t->blocked; Loading
arch/h8300/kernel/signal.c +1 −3 Original line number Original line Diff line number Diff line Loading @@ -517,10 +517,8 @@ asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset) if ((regs->ccr & 0x10)) if ((regs->ccr & 0x10)) return 1; return 1; if (current->flags & PF_FREEZE) { if (try_to_freeze()) refrigerator(0); goto no_signal; goto no_signal; } current->thread.esp0 = (unsigned long) regs; current->thread.esp0 = (unsigned long) regs; Loading
arch/i386/kernel/io_apic.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -573,7 +573,7 @@ static int balanced_irq(void *unused) for ( ; ; ) { for ( ; ; ) { set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE); time_remaining = schedule_timeout(time_remaining); time_remaining = schedule_timeout(time_remaining); try_to_freeze(PF_FREEZE); try_to_freeze(); if (time_after(jiffies, if (time_after(jiffies, prev_balance_time+balanced_irq_interval)) { prev_balance_time+balanced_irq_interval)) { preempt_disable(); preempt_disable(); Loading