Skip to contentSkip to conversation

cobalt/x86: raise escalate virq with irq_inject_pipeline instead of irq_post_oob

PATCH In review hongzha1 2 participants 2 messages Oct 13, 2020

lore
Share & tools
lore

hongzha1

author
#0 lore raw

PATCH 1/1 cobalt/x86: raise escalate virq with irq_inject_pipeline instead of irq_post_oob

Before calling irq_post_oob, interrupts must be hard disabled in the cpu. But irq_inject_pipeline would handle it internally.

kernel/cobalt/arch/x86/include/asm/xenomai/thread.h +2 -1
index af3433e8e..46294036b 100644
@@ -23,6 +23,7 @@
 #include <asm-generic/xenomai/thread.h>
 #include <asm/xenomai/wrappers.h>
 #include <asm/traps.h>
+#include <linux/irq_pipeline.h>
 
 #ifndef IPIPE_X86_FPU_EAGER
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0)
@@ -90,7 +91,7 @@ static inline int xnarch_escalate(void)
 {
 	if (running_inband()) {
 		/* orginal xenomai domain equals oob stage */
-		irq_post_oob(cobalt_pipeline.escalate_virq);
+		irq_inject_pipeline(cobalt_pipeline.escalate_virq);
 		return 1;
 	}
 /*	if (ipipe_root_p) {
Signature · 1 line
2.17.1
#1 lore raw
Quoted 19 lines · On 13.10.20 09:45, hongzha1 wrote:

Before calling irq_post_oob, interrupts must be hard disabled in the cpu. But irq_inject_pipeline would handle it internally.

kernel/cobalt/arch/x86/include/asm/xenomai/thread.h +1 -0
index af3433e8e..46294036b 100644
@@ -23,6 +23,7 @@
 #include <asm-generic/xenomai/thread.h>
 #include <asm/xenomai/wrappers.h>
 #include <asm/traps.h>
+#include <linux/irq_pipeline.h>
 
 #ifndef IPIPE_X86_FPU_EAGER
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0)

kernel/cobalt/arch/x86/include/asm/xenomai/thread.h static inline int xnarch_escalate(void) · line 97

Quoted 8 lines
kernel/cobalt/arch/x86/include/asm/xenomai/thread.h +1 -1
@@ -90,7 +91,7 @@ static inline int xnarch_escalate(void)
 {
 	if (running_inband()) {
 		/* orginal xenomai domain equals oob stage */
-		irq_post_oob(cobalt_pipeline.escalate_virq);
+		irq_inject_pipeline(cobalt_pipeline.escalate_virq);
 		return 1;
 	}
 /*	if (ipipe_root_p) {

Thanks, both this and the enable_oob_stage applied.

Jan

Signature · 2 lines
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux