Axel Beierlein wrote:
> what could it be that an simple rt_dev_open locks up my system when it  
> calls rtdm_lock_put_irqrestore?
> 
> [...]
> if (rtdm_irq_request(&ctx->irq_handle,
>                       MPC5xxx_PSC2_IRQ,
>                       rt_psc_interrupt,
>                       RTDM_IRQTYPE_SHARED | RTDM_IRQTYPE_EDGE,
>                               context->device->proc_name,
>                               ctx))
>       {
>               printk ("psc5200B.c: request_irq() failed\n");
>               return -1;
>       }
> 
>      rtdm_irq_enable(&ctx->irq_handle);
> 
>      rtdm_lock_get_irqsave(&ctx->lock, lock_ctx);
> 
>      ctx->imr_status = MPC5xxx_PSC_IMR_RXRDY;
>       out_be16(&psc->mpc5xxx_psc_imr, ctx->imr_status);

Let me guess: this line arms the related IRQ source at hw level, no?

> 
>       rtdm_lock_put_irqrestore(&ctx->lock, lock_ctx);
>       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>       Here i get the crash

Because it enabled local IRQ delivery again, and the system ends up in
an IRQ storm, or some endless loop in the IRQ handler, or some crash
related to IRQ handling. Still just guessing...

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to