[Crash-utility] [PATCH v2] defs.h: Fix the value of TIF_SIGPENDING macro

lijiang lijiang at redhat.com
Mon Jun 7 07:12:35 UTC 2021


> Date: Thu,  3 Jun 2021 16:07:41 +0800
> From: Youling Tang <tangyouling at loongson.cn>
> To: HAGIO KAZUHITO(?????)       <k-hagio-ab at nec.com>
> Cc: "crash-utility at redhat.com" <crash-utility at redhat.com>
> Subject: [Crash-utility] [PATCH v2] defs.h: Fix the value of
>         TIF_SIGPENDING  macro
> Message-ID:
>         <1622707661-29691-1-git-send-email-tangyouling at loongson.cn>
> Content-Type: text/plain; charset="US-ASCII"
>
> 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
>

For the patch series:    Acked-by: Lianbo Jiang <lijiang at redhat.com>
[PATCH v2 1/3] defs.h: Fix the value of TIF_SIGPENDING  macro
[PATCH 2/3] MIPS64: Modify the comment of mips64_register structure
[PATCH 3/3] MIPS64: Add support for ramdump type

> Signed-off-by: Youling Tang <tangyouling at loongson.cn>
> ---
>  defs.h | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/defs.h b/defs.h
> index 396d61a..3502c6d 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
> @@ -3377,7 +3377,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
> @@ -3416,7 +3416,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
> @@ -3884,7 +3884,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
> @@ -4079,7 +4079,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))
> @@ -4219,7 +4219,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)
> @@ -4259,7 +4259,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
> @@ -4284,7 +4284,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.1.0
>




More information about the Crash-utility mailing list