1 Star 0 Fork 44

lijianglin/crash

forked from src-openEuler/crash 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0011-Fix-macro-TIF_SIGPENDING-values.patch 3.35 KB
一键复制 编辑 原始数据 按行查看 历史
huskartang 提交于 2022-12-29 17:00 . keep upstream info in patches
From 704623dfde43da98ffb354b3d7f450cd012a8215 Mon Sep 17 00:00:00 2001
From: Youling Tang <tangyouling@loongson.cn>
Date: Thu, 3 Jun 2021 16:07:41 +0800
Subject: [PATCH 2/2] defs.h: Fix the value of TIF_SIGPENDING macro
Correct the change of the value of TIF_SIGPENDING macro between
different kernel versions.
TIF_SIGPENDING changes with the kernel version as follows:
ARM 2 -> 0 at v2.6.23
MIPS 2 -> 1 at v2.6.23
MIPS64 2 -> 1 at v2.6.23
PPC 2 -> 1 at v2.6.23
IA64 1 -> 0 at v2.6.23
PPC64 2 -> 1 at v2.6.23
S390 2 -> 1 at v3.16
S390X 2 -> 1 at v3.16
Signed-off-by: Youling Tang <tangyouling@loongson.cn>
---
defs.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/defs.h b/defs.h
index c7cea8e..b253579 100644
--- a/defs.h
+++ b/defs.h
@@ -2997,7 +2997,7 @@ typedef struct QEMUCPUState QEMUCPUState;
#define __swp_type(entry) SWP_TYPE(entry)
#define __swp_offset(entry) SWP_OFFSET(entry)
-#define TIF_SIGPENDING (2)
+#define TIF_SIGPENDING (THIS_KERNEL_VERSION >= LINUX(2,6,23) ? 0 : 2)
#define _SECTION_SIZE_BITS 28
#define _MAX_PHYSMEM_BITS 32
@@ -3382,7 +3382,7 @@ struct arm64_stackframe {
#define __swp_type(entry) SWP_TYPE(entry)
#define __swp_offset(entry) SWP_OFFSET(entry)
-#define TIF_SIGPENDING (2)
+#define TIF_SIGPENDING (THIS_KERNEL_VERSION >= LINUX(2,6,23) ? 1 : 2)
#define _SECTION_SIZE_BITS 26
#define _MAX_PHYSMEM_BITS 32
@@ -3421,7 +3421,7 @@ struct arm64_stackframe {
#define __swp_type(entry) SWP_TYPE(entry)
#define __swp_offset(entry) SWP_OFFSET(entry)
-#define TIF_SIGPENDING (2)
+#define TIF_SIGPENDING (THIS_KERNEL_VERSION >= LINUX(2,6,23) ? 1 : 2)
#define _SECTION_SIZE_BITS 28
#define _MAX_PHYSMEM_BITS 48
@@ -3889,7 +3889,7 @@ struct machine_specific {
#define __swp_type(entry) SWP_TYPE(entry)
#define __swp_offset(entry) SWP_OFFSET(entry)
-#define TIF_SIGPENDING (2)
+#define TIF_SIGPENDING (THIS_KERNEL_VERSION >= LINUX(2,6,23) ? 1 : 2)
#define _SECTION_SIZE_BITS 24
#define _MAX_PHYSMEM_BITS 44
@@ -4084,7 +4084,7 @@ struct efi_memory_desc_t {
#define __swp_type(entry) ((entry >> 2) & 0x7f)
#define __swp_offset(entry) ((entry << 1) >> 10)
-#define TIF_SIGPENDING (1)
+#define TIF_SIGPENDING (THIS_KERNEL_VERSION >= LINUX(2,6,23) ? 0 : 1)
#define KERNEL_TR_PAGE_SIZE (1 << _PAGE_SIZE_64M)
#define KERNEL_TR_PAGE_MASK (~(KERNEL_TR_PAGE_SIZE - 1))
@@ -4224,7 +4224,7 @@ struct efi_memory_desc_t {
#define PTE_RPN_MASK (machdep->machspec->pte_rpn_mask)
#define PTE_RPN_SHIFT (machdep->machspec->pte_rpn_shift)
-#define TIF_SIGPENDING (2)
+#define TIF_SIGPENDING (THIS_KERNEL_VERSION >= LINUX(2,6,23) ? 1 : 2)
#define SWP_TYPE(entry) (((entry) >> 1) & 0x7f)
#define SWP_OFFSET(entry) ((entry) >> 8)
@@ -4264,7 +4264,7 @@ struct efi_memory_desc_t {
#define __swp_type(entry) SWP_TYPE(entry)
#define __swp_offset(entry) SWP_OFFSET(entry)
-#define TIF_SIGPENDING (2)
+#define TIF_SIGPENDING (THIS_KERNEL_VERSION >= LINUX(3,16,0) ? 1 : 2)
#define _SECTION_SIZE_BITS 25
#define _MAX_PHYSMEM_BITS 31
@@ -4289,7 +4289,7 @@ struct efi_memory_desc_t {
#define __swp_type(entry) SWP_TYPE(entry)
#define __swp_offset(entry) SWP_OFFSET(entry)
-#define TIF_SIGPENDING (2)
+#define TIF_SIGPENDING (THIS_KERNEL_VERSION >= LINUX(3,16,0) ? 1 : 2)
#define _SECTION_SIZE_BITS 28
#define _MAX_PHYSMEM_BITS_OLD 42
--
2.7.4
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lijianglin6/crash.git
git@gitee.com:lijianglin6/crash.git
lijianglin6
crash
crash
master

搜索帮助