diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2016-02-18 18:50:04 +0300 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2016-02-18 20:27:05 +0300 |
commit | e950631e84e7e38892ffbeee5e1816b270026b0e (patch) | |
tree | a2234702351229d51ddedfb6944f2e91c85dfde3 /arch/arm64/kernel/process.c | |
parent | 705441960033e66b63524521f153fbb28c99ddbd (diff) | |
download | linux-e950631e84e7e38892ffbeee5e1816b270026b0e.tar.xz |
arm64: Remove the get_thread_info() function
This function was introduced by previous commits implementing UAO.
However, it can be replaced with task_thread_info() in
uao_thread_switch() or get_fs() in do_page_fault() (the latter being
called only on the current context, so no need for using the saved
pt_regs).
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/process.c')
-rw-r--r-- | arch/arm64/kernel/process.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index c1ca4ea065d4..80624829db61 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -315,15 +315,12 @@ static void tls_thread_switch(struct task_struct *next) /* Restore the UAO state depending on next's addr_limit */ static void uao_thread_switch(struct task_struct *next) { - unsigned long next_sp = next->thread.cpu_context.sp; - - if (IS_ENABLED(CONFIG_ARM64_UAO) && - get_thread_info(next_sp)->addr_limit == KERNEL_DS) - asm(ALTERNATIVE("nop", SET_PSTATE_UAO(1), ARM64_HAS_UAO, - CONFIG_ARM64_UAO)); - else - asm(ALTERNATIVE("nop", SET_PSTATE_UAO(0), ARM64_HAS_UAO, - CONFIG_ARM64_UAO)); + if (IS_ENABLED(CONFIG_ARM64_UAO)) { + if (task_thread_info(next)->addr_limit == KERNEL_DS) + asm(ALTERNATIVE("nop", SET_PSTATE_UAO(1), ARM64_HAS_UAO)); + else + asm(ALTERNATIVE("nop", SET_PSTATE_UAO(0), ARM64_HAS_UAO)); + } } /* |