ARM: 8982/1: mm: Simplify act_mm macro
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 27 May 2020 14:19:50 +0000 (15:19 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Tue, 21 Jul 2020 15:33:36 +0000 (16:33 +0100)
The act_mm assembly macro is actually partly reimplementing
get_thread_info so let's just use that.

Suggested-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/mm/proc-macros.S

index 60ac7c5..e2c743a 100644 (file)
@@ -5,7 +5,6 @@
  *  VMA_VM_FLAGS
  *  VM_EXEC
  */
-#include <linux/const.h>
 #include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
 
@@ -31,8 +30,7 @@
  * act_mm - get current->active_mm
  */
        .macro  act_mm, rd
-       bic     \rd, sp, #(THREAD_SIZE - 1) & ~63
-       bic     \rd, \rd, #63
+       get_thread_info \rd
        ldr     \rd, [\rd, #TI_TASK]
        .if (TSK_ACTIVE_MM > IMM12_MASK)
        add     \rd, \rd, #TSK_ACTIVE_MM & ~IMM12_MASK