Skip to contentSkip to conversation

Trying to vfree() nonexistent vm area

DISCUSSION Duy-Ky Nguyen 2 participants 2 messages Oct 7, 2008 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hello,

My driver uses ioremap() the IMMR_BASE @ 0xE0000000 to access registers. A user-space app opens and close the deive file on every access to register.

There's no problem with FreeScale Linuc BSP 2..6.20 for eva board MPC83813E-RDB.

For the latest FreeScale Linuc BSP 2..6.24 , I have NO problem for the very FIRST run.
But after the 1st run, I have problem with the new FreeScale Linuc BSP 2..6.24 with the following error message

Trying to vfree() nonexistent vm area (c98a0000)

where c98a0000 is the mapped address of IMMR_BASE 0xE0000000.

So, it appears to me that the device file could be closed improperly as it's closed after the 1st run.

I really appreciate your time and help

Best Regards,

Duy-Ky

///////////////////////
Below is outline of the driver

init:

    ppc_base = (unsigned long) ioremap_nocache(PPC_BASE, PPC_SIZE);

// ppc_base = (unsigned long) ioremap(PPC_BASE, PPC_SIZE); // failure with this way too

close:
iounmap((void __iomem *)ppc_base);
// iounmap(PPC_BASE); // failure with this way too !

#2 lore raw
Quoted 6 lines

///////////////////////
Below is outline of the driver

init:

   ppc_base = (unsigned long) ioremap_nocache(PPC_BASE, PPC_SIZE);
Quoted 9 lines

// ppc_base = (unsigned long) ioremap(PPC_BASE, PPC_SIZE); // failure
with this way too

close:
iounmap((void __iomem *)ppc_base);
// iounmap(PPC_BASE); // failure with this way too !

init and close seems to be wrong combinations. You can try,

open - ioremap
close - iounmap

or

init - ioremap
exit - iounmap

Signature · 1 line
Selva