diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2011-08-27 09:43:54 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2011-08-27 10:06:11 -0400 |
commit | 7b1bb388bc879ffcc6c69b567816d5c354afe42b (patch) | |
tree | 5a217fdfb0b5e5a327bdcd624506337c1ae1fe32 /kernel/power/user.c | |
parent | 7d754596756240fa918b94cd0c3011c77a638987 (diff) | |
parent | 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff) |
Merge 'Linux v3.0' into Litmus
Some notes:
* Litmus^RT scheduling class is the topmost scheduling class
(above stop_sched_class).
* scheduler_ipi() function (e.g., in smp_reschedule_interrupt())
may increase IPI latencies.
* Added path into schedule() to quickly re-evaluate scheduling
decision without becoming preemptive again. This used to be
a standard path before the removal of BKL.
Conflicts:
Makefile
arch/arm/kernel/calls.S
arch/arm/kernel/smp.c
arch/x86/include/asm/unistd_32.h
arch/x86/kernel/smp.c
arch/x86/kernel/syscall_table_32.S
include/linux/hrtimer.h
kernel/printk.c
kernel/sched.c
kernel/sched_fair.c
Diffstat (limited to 'kernel/power/user.c')
-rw-r--r-- | kernel/power/user.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c index e819e17877ca..42ddbc6f0de6 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c | |||
@@ -113,8 +113,10 @@ static int snapshot_open(struct inode *inode, struct file *filp) | |||
113 | if (error) | 113 | if (error) |
114 | pm_notifier_call_chain(PM_POST_RESTORE); | 114 | pm_notifier_call_chain(PM_POST_RESTORE); |
115 | } | 115 | } |
116 | if (error) | 116 | if (error) { |
117 | free_basic_memory_bitmaps(); | ||
117 | atomic_inc(&snapshot_device_available); | 118 | atomic_inc(&snapshot_device_available); |
119 | } | ||
118 | data->frozen = 0; | 120 | data->frozen = 0; |
119 | data->ready = 0; | 121 | data->ready = 0; |
120 | data->platform_support = 0; | 122 | data->platform_support = 0; |
@@ -135,9 +137,11 @@ static int snapshot_release(struct inode *inode, struct file *filp) | |||
135 | free_basic_memory_bitmaps(); | 137 | free_basic_memory_bitmaps(); |
136 | data = filp->private_data; | 138 | data = filp->private_data; |
137 | free_all_swap_pages(data->swap); | 139 | free_all_swap_pages(data->swap); |
138 | if (data->frozen) | 140 | if (data->frozen) { |
141 | pm_restore_gfp_mask(); | ||
139 | thaw_processes(); | 142 | thaw_processes(); |
140 | pm_notifier_call_chain(data->mode == O_WRONLY ? | 143 | } |
144 | pm_notifier_call_chain(data->mode == O_RDONLY ? | ||
141 | PM_POST_HIBERNATION : PM_POST_RESTORE); | 145 | PM_POST_HIBERNATION : PM_POST_RESTORE); |
142 | atomic_inc(&snapshot_device_available); | 146 | atomic_inc(&snapshot_device_available); |
143 | 147 | ||
@@ -263,6 +267,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd, | |||
263 | case SNAPSHOT_UNFREEZE: | 267 | case SNAPSHOT_UNFREEZE: |
264 | if (!data->frozen || data->ready) | 268 | if (!data->frozen || data->ready) |
265 | break; | 269 | break; |
270 | pm_restore_gfp_mask(); | ||
266 | thaw_processes(); | 271 | thaw_processes(); |
267 | usermodehelper_enable(); | 272 | usermodehelper_enable(); |
268 | data->frozen = 0; | 273 | data->frozen = 0; |
@@ -275,6 +280,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd, | |||
275 | error = -EPERM; | 280 | error = -EPERM; |
276 | break; | 281 | break; |
277 | } | 282 | } |
283 | pm_restore_gfp_mask(); | ||
278 | error = hibernation_snapshot(data->platform_support); | 284 | error = hibernation_snapshot(data->platform_support); |
279 | if (!error) | 285 | if (!error) |
280 | error = put_user(in_suspend, (int __user *)arg); | 286 | error = put_user(in_suspend, (int __user *)arg); |
@@ -377,6 +383,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd, | |||
377 | * PM_HIBERNATION_PREPARE | 383 | * PM_HIBERNATION_PREPARE |
378 | */ | 384 | */ |
379 | error = suspend_devices_and_enter(PM_SUSPEND_MEM); | 385 | error = suspend_devices_and_enter(PM_SUSPEND_MEM); |
386 | data->ready = 0; | ||
380 | break; | 387 | break; |
381 | 388 | ||
382 | case SNAPSHOT_PLATFORM_SUPPORT: | 389 | case SNAPSHOT_PLATFORM_SUPPORT: |