changes on the adeos-ipipe layer v.2
Hi everybody,
the recent patches are enclosed here. Mmm I haven't ported it to the recent adeos-ipipe && xeno though but I guess it's not a big obstacle for possible design-related comments etc.
just to note some main issues...
o the ipipe_virtualize_irq() interface now includes an additional param, namely - void *cookie.
o ipipe_domain::cpudata::irq_hits has been renamed to irq_pending_hits while irq_hits now stands for the former rthal_realtime_irq::irq_hits.
It's incremeneted in ipipe_irq_handle() and ipipe_schedule_irq(), IOW at the places where irqs (normal or virtual) become visible on the adeos radar first time.
Another approach would be to increment it in ipipe_sync_stage() right before calling actual isr handlers. This way, accounting (well, it depends what are we going to count though) would be wrong for virq and ipipe_tick_irq handler.
er.. I was confused by the fact that sum of all apcs in /proc/xenomai/apc != virq from /proc/xenomai/irq, but ipipe_printk_virq is not listed since it's registered without rthal::apc interface. Ok, should take a look at it closer, i.e. maybe at least rthal_linux_irq can be reworked now.
--
Best regards,
Dmitry Adamushko
arch/i386/kernel/ipipe-core.c +11 -7
@@ -98,13 +98,14 @@ static void (*__ipipe_cpu_sync) (void); "pushl %%edx\n\t" \ "pushl %%ecx\n\t" \ "pushl %%ebx\n\t" \ + "pushl %2\n\t" \ "pushl %%eax\n\t" \ "call *%1\n\t" \ - "addl $4,%%esp\n\t" \ + "addl $8,%%esp\n\t" \ "jmp ret_from_intr\n\t" \ "1:\n" \ : /* no output */ \ - : "a" (irq), "m" ((ipd)->irqs[irq].handler)) + : "a" (irq), "m" ((ipd)->irqs[irq].handler), "r" ((ipd)->irqs[irq].cookie))static __inline__unsigned long flnz (unsigned long word) {
@@ -125,7 +126,7 @@ int __ipipe_ack_system_irq(unsigned irq)/* Always called with hw interrupts off. */ -void __ipipe_do_critical_sync (unsigned irq) +void __ipipe_do_critical_sync (unsigned irq,void *cookie) { ipipe_declare_cpuid;
@@ -275,7 +276,7 @@ void fastcall __ipipe_sync_stage(unsignecontinue ; } -if (--cpudata->irq_hits[irq] ==0 ) { +if (--cpudata->irq_pending_hits[irq] ==0 ) {__clear_bit (rank, &cpudata->irq_pending_lo[level]);ipipe_mark_irq_delivery (ipd,irq,cpuid);
@@ -301,7 +302,7 @@ void fastcall __ipipe_sync_stage(unsignelocal_irq_disable_hw (); }else {__clear_bit (IPIPE_SYNC_FLAG , &cpudata->status); - ipd->irqs[irq].handler (irq); + ipd->irqs[irq].handler (irq, ipd->irqs[irq].cookie);__set_bit (IPIPE_SYNC_FLAG , &cpudata->status); }
@@ -415,8 +416,9 @@ int fastcall __ipipe_send_ipi (unsignedint ipipe_virtualize_irq (struct ipipe_domain *ipd,unsigned irq, -void (*handler) (unsigned irq), -int (*acknowledge) (unsigned irq), +ipipe_irq_handler_t handler, +void *cookie, +ipipe_irq_ackfn_t acknowledge,unsigned modemask) {unsigned long flags;
@@ -434,6 +436,7 @@ int ipipe_virtualize_irq(struct ipipe_doif (handler ==IPIPE_SAME_HANDLER ) { handler = ipd->irqs[irq].handler; + cookie = ipd->irqs[irq].cookie;if (handler ==NULL ) { err = -EINVAL ;
@@ -473,6 +476,7 @@ int ipipe_virtualize_irq(struct ipipe_do } ipd->irqs[irq].handler = handler; + ipd->irqs[irq].cookie = cookie; ipd->irqs[irq].acknowledge = acknowledge; ipd->irqs[irq].control = modemask;
arch/i386/kernel/ipipe-root.c +24 -11
@@ -78,7 +78,7 @@ static int __ipipe_ack_common_irq(unsign#ifdef CONFIG_X86_LOCAL_APIC -static void __ipipe_null_handler (unsigned irq) +static void __ipipe_null_handler (unsigned irq,void *cookie) {/* Nop. */ }
@@ -124,50 +124,58 @@ void __init __ipipe_enable_pipeline(voidipipe_virtualize_irq (ipipe_root_domain,LOCAL_TIMER_VECTOR -FIRST_EXTERNAL_VECTOR , - (void (*)(unsigned ))&smp_apic_timer_interrupt, + (ipipe_irq_handler_t)&smp_apic_timer_interrupt, +NULL , &__ipipe_ack_system_irq,IPIPE_STDROOT_MASK );ipipe_virtualize_irq (ipipe_root_domain,SPURIOUS_APIC_VECTOR -FIRST_EXTERNAL_VECTOR , - (void (*)(unsigned ))&smp_spurious_interrupt, + (ipipe_irq_handler_t)&smp_spurious_interrupt, +NULL , &__ipipe_noack_irq,IPIPE_STDROOT_MASK );ipipe_virtualize_irq (ipipe_root_domain,ERROR_APIC_VECTOR -FIRST_EXTERNAL_VECTOR , - (void (*)(unsigned ))&smp_error_interrupt, + (ipipe_irq_handler_t)&smp_error_interrupt, +NULL , &__ipipe_ack_system_irq,IPIPE_STDROOT_MASK );ipipe_virtualize_irq (ipipe_root_domain,IPIPE_SERVICE_VECTOR0 -FIRST_EXTERNAL_VECTOR , &__ipipe_null_handler, +NULL , &__ipipe_ack_system_irq,IPIPE_STDROOT_MASK );ipipe_virtualize_irq (ipipe_root_domain,IPIPE_SERVICE_VECTOR1 -FIRST_EXTERNAL_VECTOR , &__ipipe_null_handler, +NULL , &__ipipe_ack_system_irq,IPIPE_STDROOT_MASK );ipipe_virtualize_irq (ipipe_root_domain,IPIPE_SERVICE_VECTOR2 -FIRST_EXTERNAL_VECTOR , &__ipipe_null_handler, +NULL , &__ipipe_ack_system_irq,IPIPE_STDROOT_MASK );ipipe_virtualize_irq (ipipe_root_domain,IPIPE_SERVICE_VECTOR3 -FIRST_EXTERNAL_VECTOR , &__ipipe_null_handler, +NULL , &__ipipe_ack_system_irq,IPIPE_STDROOT_MASK );#ifdef CONFIG_X86_MCE_P4THERMAL ipipe_virtualize_irq (ipipe_root_domain,THERMAL_APIC_VECTOR -FIRST_EXTERNAL_VECTOR , - (void (*)(unsigned ))&smp_thermal_interrupt, + (ipipe_irq_handler_t)&smp_thermal_interrupt, +NULL , &__ipipe_ack_system_irq,IPIPE_STDROOT_MASK );#endif /* CONFIG_X86_MCE_P4THERMAL */
@@ -185,19 +193,22 @@ void __init __ipipe_enable_pipeline(voidipipe_virtualize_irq (ipipe_root_domain,RESCHEDULE_VECTOR -FIRST_EXTERNAL_VECTOR , - (void (*)(unsigned ))&smp_reschedule_interrupt, + (ipipe_irq_handler_t)&smp_reschedule_interrupt, +NULL , &__ipipe_ack_system_irq,IPIPE_STDROOT_MASK );ipipe_virtualize_irq (ipipe_root_domain,INVALIDATE_TLB_VECTOR -FIRST_EXTERNAL_VECTOR , - (void (*)(unsigned ))&smp_invalidate_interrupt, + (ipipe_irq_handler_t)&smp_invalidate_interrupt, +NULL , &__ipipe_ack_system_irq,IPIPE_STDROOT_MASK );ipipe_virtualize_irq (ipipe_root_domain,CALL_FUNCTION_VECTOR -FIRST_EXTERNAL_VECTOR , - (void (*)(unsigned ))&smp_call_function_interrupt, + (ipipe_irq_handler_t)&smp_call_function_interrupt, +NULL , &__ipipe_ack_system_irq,IPIPE_STDROOT_MASK );
@@ -224,7 +235,8 @@ void __init __ipipe_enable_pipeline(void/* Fails for IPIPE_CRITICAL_IPI but that's ok. */ ipipe_virtualize_irq (ipipe_root_domain, irq, - (void (*)(unsigned ))&do_IRQ, + (ipipe_irq_handler_t)&do_IRQ, +NULL , &__ipipe_ack_common_irq,IPIPE_STDROOT_MASK ); }
@@ -530,6 +542,7 @@ int __ipipe_handle_irq(struct pt_regs restatus flags before the PIC is unlocked. */ next_domain->cpudata[cpuid].irq_hits[irq]++; + next_domain->cpudata[cpuid].irq_pending_hits[irq]++;__ipipe_set_irq_bit (next_domain, cpuid, irq);ipipe_mark_irq_receipt (next_domain, irq, cpuid);
@@ -563,11 +576,11 @@ int __ipipe_handle_irq(struct pt_regs re __ipipe_tick_regs[cpuid].ebp = regs.ebp;#endif /* CONFIG_SMP && CONFIG_FRAME_POINTER */ if (__ipipe_pipeline_head_p (ipipe_root_domain) && - ipipe_root_domain->cpudata[cpuid].irq_hits[irq] >1 ) + ipipe_root_domain->cpudata[cpuid].irq_pending_hits[irq] >1 )/* Emulate a loss of clock ticks if Linux is * owning the time source. The drift will be * compensated by the timer support code.*/ - ipipe_root_domain->cpudata[cpuid].irq_hits[irq] =1 ; + ipipe_root_domain->cpudata[cpuid].irq_pending_hits[irq] =1 ; }/* Now walk the pipeline, yielding control to the highest
include/asm-i386/ipipe.h +1 -1
@@ -173,7 +173,7 @@ int __ipipe_ack_system_irq(unsigned irq)int __ipipe_handle_irq (struct pt_regs regs); -void __ipipe_do_critical_sync (unsigned irq); +void __ipipe_do_critical_sync (unsigned irq,void *cookie);extern struct pt_regs __ipipe_tick_regs[];
include/linux/ipipe.h +27 -12
@@ -39,7 +39,6 @@#define IPIPE_RESET_TIMER 0x1#define IPIPE_GRAB_TIMER 0x2 -#define IPIPE_SAME_HANDLER ((void (*)(unsigned))(-1))/* Global domain flags */ #define IPIPE_SPRINTK_FLAG 0/* Synchronous printk() allowed */
@@ -116,6 +115,13 @@#define ipipe_virtual_irq_p (irq) ((irq) >= IPIPE_VIRQ_BASE && \ (irq) < IPIPE_NR_IRQS) +typedef void (*ipipe_irq_handler_t )(unsigned irq, +void *cookie); + +typedef int (*ipipe_irq_ackfn_t )(unsigned irq); + +#define IPIPE_SAME_HANDLER ((ipipe_irq_handler_t)(-1)) +struct ipipe_domain {struct list_head p_link;/* Link in pipeline */
@@ -124,14 +130,16 @@ struct ipipe_domain {unsigned long status;unsigned long irq_pending_hi;unsigned long irq_pending_lo[IPIPE_IRQ_IWORDS ]; +unsigned long irq_pending_hits[IPIPE_NR_IRQS ];unsigned long irq_hits[IPIPE_NR_IRQS ]; - } cpudata[IPIPE_NR_CPUS ]; + }____cacheline_aligned_in_smp cpudata[IPIPE_NR_CPUS ];struct { -int (*acknowledge) (unsigned irq); -void (*handler) (unsigned irq);unsigned long control; - } irqs[IPIPE_NR_IRQS ]; +ipipe_irq_ackfn_t acknowledge; +ipipe_irq_handler_t handler; +void *cookie; + }____cacheline_aligned irqs[IPIPE_NR_IRQS ]; int (*evhand[IPIPE_NR_EVENTS])(unsigned event, struct ipipe_domain *from,
@@ -148,7 +156,7 @@ struct ipipe_domain {unsigned long long last_receipt_date; unsigned long max_delivery_time; } irq_stats[IPIPE_NR_IRQS ]; - } stats[IPIPE_NR_CPUS ]; + }____cacheline_aligned_in_smp stats[IPIPE_NR_CPUS ];#endif /* CONFIG_IPIPE_STATS */ unsigned long flags;unsigned domid;
@@ -168,6 +176,11 @@ struct ipipe_domain_attr {/* The following macros must be used hw interrupts off. */ +#define __ipipe_irq_cookie (ipd,irq) (ipd)->irqs[irq].cookie +#define __ipipe_irq_handler (ipd,irq) (ipd)->irqs[irq].handler + +#define __ipipe_cpudata_irq_hits (ipd,cpuid,irq) (ipd)->cpudata[cpuid].irq_hits[irq] +#define __ipipe_set_irq_bit (ipd,cpuid,irq) \ do { \ if (!test_bit(IPIPE_LOCK_FLAG,&(ipd)->irqs[irq].control)) { \
@@ -194,7 +207,7 @@ do { \int __cpuid, __nr_cpus =num_online_cpus (); \if (test_and_clear_bit (IPIPE_LOCK_FLAG ,&(ipd)->irqs[irq].control)) \for (__cpuid =0 ; __cpuid < __nr_cpus; __cpuid++) \ -if ((ipd)->cpudata[__cpuid].irq_hits[irq] >0 ) {/* We need atomic ops next. */ \ +if ((ipd)->cpudata[__cpuid].irq_pending_hits[irq] >0 ) {/* We need atomic ops next. */ \set_bit (irq &IPIPE_IRQ_IMASK ,&(ipd)->cpudata[__cpuid].irq_pending_lo[irq >>IPIPE_IRQ_ISHIFT ]); \set_bit (irq >>IPIPE_IRQ_ISHIFT ,&(ipd)->cpudata[__cpuid].irq_pending_hi); \ } \
@@ -205,7 +218,7 @@ do { \int __cpuid, __nr_cpus =num_online_cpus (); \clear_bit (IPIPE_LOCK_FLAG ,&(ipd)->irqs[irq].control); \for (__cpuid =0 ; __cpuid < __nr_cpus; __cpuid++) { \ - (ipd)->cpudata[__cpuid].irq_hits[irq] =0 ; \ + (ipd)->cpudata[__cpuid].irq_pending_hits[irq] =0 ; \__ipipe_clear_pend (ipd,__cpuid,irq); \ } \ }while (0 )
@@ -313,7 +326,7 @@ void __ipipe_add_domain_proc(struct ipipvoid __ipipe_remove_domain_proc (struct ipipe_domain *ipd); -void __ipipe_flush_printk (unsigned irq); +void __ipipe_flush_printk (unsigned irq,void *cookie);void __ipipe_stall_root (void );
@@ -472,16 +485,18 @@ void ipipe_suspend_domain(void);int ipipe_virtualize_irq (struct ipipe_domain *ipd,unsigned irq, -void (*handler) (unsigned irq), -int (*acknowledge) (unsigned irq), +ipipe_irq_handler_t handler, +void *cookie, +ipipe_irq_ackfn_t acknowledge,unsigned modemask);static inline int ipipe_share_irq (unsigned irq, -int (*acknowledge) (unsigned irq)) +ipipe_irq_ackfn_t acknowledge) {return ipipe_virtualize_irq (ipipe_current_domain, irq,IPIPE_SAME_HANDLER , +NULL , acknowledge,IPIPE_SHARED_MASK |IPIPE_HANDLE_MASK |IPIPE_PASS_MASK );
kernel/ipipe/core.c +5 -1
@@ -78,6 +78,7 @@ void ipipe_init(void) __ipipe_printk_virq =ipipe_alloc_virq ();/* Cannot fail here. */ ipd->irqs[__ipipe_printk_virq].handler = &__ipipe_flush_printk; + ipd->irqs[__ipipe_printk_virq].cookie =NULL ; ipd->irqs[__ipipe_printk_virq].acknowledge =NULL ; ipd->irqs[__ipipe_printk_virq].control =IPIPE_HANDLE_MASK ;
@@ -97,8 +98,10 @@ void __ipipe_init_stage(struct ipipe_domfor (n =0 ; n <IPIPE_IRQ_IWORDS ; n++) ipd->cpudata[cpuid].irq_pending_lo[n] =0 ; -for (n =0 ; n <IPIPE_NR_IRQS ; n++) +for (n =0 ; n <IPIPE_NR_IRQS ; n++) { + ipd->cpudata[cpuid].irq_pending_hits[n] =0 ; ipd->cpudata[cpuid].irq_hits[n] =0 ; + } }for (n =0 ; n <IPIPE_NR_IRQS ; n++) {
@@ -115,6 +118,7 @@ void __ipipe_init_stage(struct ipipe_dom#ifdef CONFIG_SMP ipd->irqs[IPIPE_CRITICAL_IPI ].acknowledge = &__ipipe_ack_system_irq; ipd->irqs[IPIPE_CRITICAL_IPI ].handler = &__ipipe_do_critical_sync; + ipd->irqs[IPIPE_CRITICAL_IPI ].cookie =NULL ;/* Immediately handle in the current domain but *never* pass */ ipd->irqs[IPIPE_CRITICAL_IPI ].control =IPIPE_HANDLE_MASK |IPIPE_STICKY_MASK |IPIPE_SYSTEM_MASK ;
kernel/ipipe/generic.c +2 -1
@@ -175,7 +175,7 @@ int ipipe_unregister_domain(struct ipipefor (_cpuid =0 ; _cpuid < nr_cpus; _cpuid++)for (irq =0 ; irq <IPIPE_NR_IRQS ; irq++) -while (ipd->cpudata[_cpuid].irq_hits[irq] >0 ) +while (ipd->cpudata[_cpuid].irq_pending_hits[irq] >0 ) cpu_relax(); }#endif /* CONFIG_SMP */
@@ -226,6 +226,7 @@ int fastcall __ipipe_schedule_irq(unsignif (test_bit (IPIPE_HANDLE_FLAG , &ipd->irqs[irq].control)) { ipd->cpudata[cpuid].irq_hits[irq]++; + ipd->cpudata[cpuid].irq_pending_hits[irq]++;__ipipe_set_irq_bit (ipd, cpuid, irq);ipipe_mark_irq_receipt (ipd, irq, cpuid);ipipe_unlock_cpu (flags);
kernel/printk.c +1 -1
@@ -515,7 +515,7 @@ static int __ipipe_printk_fill;static char __ipipe_printk_buf[__LOG_BUF_LEN]; -void __ipipe_flush_printk (unsigned virq) +void __ipipe_flush_printk (unsigned virq,void *cookie) {char *p = __ipipe_printk_buf;int out =0 , len;
include/asm-generic/hal.h +10 -5
@@ -86,6 +86,11 @@ typedef rwlock_t rthal_rwlock_t;#endif /* RAW_RW_LOCK_UNLOCKED */ #endif /* IPIPE_RW_LOCK_UNLOCKED */ +#define rthal_irq_cookie (ipd,irq) __ipipe_irq_cookie(ipd,irq) +#define rthal_irq_handler (ipd,irq) __ipipe_irq_handler(ipd,irq) + +#define rthal_cpudata_irq_hits (ipd,cpu,irq) __ipipe_cpudata_irq_hits(ipd,cpu,irq) +#define rthal_local_irq_disable () ipipe_stall_pipeline_from(&rthal_domain)#define rthal_local_irq_enable () ipipe_unstall_pipeline_from(&rthal_domain)#define rthal_local_irq_save (x) ((x) = !!ipipe_test_and_stall_pipeline_from(&rthal_domain))
@@ -118,7 +123,7 @@ typedef rwlock_t rthal_rwlock_t;#define rthal_propagate_irq (irq) ipipe_propagate_irq(irq)#define rthal_set_irq_affinity (irq,aff) ipipe_set_irq_affinity(irq,aff)#define rthal_schedule_irq (irq) ipipe_schedule_irq(irq) -#define rthal_virtualize_irq (dom,irq,isr,ackfn,mode) ipipe_virtualize_irq(dom,irq,isr,ackfn,mode) +#define rthal_virtualize_irq (dom,irq,isr,cookie,ackfn,mode) ipipe_virtualize_irq(dom,irq,isr,cookie,ackfn,mode)#define rthal_alloc_virq () ipipe_alloc_virq()#define rthal_free_virq (irq) ipipe_free_virq(irq)#define rthal_trigger_irq (irq) ipipe_trigger_irq(irq)
@@ -447,8 +452,8 @@ do { \#define rthal_printk printk -typedef void (*rthal_irq_handler_t )(unsigned irq, -void *cookie); +typedef ipipe_irq_handler_t rthal_irq_handler_t ; +typedef ipipe_irq_ackfn_t rthal_irq_ackfn_t ;struct rthal_calibration_data {
@@ -497,8 +502,8 @@ int rthal_init(void);void rthal_exit (void );int rthal_irq_request (unsigned irq, -void (*handler)(unsigned irq,void *cookie), -int (*ackfn)(unsigned irq), +rthal_irq_handler_t handler, +rthal_irq_ackfn_t ackfn,void *cookie);int rthal_irq_release (unsigned irq);
include/asm-generic/system.h +8 -5
@@ -349,7 +349,8 @@ static inline int xnarch_hook_ipi (void {return rthal_virtualize_irq (&rthal_domain,RTHAL_SERVICE_IPI0 , - (void (*)(unsigned )) handler, + (rthal_irq_handler_t ) handler, +NULL ,NULL ,IPIPE_HANDLE_MASK ); }
@@ -361,6 +362,7 @@ static inline int xnarch_release_ipi (voRTHAL_SERVICE_IPI0 ,NULL ,NULL , +NULL , IPIPE_PASS_MASK); }
@@ -387,7 +389,8 @@ static inline void xnarch_notify_halt(vorthal_virtualize_irq (rthal_current_domain,RTHAL_SERVICE_IPI2 , - xnarch_finalize_cpu, + (rthal_irq_handler_t )xnarch_finalize_cpu, +NULL ,NULL ,IPIPE_HANDLE_MASK );
@@ -403,6 +406,7 @@ static inline void xnarch_notify_halt(voRTHAL_SERVICE_IPI2 ,NULL ,NULL , +NULL , IPIPE_PASS_MASK);rthal_release_control ();
@@ -481,9 +485,8 @@ static inline unsigned long long xnarch_#ifdef XENO_INTR_MODULE static inline int xnarch_hook_irq (unsigned irq, -void (*handler)(unsigned irq, -void *cookie), -int (*ackfn)(unsigned irq), +rthal_irq_handler_t handler, +rthal_irq_ackfn_t ackfn,void *cookie) {return rthal_irq_request (irq,handler,ackfn,cookie);
include/asm-i386/system.h +4 -2
@@ -542,7 +542,7 @@ static inline void xnarch_init_shadow_tc tcb->fpup = &task->thread.i387; } -static inline void xnarch_grab_xirqs (void (*handler)(unsigned irq)) +static inline void xnarch_grab_xirqs (rthal_irq_handler_t handler) {unsigned irq;
@@ -551,6 +551,7 @@ static inline void xnarch_grab_xirqs (vorthal_virtualize_irq (rthal_current_domain, irq, handler, +NULL ,NULL ,IPIPE_DYNAMIC_MASK ); }
@@ -726,7 +727,8 @@ static inline int xnarch_init (void)rthal_virtualize_irq (&rthal_domain, xnarch_escalation_virq, - (void (*)(unsigned ))&xnpod_schedule_handler, + (rthal_irq_handler_t)&xnpod_schedule_handler, +NULL ,NULL ,IPIPE_HANDLE_MASK );
include/rtdm/rtdm_driver.h +1 -1
@@ -793,7 +793,7 @@ static inline int rtdm_nrtsig_init(rtdm_if (*nrt_sig ==0 )return -EAGAIN ; -rthal_virtualize_irq (rthal_root_domain, *nrt_sig, handler,NULL , +rthal_virtualize_irq (rthal_root_domain, *nrt_sig, (rthal_irq_handler_t )handler,NULL ,NULL ,IPIPE_HANDLE_MASK );return 0 ; }
ksrc/arch/generic/hal.c +14 -33
128 lines not on this page · raw message
ksrc/skins/rtai/intr.c +1 -1
@@ -24,7 +24,7 @@ int rt_request_irq (unsigned irq,void (*handler)(unsigned irq,void *cookie), void *cookie) { - return rthal_irq_request(irq,handler,NULL,cookie); + return xnarch_hook_irq(irq,handler,NULL,cookie); }int rt_release_irq (unsigned irq)
sim/include/asm-mvm/system.h +2 -3
@@ -365,9 +365,8 @@ void mvm_tcl_build_pendq(mvm_tcl_listobj#ifdef XENO_INTR_MODULE static inline int xnarch_hook_irq (unsigned irq, -void (*handler)(unsigned irq, -void *cookie), -int (*ackfn)(unsigned irq),/* Ignored. */ +rthal_irq_handler_t handler, +rthal_irq_ackfn_t ackfn,/* Ignored. */ void *cookie) {return mvm_hook_irq (irq,handler,cookie);
src/include/asm-uvm/system.h +2 -3
@@ -272,9 +272,8 @@ void xnarch_sync_irq (void) /* Synchroni }static inline int xnarch_hook_irq (unsigned irq, -void (*handler)(unsigned irq, -void *cookie), -int (*ackfn)(unsigned irq), +rthal_irq_handler_t handler, +rthal_irq_ackfn_t ackfn,void *cookie) {return -ENOSYS ;
Dmitry Adamushko wrote:
<snip>
Quoted 3 lines
er.. I was confused by the fact that sum of all apcs in
/proc/xenomai/apc!= virq from/proc/xenomai/irq, butipipe_printk_virqis not listed since it's registered withoutrthal::apcinterface. Ok, should take a look at it closer, i.e. maybe at leastrthal_linux_irqcan be reworked now.
APCs are multiplexed on a single virq.
Quoted 12 lines
Signature · 11 lines
-- Best regards, Dmitry Adamushko ------------------------------------------------------------------------ _______________________________________________ Xenomai-core mailing list [email protected] https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Quoted 11 lines
Quoted 9 lines
er.. I was confused by the fact that sum of all apcs in
/proc/xenomai/apc!= virq from/proc/xenomai/irq, butipipe_printk_virqis not listed since it's registered withoutrthal::apcinterface. Ok, should take a look at it closer, i.e. maybe at leastrthal_linux_irqcan be reworked now.APCs are multiplexed on a single virq.
Yep, I know. Don't know why but I thought that printk_flush is multiplexed on the same virq, OTOH it's an APC too. Well, the easiest argument against that could have been that the APC interface is implemented in the hal but printk_virq is registered in the ipipe, i.e. when there is no APC interface yet, mea culpa.
Quoted 4 lines
--
Philippe.
--
Best regards,
Dmitry Adamushko