public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: cbouatmailru@gmail•com (Anton Vorontsov)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH RFC 0/4] ARM/KGDB: Some fixes for SMP machines
Date: Wed, 7 Jul 2010 21:54:06 +0400	[thread overview]
Message-ID: <20100707175406.GA28424@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20100707171222.GA16448@oksana.dev.rtsoft.ru>

On Wed, Jul 07, 2010 at 09:12:22PM +0400, Anton Vorontsov wrote:
[...] 
> 2. The patches are against a heavily patched kernel, and so far
>    I didn't rebase them onto the 'debug core' rework as found
>    in the very latest mainline kernels. I'll rebase the patches
>    soon, so for now this is just an RFC.

BTW, I'm testing with another small fixup applied, I didn't send
it as a patch because this deadlock was already fixed in the
debug_core implementation (which KGDB is using nowadays). But
for the completeness, here it is:

(Don't deadlock if there's a wannabe-master CPUs, which entered
KGDB via exception, not NMI/IPI).

diff --git a/kernel/kgdb.c b/kernel/kgdb.c
index e7a2274..65bf75d 100644
--- a/kernel/kgdb.c
+++ b/kernel/kgdb.c
@@ -1522,7 +1522,9 @@ return_normal:
 		 * from the debugger.
 		 */
 		for_each_online_cpu(i) {
-			while (atomic_read(&cpu_in_kgdb[i]))
+			while (atomic_read(&cpu_in_kgdb[i]) &&
+					!(kgdb_info[i].exception_state &
+						DCPU_WANT_MASTER))
 				cpu_relax();
 		}
 	}

  parent reply	other threads:[~2010-07-07 17:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07 17:12 [PATCH RFC 0/4] ARM/KGDB: Some fixes for SMP machines Anton Vorontsov
2010-07-07 17:13 ` [PATCH RFC 1/4] ARM: kgdb: Must poll for IPIs during busy-waiting Anton Vorontsov
2010-07-07 17:13 ` [PATCH RFC 2/4] ARM: kgdb: Disable preemption before re-enabling interrupts Anton Vorontsov
2010-07-07 17:13 ` [PATCH RFC 3/4] net: Implement napi_try_disable() Anton Vorontsov
2010-07-07 17:13 ` [PATCH RFC 4/4] kgdb: Quiesce IO back-end before rounding up secondary CPUs Anton Vorontsov
2010-07-07 17:54 ` Anton Vorontsov [this message]
2010-07-08  8:48 ` [PATCH RFC 0/4] ARM/KGDB: Some fixes for SMP machines Will Deacon

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=20100707175406.GA28424@oksana.dev.rtsoft.ru \
    --to=cbouatmailru@gmail$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox