diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-06 17:14:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-06 17:14:16 -0500 |
commit | f194d132e4971111f85c18c96067acffb13cee6d (patch) | |
tree | e7510b0f2300e059db3fbe850b68667af28531f0 | |
parent | 09f3eca2b7e2762e223fdd359f9d0f6303a85f6c (diff) | |
parent | 982286d1b8e438f595cdc9304cc4c185c7b90a39 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
ACPI: suspend: old debugging hacks sneaked back
Freezer: Fix JFFS2 garbage collector freezing issue (rev. 2)
HWMON: coretemp, suspend fix
Freezer: Fix APM emulation breakage
Freezer: Fix s2disk resume from initrd
-rw-r--r-- | arch/x86/kernel/acpi/wakeup_32.S | 4 | ||||
-rw-r--r-- | drivers/char/apm-emulation.c | 15 | ||||
-rw-r--r-- | drivers/hwmon/coretemp.c | 5 | ||||
-rw-r--r-- | fs/jffs2/background.c | 2 | ||||
-rw-r--r-- | init/do_mounts_initrd.c | 12 |
5 files changed, 20 insertions, 18 deletions
diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S index a97313b1270e..1e931aaf2ef6 100644 --- a/arch/x86/kernel/acpi/wakeup_32.S +++ b/arch/x86/kernel/acpi/wakeup_32.S | |||
@@ -35,10 +35,6 @@ wakeup_code: | |||
35 | wakeup_code_start = . | 35 | wakeup_code_start = . |
36 | .code16 | 36 | .code16 |
37 | 37 | ||
38 | movw $0xb800, %ax | ||
39 | movw %ax,%fs | ||
40 | movw $0x0e00 + 'L', %fs:(0x10) | ||
41 | |||
42 | cli | 38 | cli |
43 | cld | 39 | cld |
44 | 40 | ||
diff --git a/drivers/char/apm-emulation.c b/drivers/char/apm-emulation.c index c99e43b837f5..17d54315e146 100644 --- a/drivers/char/apm-emulation.c +++ b/drivers/char/apm-emulation.c | |||
@@ -295,7 +295,6 @@ static int | |||
295 | apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg) | 295 | apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg) |
296 | { | 296 | { |
297 | struct apm_user *as = filp->private_data; | 297 | struct apm_user *as = filp->private_data; |
298 | unsigned long flags; | ||
299 | int err = -EINVAL; | 298 | int err = -EINVAL; |
300 | 299 | ||
301 | if (!as->suser || !as->writer) | 300 | if (!as->suser || !as->writer) |
@@ -331,10 +330,16 @@ apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg) | |||
331 | * Wait for the suspend/resume to complete. If there | 330 | * Wait for the suspend/resume to complete. If there |
332 | * are pending acknowledges, we wait here for them. | 331 | * are pending acknowledges, we wait here for them. |
333 | */ | 332 | */ |
334 | flags = current->flags; | 333 | freezer_do_not_count(); |
335 | 334 | ||
336 | wait_event(apm_suspend_waitqueue, | 335 | wait_event(apm_suspend_waitqueue, |
337 | as->suspend_state == SUSPEND_DONE); | 336 | as->suspend_state == SUSPEND_DONE); |
337 | |||
338 | /* | ||
339 | * Since we are waiting until the suspend is done, the | ||
340 | * try_to_freeze() in freezer_count() will not trigger | ||
341 | */ | ||
342 | freezer_count(); | ||
338 | } else { | 343 | } else { |
339 | as->suspend_state = SUSPEND_WAIT; | 344 | as->suspend_state = SUSPEND_WAIT; |
340 | mutex_unlock(&state_lock); | 345 | mutex_unlock(&state_lock); |
@@ -362,14 +367,10 @@ apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg) | |||
362 | * Wait for the suspend/resume to complete. If there | 367 | * Wait for the suspend/resume to complete. If there |
363 | * are pending acknowledges, we wait here for them. | 368 | * are pending acknowledges, we wait here for them. |
364 | */ | 369 | */ |
365 | flags = current->flags; | 370 | wait_event_freezable(apm_suspend_waitqueue, |
366 | |||
367 | wait_event_interruptible(apm_suspend_waitqueue, | ||
368 | as->suspend_state == SUSPEND_DONE); | 371 | as->suspend_state == SUSPEND_DONE); |
369 | } | 372 | } |
370 | 373 | ||
371 | current->flags = flags; | ||
372 | |||
373 | mutex_lock(&state_lock); | 374 | mutex_lock(&state_lock); |
374 | err = as->suspend_result; | 375 | err = as->suspend_result; |
375 | as->suspend_state = SUSPEND_NONE; | 376 | as->suspend_state = SUSPEND_NONE; |
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 5c82ec7f8bbd..3ee60d26e3a2 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c | |||
@@ -337,11 +337,10 @@ static int coretemp_cpu_callback(struct notifier_block *nfb, | |||
337 | 337 | ||
338 | switch (action) { | 338 | switch (action) { |
339 | case CPU_ONLINE: | 339 | case CPU_ONLINE: |
340 | case CPU_ONLINE_FROZEN: | 340 | case CPU_DOWN_FAILED: |
341 | coretemp_device_add(cpu); | 341 | coretemp_device_add(cpu); |
342 | break; | 342 | break; |
343 | case CPU_DEAD: | 343 | case CPU_DOWN_PREPARE: |
344 | case CPU_DEAD_FROZEN: | ||
345 | coretemp_device_remove(cpu); | 344 | coretemp_device_remove(cpu); |
346 | break; | 345 | break; |
347 | } | 346 | } |
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c index d568ae846741..8adebd3e43c6 100644 --- a/fs/jffs2/background.c +++ b/fs/jffs2/background.c | |||
@@ -105,7 +105,7 @@ static int jffs2_garbage_collect_thread(void *_c) | |||
105 | 105 | ||
106 | /* Put_super will send a SIGKILL and then wait on the sem. | 106 | /* Put_super will send a SIGKILL and then wait on the sem. |
107 | */ | 107 | */ |
108 | while (signal_pending(current)) { | 108 | while (signal_pending(current) || freezing(current)) { |
109 | siginfo_t info; | 109 | siginfo_t info; |
110 | unsigned long signr; | 110 | unsigned long signr; |
111 | 111 | ||
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index fd4fc12d2624..614241b5200c 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c | |||
@@ -55,12 +55,18 @@ static void __init handle_initrd(void) | |||
55 | sys_mount(".", "/", NULL, MS_MOVE, NULL); | 55 | sys_mount(".", "/", NULL, MS_MOVE, NULL); |
56 | sys_chroot("."); | 56 | sys_chroot("."); |
57 | 57 | ||
58 | /* | ||
59 | * In case that a resume from disk is carried out by linuxrc or one of | ||
60 | * its children, we need to tell the freezer not to wait for us. | ||
61 | */ | ||
62 | current->flags |= PF_FREEZER_SKIP; | ||
63 | |||
58 | pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); | 64 | pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); |
59 | if (pid > 0) | 65 | if (pid > 0) |
60 | while (pid != sys_wait4(-1, NULL, 0, NULL)) { | 66 | while (pid != sys_wait4(-1, NULL, 0, NULL)) |
61 | try_to_freeze(); | ||
62 | yield(); | 67 | yield(); |
63 | } | 68 | |
69 | current->flags &= ~PF_FREEZER_SKIP; | ||
64 | 70 | ||
65 | /* move initrd to rootfs' /old */ | 71 | /* move initrd to rootfs' /old */ |
66 | sys_fchdir(old_fd); | 72 | sys_fchdir(old_fd); |