Re: [PATCH] x86: simplify task_pt_regs() macro definition

From: Steven Rostedt
Date: Fri Mar 13 2015 - 14:26:11 EST


On Fri, 13 Mar 2015 15:09:03 +0100
Denys Vlasenko <dvlasenk@xxxxxxxxxx> wrote:

> Before this change, task_pt_regs() was using KSTK_TOP(),
> and it was the only use of that macro. In turn, KSTK_TOP used
> THREAD_SIZE_LONGS, and it was the only use of that macro too.
>
> Fold these macros into task_pt_regs(). Tweak comment
> about "- 8" - we now use a symbolic constant, not literal 8.

I wonder if we should mention "8" at all?

As for the patch, from what I can tell, it keeps the same logic.

Reviewed-by: Steven Rostedt <rostedt@xxxxxxxxxxx>

-- Steve

> Signed-off-by: Denys Vlasenko <dvlasenk@xxxxxxxxxx>
> CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> CC: Steven Rostedt <rostedt@xxxxxxxxxxx>
> CC: Ingo Molnar <mingo@xxxxxxxxxx>
> CC: Borislav Petkov <bp@xxxxxxxxx>
> CC: "H. Peter Anvin" <hpa@xxxxxxxxx>
> CC: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
> CC: Oleg Nesterov <oleg@xxxxxxxxxx>
> CC: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> CC: Alexei Starovoitov <ast@xxxxxxxxxxxx>
> CC: Will Drewry <wad@xxxxxxxxxxxx>
> CC: Kees Cook <keescook@xxxxxxxxxxxx>
> CC: x86@xxxxxxxxxx
> CC: linux-kernel@xxxxxxxxxxxxxxx
> ---
> arch/x86/include/asm/processor.h | 20 ++++++--------------
> 1 file changed, 6 insertions(+), 14 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/