Do you have a question? Post it now! No Registration Necessary
August 2, 2006, 11:37 am

I'm working on a kernel module interrupt handler. I stripped the problem
down with a parallel port handler and get the following result:
initializing module
Badness in enable_irq at kernel/irq/manage.c:109
[<c014e864>] enable_irq+0x84/0xf0
[<f938b05a>] initialize_module+0x5a/0x81 [parint_mod]
[<c0143a8c>] sys_init_module+0xcc/0x1e0
[<c0163878>] sys_munmap+0x48/0x70
[<c01042cb>] sysenter_past_esp+0x54/0x79
cleaning up module
this is the stripped down module:
irqreturn_t interrupt_handler(int irq, void *dev_id, struct pt_regs *regs){
interruptcount++;
printk("######INT######\n");
return IRQ_HANDLED;
}
static int __init initialize_module(void){
int ret;
printk("initializing module\n");
ret = request_irq(PAR_PORT_INT, interrupt_handler, SA_INTERRUPT,
"parallelport",
NULL);
if (ret != 0) {
printk("init of irq handler ret: %d\n", ret);
return ret;
}
enable_irq(PAR_PORT_INT);
outb_p(0x10, BASEPORT+2);//set interrupt mode
outb_p(0, BASEPORT);//force interrupt
outb_p(255, BASEPORT);
outb_p(0, BASEPORT);
return 0;
}
The module loads perfect. In init_module I just toggle the interrupt line
and /proc/interrupts reflects the incrementing interrupts. However the
handler just crashes.
The system is an updated suse 10.0 kernel (2.6.13-15.11). Installed on a
suse 9.2 system it runs perfectly, so it's a real kernel problem.
Anybody familiar with this kernel problem?
taco
down with a parallel port handler and get the following result:
initializing module
Badness in enable_irq at kernel/irq/manage.c:109
[<c014e864>] enable_irq+0x84/0xf0
[<f938b05a>] initialize_module+0x5a/0x81 [parint_mod]
[<c0143a8c>] sys_init_module+0xcc/0x1e0
[<c0163878>] sys_munmap+0x48/0x70
[<c01042cb>] sysenter_past_esp+0x54/0x79
cleaning up module
this is the stripped down module:
irqreturn_t interrupt_handler(int irq, void *dev_id, struct pt_regs *regs){
interruptcount++;
printk("######INT######\n");
return IRQ_HANDLED;
}
static int __init initialize_module(void){
int ret;
printk("initializing module\n");
ret = request_irq(PAR_PORT_INT, interrupt_handler, SA_INTERRUPT,
"parallelport",
NULL);
if (ret != 0) {
printk("init of irq handler ret: %d\n", ret);
return ret;
}
enable_irq(PAR_PORT_INT);
outb_p(0x10, BASEPORT+2);//set interrupt mode
outb_p(0, BASEPORT);//force interrupt
outb_p(255, BASEPORT);
outb_p(0, BASEPORT);
return 0;
}
The module loads perfect. In init_module I just toggle the interrupt line
and /proc/interrupts reflects the incrementing interrupts. However the
handler just crashes.
The system is an updated suse 10.0 kernel (2.6.13-15.11). Installed on a
suse 9.2 system it runs perfectly, so it's a real kernel problem.
Anybody familiar with this kernel problem?
taco
Site Timeline
- » jffs2 filesystem problem
- — Next thread in » Embedded Linux
-
- » IRQ priority tuning?
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Driver LED BP5131 - jak to dziaĆa?
- — The site's Newest Thread. Posted in » Electronics (Polish)
-
- » Rules
- — The site's Last Updated Thread. Posted in » Microcontrollers (Russian)
-