Re: Oops in fault.c, Unable to handle kernel paging request at virtual address 00000004
- From: Barry Schwarz <schwarzb@xxxxxxxxx>
- Date: Sat, 24 Nov 2007 13:42:40 -0800
On Fri, 23 Nov 2007 11:46:20 -0800 (PST), mattng604@xxxxxxxxx wrote:
Hi,
I am trying to typecast a void* pointer to a structure I defined
It is never necessary to cast a void* to another pointer to object
type. Your problem lies elsewhere.
called _sfrdm336_mdb. However, when I try, I get the following error:
You have a struct tag named _sfrdm336_mdb but your struct type is
either sFRDM336_MDB or struct _sfrdm336_mdb, never plain
_sfrdm336_mdb.
Oops in fault.c, Unable to handle kernel paging request at virtual
address 00000004 .
It would be nice if you told us whether this was a compile time, link
time, or run time message.
Could you please help me? I'm very stuck! I even tried ioremap() to
map the physical address kmalloc returns to a virtual address. The
problem occurs when I try to do the typecast (sFRDM336_MDB *) below:
No it doesn't.
/
******************************************************************************/
typedef struct _sfrdm336_mdb
{
INT4 errModule; /* Global error Indicator for
module
calls */
UINT2 valid; /* Indicates that this structure
has been
initialized */
eFRDM336_MOD_STATE stateModule; /* Module state; can be one of
the following
FRDM336_MOD_START,
FRDM336_MOD_IDLE or
FRDM336_MOD_READY */
UINT2 maxDevs; /* Maximum number of devices
supported */
UINT2 numDevs; /* Number of devices currently
registered */
UINT2 maxInitProfs; /* Maximum number of
initialization
profiles */
sFRDM336_DDB *pddb; /* (array of) Device Data Blocks
(DDB) in
context memory */
sFRDM336_DIV *pinitProfs; /* (array of) Initialization
profiles in
context memory */
} sFRDM336_MDB;
sFRDM336_MDB *frdm336Mdb; // TOP OF FILE, public variable
INT4 frdm336ModuleOpen ()
{
frdm336Mdb = (sFRDM336_MDB *) kmalloc(sizeof(sFRDM336_MDB),
GFP_KERNEL);
Since kmalloc is not a standard function, you will probably get much
better advice in a newsgroup devoted to whatever system it is provided
with.
sysFrdm336MemSet(frdm336Mdb, 0, size);
return 0;
} /* frdm336ModuleOpen */
/
******************************************************************************/
Thanks in advance for your help!
Matt
Remove del for email
.
- Prev by Date: Re: 100k X 100k data processing summary
- Next by Date: Re: how can I puts a char array reserve by recursion algoritym?
- Previous by thread: 100k X 100k data processing summary
- Next by thread: read 1k * 1k data
- Index(es):
Relevant Pages
|