diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-06-02 02:05:42 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-06-02 02:05:42 -0400 |
commit | f407a8258610169cd8e975dba7f0b2824562014c (patch) | |
tree | 6c87b2d168a4665411a9e16b9f481599f2db25bc /drivers/s390/crypto/ap_bus.c | |
parent | 960d447b94b22ceba286917056871d1dac8da697 (diff) | |
parent | c46a024ea5eb0165114dbbc8c82c29b7bcf66e71 (diff) |
Merge branch 'linus' into sched/core, to resolve conflict
Conflicts:
arch/sparc/include/asm/topology_64.h
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/s390/crypto/ap_bus.c')
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index f0b9871a4bbd..3ba611419759 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -1158,11 +1158,12 @@ static ssize_t poll_timeout_store(struct bus_type *bus, const char *buf, | |||
1158 | poll_timeout = time; | 1158 | poll_timeout = time; |
1159 | hr_time = ktime_set(0, poll_timeout); | 1159 | hr_time = ktime_set(0, poll_timeout); |
1160 | 1160 | ||
1161 | if (!hrtimer_is_queued(&ap_poll_timer) || | 1161 | spin_lock_bh(&ap_poll_timer_lock); |
1162 | !hrtimer_forward(&ap_poll_timer, hrtimer_get_expires(&ap_poll_timer), hr_time)) { | 1162 | hrtimer_cancel(&ap_poll_timer); |
1163 | hrtimer_set_expires(&ap_poll_timer, hr_time); | 1163 | hrtimer_set_expires(&ap_poll_timer, hr_time); |
1164 | hrtimer_start_expires(&ap_poll_timer, HRTIMER_MODE_ABS); | 1164 | hrtimer_start_expires(&ap_poll_timer, HRTIMER_MODE_ABS); |
1165 | } | 1165 | spin_unlock_bh(&ap_poll_timer_lock); |
1166 | |||
1166 | return count; | 1167 | return count; |
1167 | } | 1168 | } |
1168 | 1169 | ||
@@ -1528,14 +1529,11 @@ static inline void __ap_schedule_poll_timer(void) | |||
1528 | ktime_t hr_time; | 1529 | ktime_t hr_time; |
1529 | 1530 | ||
1530 | spin_lock_bh(&ap_poll_timer_lock); | 1531 | spin_lock_bh(&ap_poll_timer_lock); |
1531 | if (hrtimer_is_queued(&ap_poll_timer) || ap_suspend_flag) | 1532 | if (!hrtimer_is_queued(&ap_poll_timer) && !ap_suspend_flag) { |
1532 | goto out; | ||
1533 | if (ktime_to_ns(hrtimer_expires_remaining(&ap_poll_timer)) <= 0) { | ||
1534 | hr_time = ktime_set(0, poll_timeout); | 1533 | hr_time = ktime_set(0, poll_timeout); |
1535 | hrtimer_forward_now(&ap_poll_timer, hr_time); | 1534 | hrtimer_forward_now(&ap_poll_timer, hr_time); |
1536 | hrtimer_restart(&ap_poll_timer); | 1535 | hrtimer_restart(&ap_poll_timer); |
1537 | } | 1536 | } |
1538 | out: | ||
1539 | spin_unlock_bh(&ap_poll_timer_lock); | 1537 | spin_unlock_bh(&ap_poll_timer_lock); |
1540 | } | 1538 | } |
1541 | 1539 | ||
@@ -1952,7 +1950,7 @@ static void ap_reset_domain(void) | |||
1952 | { | 1950 | { |
1953 | int i; | 1951 | int i; |
1954 | 1952 | ||
1955 | if (ap_domain_index != -1) | 1953 | if ((ap_domain_index != -1) && (ap_test_config_domain(ap_domain_index))) |
1956 | for (i = 0; i < AP_DEVICES; i++) | 1954 | for (i = 0; i < AP_DEVICES; i++) |
1957 | ap_reset_queue(AP_MKQID(i, ap_domain_index)); | 1955 | ap_reset_queue(AP_MKQID(i, ap_domain_index)); |
1958 | } | 1956 | } |
@@ -2097,7 +2095,6 @@ void ap_module_exit(void) | |||
2097 | hrtimer_cancel(&ap_poll_timer); | 2095 | hrtimer_cancel(&ap_poll_timer); |
2098 | destroy_workqueue(ap_work_queue); | 2096 | destroy_workqueue(ap_work_queue); |
2099 | tasklet_kill(&ap_tasklet); | 2097 | tasklet_kill(&ap_tasklet); |
2100 | root_device_unregister(ap_root_device); | ||
2101 | while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, | 2098 | while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, |
2102 | __ap_match_all))) | 2099 | __ap_match_all))) |
2103 | { | 2100 | { |
@@ -2106,6 +2103,7 @@ void ap_module_exit(void) | |||
2106 | } | 2103 | } |
2107 | for (i = 0; ap_bus_attrs[i]; i++) | 2104 | for (i = 0; ap_bus_attrs[i]; i++) |
2108 | bus_remove_file(&ap_bus_type, ap_bus_attrs[i]); | 2105 | bus_remove_file(&ap_bus_type, ap_bus_attrs[i]); |
2106 | root_device_unregister(ap_root_device); | ||
2109 | bus_unregister(&ap_bus_type); | 2107 | bus_unregister(&ap_bus_type); |
2110 | unregister_reset_call(&ap_reset_call); | 2108 | unregister_reset_call(&ap_reset_call); |
2111 | if (ap_using_interrupts()) | 2109 | if (ap_using_interrupts()) |