From: Jan Kiszka <jan.kiszka@domain.hid>
To: Philippe Gerum <rpm@xenomai.org>
Cc: adeos-main <adeos-main@gna.org>
Subject: [Adeos-main] [PATCH] ipipe: Restore root state before disabling hw irqs
Date: Fri, 29 Apr 2011 20:11:38 +0200 [thread overview]
Message-ID: <4DBAFF5A.30108@domain.hid> (raw)
root_stall_after_handler is a fixup for the root state, required when
CONFIG_TRACE_IRQFLAGS is enabled. It then calls local_irq_disable which
reenables hard irqs as a side effect. This causes all types of
corruptions after return from __ipipe_sync_stage which is supposed to
leave hard irqs off.
Fix it by reordering root_stall_after_handler and local_irq_disable_hw.
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
kernel/ipipe/core.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/ipipe/core.c b/kernel/ipipe/core.c
index 9ad7757..9aa4800 100644
--- a/kernel/ipipe/core.c
+++ b/kernel/ipipe/core.c
@@ -1277,14 +1277,14 @@ void __ipipe_sync_stage(void)
irq_enter();
ipd->irqs[irq].handler(irq, ipd->irqs[irq].cookie);
irq_exit();
- local_irq_disable_hw();
root_stall_after_handler();
+ local_irq_disable_hw();
while (__ipipe_check_root_resched())
__ipipe_preempt_schedule_irq();
} else {
__ipipe_do_root_xirq(ipd, irq);
- local_irq_disable_hw();
root_stall_after_handler();
+ local_irq_disable_hw();
}
p = ipipe_cpudom_ptr(__ipipe_current_domain);
--
1.7.1
reply other threads:[~2011-04-29 18:11 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=4DBAFF5A.30108@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.