diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/auditfilter.c | 2 | ||||
-rw-r--r-- | kernel/power/main.c | 15 | ||||
-rw-r--r-- | kernel/sys_ni.c | 2 | ||||
-rw-r--r-- | kernel/time/clocksource.c | 10 | ||||
-rw-r--r-- | kernel/time/timekeeping.c | 2 | ||||
-rw-r--r-- | kernel/timer.c | 2 |
6 files changed, 17 insertions, 16 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 6c61263ff9..74cc0fc6bb 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
@@ -311,6 +311,7 @@ int audit_match_class(int class, unsigned syscall) | |||
311 | return classes[class][AUDIT_WORD(syscall)] & AUDIT_BIT(syscall); | 311 | return classes[class][AUDIT_WORD(syscall)] & AUDIT_BIT(syscall); |
312 | } | 312 | } |
313 | 313 | ||
314 | #ifdef CONFIG_AUDITSYSCALL | ||
314 | static inline int audit_match_class_bits(int class, u32 *mask) | 315 | static inline int audit_match_class_bits(int class, u32 *mask) |
315 | { | 316 | { |
316 | int i; | 317 | int i; |
@@ -347,6 +348,7 @@ static int audit_match_signal(struct audit_entry *entry) | |||
347 | return 1; | 348 | return 1; |
348 | } | 349 | } |
349 | } | 350 | } |
351 | #endif | ||
350 | 352 | ||
351 | /* Common user-space to kernel rule translation. */ | 353 | /* Common user-space to kernel rule translation. */ |
352 | static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) | 354 | static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) |
diff --git a/kernel/power/main.c b/kernel/power/main.c index 40d56a3124..b98b80ccf4 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
@@ -97,25 +97,26 @@ static int suspend_prepare(suspend_state_t state) | |||
97 | } | 97 | } |
98 | } | 98 | } |
99 | 99 | ||
100 | if (pm_ops->prepare) { | ||
101 | if ((error = pm_ops->prepare(state))) | ||
102 | goto Thaw; | ||
103 | } | ||
104 | |||
105 | suspend_console(); | 100 | suspend_console(); |
106 | error = device_suspend(PMSG_SUSPEND); | 101 | error = device_suspend(PMSG_SUSPEND); |
107 | if (error) { | 102 | if (error) { |
108 | printk(KERN_ERR "Some devices failed to suspend\n"); | 103 | printk(KERN_ERR "Some devices failed to suspend\n"); |
109 | goto Resume_devices; | 104 | goto Resume_console; |
110 | } | 105 | } |
106 | if (pm_ops->prepare) { | ||
107 | if ((error = pm_ops->prepare(state))) | ||
108 | goto Resume_devices; | ||
109 | } | ||
110 | |||
111 | error = disable_nonboot_cpus(); | 111 | error = disable_nonboot_cpus(); |
112 | if (!error) | 112 | if (!error) |
113 | return 0; | 113 | return 0; |
114 | 114 | ||
115 | enable_nonboot_cpus(); | 115 | enable_nonboot_cpus(); |
116 | Resume_devices: | ||
117 | pm_finish(state); | 116 | pm_finish(state); |
117 | Resume_devices: | ||
118 | device_resume(); | 118 | device_resume(); |
119 | Resume_console: | ||
119 | resume_console(); | 120 | resume_console(); |
120 | Thaw: | 121 | Thaw: |
121 | thaw_processes(); | 122 | thaw_processes(); |
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index b6d77a8a1c..7e11e2c98b 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c | |||
@@ -145,4 +145,6 @@ cond_syscall(sys_ioprio_get); | |||
145 | /* New file descriptors */ | 145 | /* New file descriptors */ |
146 | cond_syscall(sys_signalfd); | 146 | cond_syscall(sys_signalfd); |
147 | cond_syscall(sys_timerfd); | 147 | cond_syscall(sys_timerfd); |
148 | cond_syscall(compat_sys_signalfd); | ||
149 | cond_syscall(compat_sys_timerfd); | ||
148 | cond_syscall(sys_eventfd); | 150 | cond_syscall(sys_eventfd); |
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 3db5c3c460..51b6a6a615 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
@@ -74,7 +74,7 @@ static struct clocksource *watchdog; | |||
74 | static struct timer_list watchdog_timer; | 74 | static struct timer_list watchdog_timer; |
75 | static DEFINE_SPINLOCK(watchdog_lock); | 75 | static DEFINE_SPINLOCK(watchdog_lock); |
76 | static cycle_t watchdog_last; | 76 | static cycle_t watchdog_last; |
77 | static int watchdog_resumed; | 77 | static unsigned long watchdog_resumed; |
78 | 78 | ||
79 | /* | 79 | /* |
80 | * Interval: 0.5sec Threshold: 0.0625s | 80 | * Interval: 0.5sec Threshold: 0.0625s |
@@ -104,9 +104,7 @@ static void clocksource_watchdog(unsigned long data) | |||
104 | 104 | ||
105 | spin_lock(&watchdog_lock); | 105 | spin_lock(&watchdog_lock); |
106 | 106 | ||
107 | resumed = watchdog_resumed; | 107 | resumed = test_and_clear_bit(0, &watchdog_resumed); |
108 | if (unlikely(resumed)) | ||
109 | watchdog_resumed = 0; | ||
110 | 108 | ||
111 | wdnow = watchdog->read(); | 109 | wdnow = watchdog->read(); |
112 | wd_nsec = cyc2ns(watchdog, (wdnow - watchdog_last) & watchdog->mask); | 110 | wd_nsec = cyc2ns(watchdog, (wdnow - watchdog_last) & watchdog->mask); |
@@ -151,9 +149,7 @@ static void clocksource_watchdog(unsigned long data) | |||
151 | } | 149 | } |
152 | static void clocksource_resume_watchdog(void) | 150 | static void clocksource_resume_watchdog(void) |
153 | { | 151 | { |
154 | spin_lock(&watchdog_lock); | 152 | set_bit(0, &watchdog_resumed); |
155 | watchdog_resumed = 1; | ||
156 | spin_unlock(&watchdog_lock); | ||
157 | } | 153 | } |
158 | 154 | ||
159 | static void clocksource_check_watchdog(struct clocksource *cs) | 155 | static void clocksource_check_watchdog(struct clocksource *cs) |
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index f9217bf644..3d1042f82a 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -273,6 +273,8 @@ static int timekeeping_resume(struct sys_device *dev) | |||
273 | unsigned long flags; | 273 | unsigned long flags; |
274 | unsigned long now = read_persistent_clock(); | 274 | unsigned long now = read_persistent_clock(); |
275 | 275 | ||
276 | clocksource_resume(); | ||
277 | |||
276 | write_seqlock_irqsave(&xtime_lock, flags); | 278 | write_seqlock_irqsave(&xtime_lock, flags); |
277 | 279 | ||
278 | if (now && (now > timekeeping_suspend_time)) { | 280 | if (now && (now > timekeeping_suspend_time)) { |
diff --git a/kernel/timer.c b/kernel/timer.c index a6c580ac08..5ec5490f8d 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1499,8 +1499,6 @@ unregister_time_interpolator(struct time_interpolator *ti) | |||
1499 | prev = &curr->next; | 1499 | prev = &curr->next; |
1500 | } | 1500 | } |
1501 | 1501 | ||
1502 | clocksource_resume(); | ||
1503 | |||
1504 | write_seqlock_irqsave(&xtime_lock, flags); | 1502 | write_seqlock_irqsave(&xtime_lock, flags); |
1505 | if (ti == time_interpolator) { | 1503 | if (ti == time_interpolator) { |
1506 | /* we lost the best time-interpolator: */ | 1504 | /* we lost the best time-interpolator: */ |