Message ID | 20200527115618.92792-1-linus.walleij@linaro.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | 2631781213eed013c4a3080e5195d95cf1685d7f |
Headers | show |
Series | [v2] ARM: mm: Simplify act_mm macro | expand |
On Wed, May 27, 2020 at 01:56:18PM +0200, Linus Walleij wrote: > The act_mm assembly macro is actually partly reimplementing > get_thread_info so let's just use that. > > Suggested-by: Russell King <linux@armlinux.org.uk> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- > ChangeLog v1->v2: > - Accidentally removed the index to the active task which > is what we want here. Yep, this version is purrfec. Thanks. > --- > arch/arm/mm/proc-macros.S | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S > index 60ac7c5999a9..e2c743aa2eb2 100644 > --- a/arch/arm/mm/proc-macros.S > +++ b/arch/arm/mm/proc-macros.S > @@ -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 > -- > 2.25.4 > >
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 60ac7c5999a9..e2c743aa2eb2 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S @@ -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
The act_mm assembly macro is actually partly reimplementing get_thread_info so let's just use that. Suggested-by: Russell King <linux@armlinux.org.uk> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- ChangeLog v1->v2: - Accidentally removed the index to the active task which is what we want here. --- arch/arm/mm/proc-macros.S | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)