[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121203151544.GB6333@in.ibm.com>
Date: Mon, 3 Dec 2012 20:45:44 +0530
From: Ananth N Mavinakayanahalli <ananth@...ibm.com>
To: "Suzuki K. Poulose" <suzuki@...ibm.com>
Cc: bigeasy@...utronix.de, oleg@...hat.com, srikar@...ux.vnet.ibm.com,
peterz@...radead.org, benh@...nel.crashing.org, mingo@...e.hu,
anton@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/4] uprobes/powerpc: Introduce routines for
save/restore context
On Mon, Dec 03, 2012 at 08:39:35PM +0530, Suzuki K. Poulose wrote:
> From: Suzuki K. Poulose <suzuki@...ibm.com>
>
> Introduce routines for saving and restoring the context
> befre/after the single step. No functional changes involved.
>
> These will be extended later to save/restore more info about
> the process once we replace the ptrace helpers.
>
> Signed-off-by: Suzuki K. Poulose <suzuki@...ibm.com>
> ---
> arch/powerpc/kernel/uprobes.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/kernel/uprobes.c b/arch/powerpc/kernel/uprobes.c
> index bc77834..1a62353 100644
> --- a/arch/powerpc/kernel/uprobes.c
> +++ b/arch/powerpc/kernel/uprobes.c
> @@ -52,6 +52,16 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe,
> return 0;
> }
>
> +static void uprobe_save_context_sstep(struct arch_uprobe_task *autask)
> +{
> + autask->saved_trap_nr = current->thread.trap_nr;
> +}
> +
> +static void uprobe_restore_context_sstep(struct arch_uprobe_task *autask)
> +{
> + current->thread.trap_nr = autask->saved_trap_nr;
> +}
Can't the two above be inline?
Ananth
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists