summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorManuel Bentele2020-08-27 11:02:30 +0200
committerManuel Bentele2020-08-27 11:02:30 +0200
commit47c8cb8c78fbace1e5edb2107fc1c4dcbe7058be (patch)
tree55ce28fa6fc8c36b09ac62cec87587c1d987966e /CMakeLists.txt
parentcmake: Fixed missing include paths to build the Linux kernel module (diff)
downloaddnbd3-47c8cb8c78fbace1e5edb2107fc1c4dcbe7058be.tar.gz
dnbd3-47c8cb8c78fbace1e5edb2107fc1c4dcbe7058be.tar.xz
dnbd3-47c8cb8c78fbace1e5edb2107fc1c4dcbe7058be.zip
[KERNEL] convert to blk-mq and ktime
This converts the dnbd3 kernel module driver to use the blk-mq infrastructure, which allows the dnbd3 kernel module driver to be compatible with Linux kernels in version 5.x or later. The conversion of the implementation uses one hardware queue to preserve the existing send/receive and load-balancing logic, but can be scaled up in the future. In addition to that, time measurements in the implementation are converted to ktime based accessors to replace the use of deprecated time interfaces.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18ff147..21865e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -231,8 +231,14 @@ IF(BUILD_KERNEL_MODULE)
SET(KERNEL_DIR "/lib/modules/${CMAKE_SYSTEM_VERSION}/build")
ENDIF()
+ SET(KERNEL_C_FLAGS "")
+ IF(KERNEL_C_FLAGS MATCHES Debug)
+ SET(KERNEL_C_FLAGS "-g -DDEBUG")
+ ENDIF()
+
SET(KBUILD_COMMAND ${CMAKE_MAKE_PROGRAM} -C ${KERNEL_DIR}
M=${CMAKE_BINARY_DIR} modules
+ EXTRA_CFLAGS=${KERNEL_C_FLAGS}
)
CONFIGURE_FILE(Kbuild.in ${CMAKE_BINARY_DIR}/Kbuild)