diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 0e28285048eaac9d09c29a6909d4b0bf2c549ffd..07be8453ccbaf7b3ceccadef680aecfa51ea451b 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -7,6 +7,13 @@
 Change Log
 ==========
 
+[4.0.5] - 2021-07-29
+====================
+Fixed
+-----
+- [sw] support for Linux versions greater than 5.8
+
+
 [4.0.4] - 2019-10-21
 ====================
 Changed
diff --git a/software/kernel/mockturtle-core.c b/software/kernel/mockturtle-core.c
index 65c116746a931623d644f6d7a712db535dd5d877..13e596aa8ec1eb88be9f82ff899a54c742f90cd2 100644
--- a/software/kernel/mockturtle-core.c
+++ b/software/kernel/mockturtle-core.c
@@ -28,6 +28,7 @@
 #include <linux/mod_devicetable.h>
 #include <linux/uaccess.h>
 #include <linux/version.h>
+#include <linux/io.h>
 
 #include <mockturtle/hw/mockturtle_cpu_csr.h>
 #include <mockturtle/hw/mockturtle_queue.h>
diff --git a/software/kernel/mockturtle-drv.h b/software/kernel/mockturtle-drv.h
index 75e392981559270e1c5fad5770ee3a6ef0df5c48..da3cba820e9439704ae9ba34659bb2e83387f005 100644
--- a/software/kernel/mockturtle-drv.h
+++ b/software/kernel/mockturtle-drv.h
@@ -12,6 +12,7 @@
 #include <linux/irqreturn.h>
 #include <linux/circ_buf.h>
 #include <linux/tty.h>
+#include <linux/version.h>
 
 #include "mockturtle/hw/mockturtle_addresses.h"
 #include "mockturtle/hw/mockturtle_queue.h"
@@ -76,7 +77,11 @@ static inline uint32_t trtl_get_sequence(struct trtl_msg *msg)
 }
 
 struct trtl_memory_ops {
+#if KERNEL_VERSION(5, 8, 0) <= LINUX_VERSION_CODE
+	u32 (*read)(const void *addr);
+#else
 	u32 (*read)(void *addr);
+#endif
 	void (*write)(u32 value, void *addr);
 };