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

Hauke Mehrtens <[email protected]>
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
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 <[email protected]>
---
 backport/backport-include/linux/hrtimer.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 backport/backport-include/linux/hrtimer.h

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 */
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.