ITKeyword,专注技术干货聚合推荐

注册 | 登录

Linux interrupt is not handled by the wrapper driver

itPublisher 分享于

2020腾讯云双十一活动,全年最低!!!(领取3500元代金券),
地址https://cloud.tencent.com/act/cps/redirect?redirect=1073

【阿里云】双十一活动,全年抄底价,限时3天!(老用户也有),
入口地址https://www.aliyun.com/1111/home

推荐:Linux Kernel 2.6 Syscall Hooking via the Interrupt Descriptor Table

The symbol of sys_call_table is no longer exported since Linux 2.6.x, we have to HACK it http://www.elliotbradbury.com/linux-syscall-hooking-interrupt

up vote 1 down vote favorite 1 I am writing a device specific DMA driver for Zynq AXI DMA. The driver is actually a wrapper driver and uses Xilinx DMA driver under the DMA engine driver framework like this:

+------------------+

|

Wrapper driver |

+------------------+

|

DMA framework

|

+------------------+

| Xilinx DMA Driver|

+------------------+

+

Kernel

+

+------------------+

I use interrupt 61 for transfer complete and 62 for receive complete. The interrupt handler for Xilinx DMA driver is properly installed (I checked /proc/interrupts). However, I the driver seems not to handle the interrupt properly by showing me this: I checked /proc/interrupts. IRQ62 is not handled. Here is the code where the interrupt is registered: 0986

/* find the IRQ line, if it exists in the device tree */

0987

chan->irq = irq_of_parse_and_map(node, 0);

0988

err = devm_request_irq(xdev->dev, chan->irq, dma_intr_handler,

0989

IRQF_SHARED,

0990

"xilinx-dma-controller", chan);

And here is the output of cat /proc/interrupt: I have two questions: 1) If I only install interrupt handler for Xilinx DMA driver but not the wrapper driver, while I use the wrapper driver as the char device, interrupt will not be handled by the Xilinx DMA driver? 2) If so, how do I let Xilinx DMA driver to handle the interrupt in this case? Is 'irqpoll' the only solution? Is there any performance issue compared to direct interrupt handling rather than polling? linux linux-kernel interrupt-handling dma zynq
  |
  this question edited Mar 24 '15 at 1:50 asked Mar 23 '15 at 14:55 lixunx 23 3      lixunx, please post source of your driver where you register irq and your handler too. Also, what is in /proc/interrupts? –  osgx Mar 23 '15 at 14:57      nobody cared message means your interrupt handler probably wasn't registered successfully. Try to check return cod

推荐:Linux下VirtualBox出现kernel driver not installed的解决方法

今天安装好rhel-server-6.6-i386后,再安装VirtualBox成功,但是再VirtualBox中创建虚拟机的时候出现了“不能为xx虚拟机打开新任务” 并弹出如下的错误信息: 按

e of devm_request_threaded_irq() (or what you are using) that you are calling in your driver code in order to register your interrupt handler. –  Sam Protsenko Mar 23 '15 at 17:28      I have updated my question. I checked the return value and there is no error. You can see from the /proc/interrupts. 61 and 62 are registered with xilinx-dma-controller –  lixunx Mar 24 '15 at 1:53

 |  1 Answers

up vote 0 down vote Your devicetree isn't good, more precisely, your pl.dtsi file. My pl file looks like this: amba_pl: amba_pl {

#address-cells = <1>;

#size-cells = <1>;

compatible = "simple-bus";

ranges ;

axi_dma_0: dma@40400000 {

compatible = "xlnx,axi-dma";

interrupt-parent = <&intc>;

interrupts = <0 29 4 0 30 4>;

reg = <0x40400000 0x10000>;

xlnx,include-sg ;

dma-channel@40400000 {

compatible = "xlnx,axi-dma-mm2s-channel";

interrupts = <0 29 4>;

xlnx,datawidth = <0x20>;

xlnx,device-id = <0x0>;

};

dma-channel@40400030 {

compatible = "xlnx,axi-dma-s2mm-channel";

interrupts = <0 30 4>;

xlnx,datawidth = <0x20>;

xlnx,device-id = <0x0>;

};

};

};


  |
  this answer edited Jun 8 '15 at 14:45 ZygD 3,331 10 20 41 answered Jun 8 '15 at 13:50 jofresa 1



 | 

推荐:Button input interrupt under linux kernel 2.6.35.7 send message to touch screen

/**************************************************************** * OFN/ts.c * * Copyright (c) 2011-11-24 * * light*****************************

up vote 1 down vote favorite 1 I am writing a device specific DMA driver for Zynq AXI DMA. The driver is actually a wrapper driver and uses Xilinx DMA driver under the DMA engine d

相关阅读排行


相关内容推荐

最新文章

×

×

请激活账号

为了能正常使用评论、编辑功能及以后陆续为用户提供的其他产品,请激活账号。

您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱

如果您没有收到激活邮件,请注意检查垃圾箱。