On 2013-02-26 15:25, Jerome Poncin wrote:
> Hello Jan,
> 
> Thank you for your answer. I checked /proc/interrupts and lspci -v, and I saw 
> that the IRQ is shared.
> 
> "If yes, resolve that conflict."
> 
> => What must I do ? I'm not sure to have understood ?

See
http://xenomai.org/index.php/FAQs#What_can_I_do_if_Xenomai_and_Linux_devices_share_the_same_IRQ.3F

> 
> 
> /*****************************************************************************/
> /*!
> *   \brief  cifx_handler
> *
> *   \param  [in]    irq      Resource task pointer
> *
> *   \return RTDM_IRQ_NONE or RTDM_IRQ_HANDLED
> *
> *   \note   cifx interrupt handler
> */
> /*****************************************************************************/
> static /*inline*/ int cifx_handler(rtdm_irq_t *irq)
> {
>     struct rtdm_device    *info             = (struct rtdm_device 
> *)rtdm_irq_get_arg(irq, void);
>     io_info_t             *device_data     = (io_info_t *) info->device_data;
> 
>     if ((device_data->priv != NULL) || (device_data->irq_registered == FALSE) 
> || (device_data->irq_enable == FALSE))
>     {
>         /* This is a PLX device and cannot produce an IRQ */
>         return RTDM_IRQ_NONE;
>     }
>     else
>     {
>         void __iomem *int_enable_reg = 
> device_data->mem[DPM_INDEX].internal_addr + DPM_HOST_INT_EN0;
>         void __iomem *int_status_reg = 
> device_data->mem[DPM_INDEX].internal_addr + DPM_HOST_INT_STAT0;
> 
>         /* Is one of our interrupts enabled and active ? */
>         if (!(ioread32(int_enable_reg) & ioread32(int_status_reg) & 
> DPM_HOST_INT_MASK))
>             return RTDM_IRQ_NONE;
> 
>         /* Disable interrupt */
>         iowrite32(ioread32(int_enable_reg) & ~DPM_HOST_INT_GLOBAL_EN, 
> int_enable_reg);
> 
>         return RTDM_IRQ_HANDLED;
>     }
> }
> 
> If IRQ is not mine, I return RTDM_IRQ_NONE, it's not correct ?

It is. The problem is the sharing between RT and Linux. That cannot work.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Reply via email to