linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Michael Buesch <mbuesch@freenet.de>
Subject: Re: PowerPC: Sleeping function called from invalid context at emulate_instruction()
Date: Fri, 24 Feb 2006 09:57:12 +1100	[thread overview]
Message-ID: <17406.15816.112314.494845@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <7A04DCF5-C5CF-46E2-A133-A7743BD83B17@kernel.crashing.org>

Kumar Gala writes:

> Last time this was brought up we left it wondering why you had made  
> program_check_exception() run with interrupts disabled.  Any further  
> ideas on that one?

I think it was so that if we are entering the kernel debugger, we do
so on the same cpu that the exception was generated on.  This should
fix it.

Paul.

diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 7509aa6..98660ae 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -814,6 +814,8 @@ void __kprobes program_check_exception(s
 		return;
 	}
 
+	local_irq_enable();
+
 	/* Try to emulate it if we should. */
 	if (reason & (REASON_ILLEGAL | REASON_PRIVILEGED)) {
 		switch (emulate_instruction(regs)) {

      reply	other threads:[~2006-02-23 22:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200602222129.31700.mbuesch@freenet.de>
2006-02-23  4:22 ` PowerPC: Sleeping function called from invalid context at emulate_instruction() Kumar Gala
2006-02-23 22:57   ` Paul Mackerras [this message]

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=17406.15816.112314.494845@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=galak@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mbuesch@freenet.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).