This would be the reason that my brain was totally fried last night.
this would be an example of the code:
Code:
static void *mmio, *control;
int32_t register_my_system(MY_SYSTEM_USER *user)
{
// request memory region is done at insmod time and _should_not_ be where the problem is.
mmio = ioremap(0x080C0000, 0x100);
control = mmio + 0x28;
iowrite16(6, control); // enables bits 2 and 3 (one of these is an IRQ enable)
return 0;
}
EXPORT_SYMBOL(register_my_system);
void unregister_my_system(MY_SYSTEM_USER *user)
{
iounmap(mmio);
control = NULL;
mmio = NULL;
}
Now, the issue is this: If I unregister_my_system then attempt to register_my_system I hang. Sometimes I get an error from the kernel:
Originally Posted by
Linux Kernel
Unable to handle kernel paging request at virtual address 464c457f
pgd = c9f78000
[464c457f] *pgd=00000000Function entered at [<c0096c14>] from [<c0096cbc>]
r5:00000000 r4:00000002
Function entered at [<c0096c64>] from [<c0096d84>]
r8:c002e764 r7:00000005 r6:bebfbb74 r5:4001ce14 r4:00000000
Function entered at [<c0096d60>] from [<c002df60>]
Code: e597300c e1d320b0 e1a02a02 e1a02a22 (e18420b1)
but this is the ONLY thing I can get from it. The actual virtual address is 0xCAA6C028 and is that address each time I reboot and register with the driver.
So, my question is what could possibly be hanging the system? I have tried absolutely everything I can think of but still cannot figure this one out. Any help would be greatly appreciated.