All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Philippe Gerum <rpm@xenomai.org>
Cc: adeos-main <adeos-main@gna.org>
Subject: [Adeos-main] [pull request] noarch: fix ftrace code patching
Date: Mon, 14 Dec 2009 18:20:50 +0100	[thread overview]
Message-ID: <4B2673F2.4010609@domain.hid> (raw)

The following changes since commit 779cfc6a68bcc9c4acb1eec3922c25eb43b08a2f:
  Jan Kiszka (1):
        Set oops_in_progress on failing context check

are available in the git repository at:

  git://git.kiszka.org/ipipe-2.6 queues/2.6.31-noarch

Jan Kiszka (1):
      Disable both real and virtual interrupts during ftrace code changes

 kernel/trace/ftrace.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

------

Disable both real and virtual interrupts during ftrace code changes

This is required as the call stack contains some further local_irq_save/
restore which would otherwise reenable real interrupts spuriously.

Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
 kernel/trace/ftrace.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 5c007b6..9ca1e65 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2802,9 +2802,11 @@ static int ftrace_convert_nops(struct module *mod,
 	}
 
 	/* disable interrupts to prevent kstop machine */
-	local_irq_save_hw_notrace(flags);
+	local_irq_save(flags);
+	local_irq_disable_hw();
 	ftrace_update_code(mod);
-	local_irq_restore_hw_notrace(flags);
+	local_irq_enable_hw();
+	local_irq_restore(flags);
 	mutex_unlock(&ftrace_lock);
 
 	return 0;
@@ -2887,9 +2889,11 @@ void __init ftrace_init(void)
 	/* Keep the ftrace pointer to the stub */
 	addr = (unsigned long)ftrace_stub;
 
-	local_irq_save_hw_notrace(flags);
+	local_irq_save(flags);
+	local_irq_disable_hw();
 	ftrace_dyn_arch_init(&addr);
-	local_irq_restore_hw_notrace(flags);
+	local_irq_enable_hw();
+	local_irq_restore(flags);
 
 	/* ftrace_dyn_arch_init places the return code in addr */
 	if (addr)
-- 
1.6.0.2


                 reply	other threads:[~2009-12-14 17:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4B2673F2.4010609@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=adeos-main@gna.org \
    --cc=rpm@xenomai.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.