summaryrefslogtreecommitdiff
path: root/SOURCE
diff options
context:
space:
mode:
authorBaoyou Xie <[email protected]>2022-04-11 10:42:48 +0800
committerBaoyou Xie <[email protected]>2022-04-11 10:42:48 +0800
commit6c2c7a89109a1542ef61cb1f2e229910cae52663 (patch)
tree8023989c16b9081486fde86a8249b7177b7bd331 /SOURCE
parent3c91fb2c65cee189ed7a309f1050d88711e40b93 (diff)
diagnose-tools: sched-delay: 支持5.10
Diffstat (limited to 'SOURCE')
-rwxr-xr-xSOURCE/module/Makefile7
-rwxr-xr-xSOURCE/module/kernel/sched_delay.c10
2 files changed, 14 insertions, 3 deletions
diff --git a/SOURCE/module/Makefile b/SOURCE/module/Makefile
index 5c945e5..c3dadc8 100755
--- a/SOURCE/module/Makefile
+++ b/SOURCE/module/Makefile
@@ -140,7 +140,12 @@ ifneq ($(findstring alios7.x86_64,$(KERNEL_BUILD_PATH)),)
ifneq ($(findstring ali5000,$(KERNEL_BUILD_PATH)),)
DIAG_EXTRA_CFLAGS += -DALIOS_5000
-
+ ifneq ($(findstring -003,$(KERNEL_BUILD_PATH)),)
+ DIAG_EXTRA_CFLAGS += -DALIOS_5000_003
+ endif
+ ifneq ($(findstring -004,$(KERNEL_BUILD_PATH)),)
+ DIAG_EXTRA_CFLAGS += -DALIOS_5000_004
+ endif
endif
endif
diff --git a/SOURCE/module/kernel/sched_delay.c b/SOURCE/module/kernel/sched_delay.c
index 43a1248..9e10222 100755
--- a/SOURCE/module/kernel/sched_delay.c
+++ b/SOURCE/module/kernel/sched_delay.c
@@ -47,9 +47,15 @@
#include "uapi/sched_delay.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) && !defined(UBUNTU_1604) \
- && LINUX_VERSION_CODE <= KERNEL_VERSION(4, 20, 0)
+ && LINUX_VERSION_CODE <= KERNEL_VERSION(5, 11, 0) && !defined(ALIOS_5000_003)
-#if defined(ALIOS_4000)
+#if defined(ALIOS_5000)
+static unsigned long *get_last_queued_addr(struct task_struct *p)
+{
+ return &p->ali_diag_reserved1;
+}
+
+#elif defined(ALIOS_4000)
static unsigned long *get_last_queued_addr(struct task_struct *p)
{
/**