interrupts registrering
hello, I'm trying to register an interrupt handler. I'm running the following code:
i = 0;
while (i < 255)
{
printk(KERN_ERR MODULE_NAME ": i = %d.\n", i);
result = request_irq(i, irq_handler, 0, MODULE_NAME, (void *)(irq_handler));
if (result == 0)
{printk(KERN_ERR MODULE_NAME ": i = %d, request_irq succeeced. \n", i);
free_irq(i, NULL);}
else
printk(KERN_ERR MODULE_NAME ": i = %d, request_irq returned %d.\n", i, result);
i++;
}
I get the following output:
success: i = 4, 6, 9, 13
failures:
i< 16: request_irq() returns EBUSY (device or resource busy)
16 <= i < 224: request_irq() returns ENOSYS (function not implemented)
224 < i: request_irq() returns EINVAL (invalid argument)
The only thing I need is a way to intercept APIC interrupt (to allocate LVT entry). What can be wrong? Why can't I allocate LVT entry #153, for example?
I'm running SUSE 9.1, kernel 2.6.52 on Pentium-M machine
Thanks in advance for the replies
|