From: Jason Wessel <jason.wessel@windriver.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
linux-kernel@vger.kernel.org,
kgdb-bugreport@lists.sourceforge.net
Subject: Re: [GIT PULL] kgdb regression fixes for 2.6.35-rc5
Date: Wed, 28 Jul 2010 19:14:42 -0500 [thread overview]
Message-ID: <4C50C7F2.8020305@windriver.com> (raw)
In-Reply-To: <AANLkTikXGm0WK+N=YMWJc+hBgVAyLc0adu4K1iX5UMW=@mail.gmail.com>
On 07/28/2010 04:26 PM, Linus Torvalds wrote:
> On Wed, Jul 28, 2010 at 2:17 PM, Frederic Weisbecker <fweisbec@gmail.com> wrote:
>> I'm sorry I spot it a bit late.
>> There is a little issue in this patch, irqs won't
>> be restored:
>>
>> @@ -588,9 +588,10 @@ int kgdb_ll_trap(int cmd, const char *str,
>> if (!kgdb_io_module_registered)
>> return NOTIFY_DONE;
>>
>> + local_irq_save(flags);
>> return __kgdb_notify(&args, cmd);
>> + local_irq_restore(flags);
>> }
>
> Yeah, that's obviously crap. I also wonder why __kgdb_notify messes up
> the flags to begin with.
>
This should not be needed as the irqs should already be off while in the overflow handler.
Sorry for the noise on the one. I updated the for_linus branch with the final version.
1 files changed, 7 insertions(+), 2 deletions(-)
--
--- a/arch/x86/kernel/kgdb.c
+++ b/arch/x86/kernel/kgdb.c
@@ -572,7 +572,6 @@ static int __kgdb_notify(struct die_args *args, unsigned long cmd)
return NOTIFY_STOP;
}
-#ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
int kgdb_ll_trap(int cmd, const char *str,
struct pt_regs *regs, long err, int trap, int sig)
{
@@ -590,7 +589,6 @@ int kgdb_ll_trap(int cmd, const char *str,
return __kgdb_notify(&args, cmd);
}
-#endif /* CONFIG_KGDB_LOW_LEVEL_TRAP */
static int
kgdb_notify(struct notifier_block *self, unsigned long cmd, void *ptr)
@@ -625,6 +623,12 @@ int kgdb_arch_init(void)
return register_die_notifier(&kgdb_notifier);
}
+static void kgdb_hw_overflow_handler(struct perf_event *event, int nmi,
+ struct perf_sample_data *data, struct pt_regs *regs)
+{
+ kgdb_ll_trap(DIE_DEBUG, "debug", regs, 0, 0, SIGTRAP);
+}
+
void kgdb_arch_late(void)
{
int i, cpu;
@@ -655,6 +659,7 @@ void kgdb_arch_late(void)
for_each_online_cpu(cpu) {
pevent = per_cpu_ptr(breakinfo[i].pev, cpu);
pevent[0]->hw.sample_period = 1;
+ pevent[0]->overflow_handler = kgdb_hw_overflow_handler;
if (pevent[0]->destroy != NULL) {
pevent[0]->destroy = NULL;
release_bp_slot(*pevent);
next prev parent reply other threads:[~2010-07-29 0:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-28 20:39 [GIT PULL] kgdb regression fixes for 2.6.35-rc5 Jason Wessel
2010-07-28 20:39 ` [PATCH] x86,kgdb: Fix hw breakpoint regression Jason Wessel
2010-07-28 21:17 ` [GIT PULL] kgdb regression fixes for 2.6.35-rc5 Frederic Weisbecker
2010-07-28 21:26 ` Linus Torvalds
2010-07-29 0:14 ` Jason Wessel [this message]
2010-07-29 1:06 ` Frederic Weisbecker
2010-07-29 2:49 ` [Kgdb-bugreport] " DDD
2010-07-29 2:55 ` Frederic Weisbecker
-- strict thread matches above, loose matches on Subject: below --
2010-07-22 0:36 Jason Wessel
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=4C50C7F2.8020305@windriver.com \
--to=jason.wessel@windriver.com \
--cc=fweisbec@gmail.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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.