From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: "Suzuki K. Poulose" <suzuki@in.ibm.com>
Cc: oleg@redhat.com, ananth@in.ibm.com, srikar@linux.vnet.ibm.com,
peterz@infradead.org, benh@kernel.crashing.org, mingo@elte.hu,
anton@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] powerpc: Move the single step enable code to a generic path
Date: Mon, 26 Nov 2012 19:10:26 +0100 [thread overview]
Message-ID: <50B3B092.90605@linutronix.de> (raw)
In-Reply-To: <20121126110448.6545.90588.stgit@suzukikp.in.ibm.com>
On 11/26/2012 12:05 PM, Suzuki K. Poulose wrote:
> diff --git a/arch/powerpc/include/asm/probes.h b/arch/powerpc/include/asm/probes.h
> index 5f1e15b..836e9b9 100644
> --- a/arch/powerpc/include/asm/probes.h
> +++ b/arch/powerpc/include/asm/probes.h
> @@ -38,5 +38,34 @@ typedef u32 ppc_opcode_t;
> #define is_trap(instr) (IS_TW(instr) || IS_TWI(instr))
> #endif /* CONFIG_PPC64 */
>
> +#ifdef CONFIG_PPC_ADV_DEBUG_REGS
> +#define MSR_SINGLESTEP (MSR_DE)
> +#else
> +#define MSR_SINGLESTEP (MSR_SE)
> +#endif
> +
> +/* Enable single stepping for the current task */
> +static inline void enable_single_step(struct pt_regs *regs)
> +{
> +
> + /*
> + * We turn off async exceptions to ensure that the single step will
> + * be for the instruction we have the kprobe on, if we dont its
it is
> + * possible we'd get the single step reported for an exception handler
> + * like Decrementer or External Interrupt
> + */
Hmmm. The TRM for E400 says
|5.11.1 e500 Exception Priorities
|The following is a prioritized listing of e500 exceptions:
| 4. Critical input
| 5. Debug interrupt
| 6. External input
| 22. Decrementer
The list has been cut down a little. That means the debug interrupt
comes before external interrupt and before the decrement fires.
And if single step is what wakes you up then DBSR[ICMP] is set. Am I
missing something or is this FSL only not not book-e
> #endif /* __KERNEL__ */
> #endif /* _ASM_POWERPC_PROBES_H */
Sebastian
next prev parent reply other threads:[~2012-11-26 18:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-26 11:04 [PATCH 0/2] uprobes/powerpc: Replace ptrace single step helpers Suzuki K. Poulose
2012-11-26 11:05 ` [PATCH 1/2] powerpc: Move the single step enable code to a generic path Suzuki K. Poulose
2012-11-26 18:10 ` Sebastian Andrzej Siewior [this message]
2012-11-27 9:18 ` Suzuki K. Poulose
2012-11-26 11:06 ` [PATCH 2/2] uprobes/powerpc: Make use of generic routines to enable single step Suzuki K. Poulose
2012-11-26 17:01 ` Oleg Nesterov
2012-11-27 4:56 ` Suzuki K. Poulose
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50B3B092.90605@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=ananth@in.ibm.com \
--cc=anton@redhat.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=suzuki@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.