]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.arch/s390-15-10-zcrypt-hrtimer-scheduling.patch
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / s390-15-10-zcrypt-hrtimer-scheduling.patch
1 From: Gerald Schaefer <geraldsc@de.ibm.com>
2 Subject: zcrypt: fix z90crypt kernel modules causes 100% cpu usage
3 References: bnc#518291,LTC#54925
4
5 Symptom: 100% cpu usage
6 Problem: ap_poll_timer expires permanently and is restarts
7 Solution: Only restart ap_poll_timer when it expires and do it in the
8 future.
9
10 Acked-by: John Jolly <jjolly@suse.de>
11 ---
12 Index: linux-sles11/drivers/s390/crypto/ap_bus.c
13 ===================================================================
14 --- linux-sles11.orig/drivers/s390/crypto/ap_bus.c
15 +++ linux-sles11/drivers/s390/crypto/ap_bus.c
16 @@ -930,10 +930,16 @@ ap_config_timeout(unsigned long ptr)
17 */
18 static inline void ap_schedule_poll_timer(void)
19 {
20 + ktime_t hr_time;
21 if (hrtimer_is_queued(&ap_poll_timer))
22 return;
23 - hrtimer_start(&ap_poll_timer, ktime_set(0, poll_timeout),
24 - HRTIMER_MODE_ABS);
25 +
26 + if (ktime_to_ns(hrtimer_get_remaining(&ap_poll_timer)) <= 0) {
27 + hr_time = ktime_set(0, poll_timeout);
28 + hrtimer_forward_now(&ap_poll_timer, hr_time);
29 + hrtimer_restart(&ap_poll_timer);
30 + }
31 + return;
32 }
33
34 /**