Hi All, I am tracing a tool called DiskDump, which seems to fail while executing do_IRQ() code. Reason it is failing there is clear to me, but what I need to understand is that how the control actually comes to do_IRQ(). do_IRQ() is not a DiskDump function, it is a generic Kernel Function called to handle any sort of interrupt. In my case, DiskDump runs with Interrupts Disabled (i.e. cli). Therefore it is not possible that while DiskDump is running, do_IRQ() is called to handle any Hardware Interrupts. DiskDump does not generate any Software Interrupts. So only thing that is left is Exceptions. Is do_IRQ() called in case of exceptions. As far as I know, NO it is not called in case of Exceptions. I maybe wrong. But suppose it is not because of exceptions, then what else could be the reason for do_IRQ() to be called ?? Any help is highly appreciated. Thanks and Regards, Prashant Batra. -----Original Message----- From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-bounce@xxxxxxxxxxxx]On Behalf Of Tyler Sent: Monday, October 18, 2004 3:32 PM To: kernelnewbies@xxxxxxxxxxxx Subject: Re: DMA jhoney jhoney wrote: > Hello All, > > Presently I am working on DMA, I have to DMA the data from PCI HOST to PCI AGENT. I am searching for the template code for allocating dma buffer and receiving the data. I thought of following a network device which uses the DMA the packet to kernel memory and receives an interrupt. > Could u please tell me the exact code for allocating the space for DMA and calling the appropriate functions handling the whole dma process in 2.4.27 kernel for network devices > > Thanks in Advance > > Jhoney Hi, Buffers DMA have to be on a special memory pool which is init at boot time. you can then allocate DMA buffers with the normal memory functions (get_page or kmalloc) and with a special flag: __GFP_DMA kmalloc(size,__GFP_DMA) ; __get_fre_pages(__GFP_DMA,order) ; -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/