Upgrade to 2.6.26 results in Oops during request_irq
Sparks, Sam
SSparks at aclara.com
Sat Apr 10 04:39:44 EST 2010
>-----Original Message-----
>From: Sparks, Sam
>Sent: Thursday, April 08, 2010 4:15 PM
In the interest of making it easier for someone to help, I've been able
to replicate the problem with the following minimal kernel module:
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/module.h>
static unsigned int cpld_virq = NO_IRQ;
unsigned value = 0xdeadbeef;
static irqreturn_t cpld_isr(int irq, void *dev_id) {
return IRQ_HANDLED;
}
void __exit cpld_cleanup(void) {
irq_dispose_mapping(cpld_virq);
return;
}
int __init cpld_init(void) {
int retval;
unsigned long cpld_interrupt = 23;
cpld_virq = irq_create_mapping(NULL, cpld_interrupt);
if (cpld_virq == NO_IRQ) {
printk(KERN_ERR "Could not map HW IRQ %lu\n", cpld_interrupt);
return -EBUSY;
}
retval = request_irq(cpld_virq, cpld_isr,
IRQF_DISABLED | IRQF_SHARED | IRQF_TRIGGER_FALLING,
"CPLD", &value);
if (retval) {
irq_dispose_mapping(cpld_virq);
return retval;
}
return 0;
}
module_init(cpld_init);
module_exit(cpld_cleanup);
MODULE_LICENSE("Dual BSD/GPL");
It builds fine, but still gives me the same error when inserted into the
kernel:
# insmod /tmp/cpld.ko
Unable to handle kernel paging request for instruction fetch
Faulting instruction address: 0x00000000
Oops: Kernel access of bad area, sig: 11 [#1]
PREEMPT SCPA-G2
Modules linked in: cpld(+) [last unloaded: immr]
NIP: 00000000 LR: c004bab8 CTR: 00000000
REGS: dfb13df0 TRAP: 0400 Not tainted (2.6.26-twacs-100.0.0)
MSR: 20001032 <ME,IR,DR> CR: 24244422 XER: 20000000
TASK = df8b6c00[559] 'insmod' THREAD: dfb12000
GPR00: 00000000 dfb13ea0 df8b6c00 00000017 00000001 00000001 00000000
c02d1fb4
GPR08: 0000361a 00000000 00000000 00000000 44244484 10073f68 1ffcb000
007ffeb0
GPR16: 00000000 00000000 00800000 00000000 bffff7f0 00000000 1006e3dc
00000000
GPR24: 00000002 20000000 00000000 00009032 df9da620 dfb12000 c02d40e4
00000017
NIP [00000000] 0x0
LR [c004bab8] setup_irq+0x4e0/0x510
Call Trace:
[dfb13ea0] [c004ba70] setup_irq+0x498/0x510 (unreliable)
[dfb13ed0] [c004bd64] request_irq+0xe0/0x130
[dfb13f00] [e107804c] cpld_init+0x4c/0xe8 [cpld]
[dfb13f10] [c0048c4c] sys_init_module+0x14c/0x1d8
[dfb13f40] [c0010008] ret_from_syscall+0x0/0x38
--- Exception: c01 at 0xff27bb0
LR = 0x10019ca8
Instruction dump:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
Kernel panic - not syncing: Fatal exception
Please let me know if I should be providing some additional information.
Thanks,
Sam
More information about the Linuxppc-dev
mailing list