Commit 2654ebb7 authored by He Sheng's avatar He Sheng Committed by guzitao
Browse files

sw64: activate CONFIG_THREAD_INFO_IN_TASK

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I6ILGG



--------------------------------

This patch activates CONFIG_THREAD_INFO_IN_TASK which moves the
thread_info into task_struct.

This has the following consequences:
  - thread_info is now located at the beginning of task_struct.
  - thread_info doesn't have anymore the `task` field.

This patch:
  - Adds hmcall wrktp and rdktp to save/restore `current` task
    pointer.
  - Changes the current_thread_info() macro to point to `current`.
  - Selects CONFIG_THREAD_INFO_IN_TASK.
  - Modifies raw_smp_processor_id() to get ->cpu from `current`
    without including linux/sched.h to avoid circular inclusion and
    without including asm/asm-offsets.h to avoid symbol names
    duplication between ASM constants and C constants.
  - Modifies task_pt_regs() macro to avoid error which says that
    task_stack_page() is undefined. This error can not be fixed by
    including linux/sched.h which results in circular inclusion.

Signed-off-by: default avatarHe Sheng <hesheng@wxiat.com>
Reviewed-by: default avatarCui Wei <cuiwei@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent 8b3e7f37
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment