In the kernel module, I need to handle the interrupt by writing "zero" to the address of the physical memory.
First of all, I have to allocate memory with some function, for example "mmap", but for the kernel module; e.g. ioremap.
static irqreturn_t int068_interrupt(int irq, void *dev_id) { unsigned int *p; unsigned int address; unsigned int memsize; address = 0x12345678; memsize = 1024; p = ioremap(address, memsize); p[0]=0; printk("Interrupt was handled\n"); return IRQ_HANDLED; }
However, when a kernel crashes, a crash occurs, and the interrupt handler starts to process it (BUG kernel on mm / vmalloc.c: numberofline)
Something seems to be wrong with my use of ioremap, or should I use another "mmap kernel substitute"
Please tell me how to solve this problem?
Jake badlands
source share