diff mbox series

[09/18] header: Add HRTIMER_MODE_{ABS,REL}_SOFT

Message ID 20190701214914.8066-10-hauke@hauke-m.de (mailing list archive)
State Accepted
Headers show
Series backports: Update for kernel 5.2 | expand

Commit Message

Hauke Mehrtens July 1, 2019, 9:49 p.m. UTC
mac80211_hwsim uses HRTIMER_MODE_ABS_SOFT and HRTIMER_MODE_REL_SOFT now.
These enum entries were added in commit 98ecadd4305d ("hrtimer: Add
clock bases and hrtimer mode for softirq context") in kernel 4.16.
This will execute the timers in hard interrupt context and not in soft
interrupt context like intended.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/hrtimer.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 backport/backport-include/linux/hrtimer.h
diff mbox series

Patch

diff --git a/backport/backport-include/linux/hrtimer.h b/backport/backport-include/linux/hrtimer.h
new file mode 100644
index 00000000..1152a58e
--- /dev/null
+++ b/backport/backport-include/linux/hrtimer.h
@@ -0,0 +1,13 @@ 
+#ifndef __BACKPORT_LINUX_HRTIMER_H
+#define __BACKPORT_LINUX_HRTIMER_H
+#include <linux/version.h>
+#include_next <linux/hrtimer.h>
+
+#if LINUX_VERSION_IS_LESS(4,16,0)
+
+#define HRTIMER_MODE_ABS_SOFT HRTIMER_MODE_ABS
+#define HRTIMER_MODE_REL_SOFT HRTIMER_MODE_REL
+
+#endif /* < 4.16 */
+
+#endif /* __BACKPORT_LINUX_HRTIMER_H */