From: Jan Kiszka <jan.kiszka@domain.hid>
To: Philippe Gerum <rpm@xenomai.org>
Cc: adeos-main <adeos-main@gna.org>
Subject: [Adeos-main] [PATCH 3/3] ipipe: x86: Fix up root state after __do_root_[vx]irq under CONFIG_TRACE_IRQFLAGS
Date: Thu, 25 Nov 2010 17:47:05 +0100 [thread overview]
Message-ID: <4CEE9309.6050808@domain.hid> (raw)
In-Reply-To: <4CEE91CB.3060303@domain.hid>
As TRACE_IRQS_ON, thus also TRACE_IRQS_IRET, synchronizes the root
pipeline state with the pseudo state that __do_root_[vx]irq creates on
entry. We need to fix that up, disabling root IRQs again as
__ipipe_sync_stage may inject more IRQs.
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
arch/x86/include/asm/ipipe_32.h | 9 +++++++++
arch/x86/include/asm/ipipe_64.h | 9 +++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm/ipipe_32.h b/arch/x86/include/asm/ipipe_32.h
index 61d7913..38d7870 100644
--- a/arch/x86/include/asm/ipipe_32.h
+++ b/arch/x86/include/asm/ipipe_32.h
@@ -92,6 +92,11 @@ static inline void __do_root_xirq(ipipe_irq_handler_t handler,
: /* no output */
: "a" (~irq), "r" (handler), "rm" (regs),
[x86if] "i" (X86_EFLAGS_IF));
+#ifdef CONFIG_TRACE_IRQFLAGS
+ /* TRACE_IRQS_IRET fully enables root IRQs - disable them again in
+ * case __ipipe_sync_stage injects another one. */
+ local_irq_disable();
+#endif
}
#define __ipipe_do_root_xirq(ipd, irq) \
@@ -132,6 +137,10 @@ static inline void __do_root_virq(ipipe_irq_handler_t handler,
"__virq_end: cli\n"
: /* no output */
: /* no input */);
+#ifdef CONFIG_TRACE_IRQFLAGS
+ /* see __do_root_xirq */
+ local_irq_disable();
+#endif
}
#define __ipipe_do_root_virq(ipd, irq) \
diff --git a/arch/x86/include/asm/ipipe_64.h b/arch/x86/include/asm/ipipe_64.h
index c8f2c54..91d7397 100644
--- a/arch/x86/include/asm/ipipe_64.h
+++ b/arch/x86/include/asm/ipipe_64.h
@@ -95,6 +95,11 @@ static inline void __do_root_xirq(ipipe_irq_handler_t handler,
[handler] "r" (handler), "D" (regs),
[x86if] "i" (X86_EFLAGS_IF)
: "rax");
+#ifdef CONFIG_TRACE_IRQFLAGS
+ /* TRACE_IRQS_IRETQ fully enables root IRQs - disable them again in
+ * case __ipipe_sync_stage injects another one. */
+ local_irq_disable();
+#endif
}
#define __ipipe_do_root_xirq(ipd, irq) \
@@ -137,6 +142,10 @@ static inline void __do_root_virq(ipipe_irq_handler_t handler,
"__virq_end: cli\n"
: /* no output */
: /* no input */);
+#ifdef CONFIG_TRACE_IRQFLAGS
+ /* see __do_root_xirq */
+ local_irq_disable();
+#endif
}
#define __ipipe_do_root_virq(ipd, irq) \
--
1.7.1
prev parent reply other threads:[~2010-11-25 16:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-25 16:41 [Adeos-main] [git pull] Updates for ipipe-2.6.35-x86 Jan Kiszka
2010-11-25 16:46 ` [Adeos-main] [PATCH 1/3] ipipe: x86-32: Drop IRQ flag virtualization from syscall/interrupt entry/exit Jan Kiszka
2010-11-25 16:47 ` [Adeos-main] [PATCH 2/3] ipipe: x86: Push IF as set to stack of root IRQ handlers Jan Kiszka
2010-11-25 16:47 ` Jan Kiszka [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=4CEE9309.6050808@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.