facing problem with io_p2v() function

3 messages, 3 authors, 2008-08-21 · open the first message on its own page

facing problem with io_p2v() function

From: Misbah khan <hidden>
Date: 2008-08-13 15:31:32

Hi all,

I am using io_p2v() function in my driver to get the virtual address mapping
timer control registers

i am passing address as 0x48304024 as base and after getting the virtual
address of it i am reading and writing to it but my any attempt to read the
location or write is giving segmentation fault

If i use __pa() to read the corresponding location it returning as
0x98304024 insted of 0x48304024

I dont know where the mapping is going wrong 

Even when i tried using ioremap() i got the same kernel panic 

Below is the error message 


-------------------------------------------------------------------------------------------------------

In init function
 Read reg address virt 0xd8304024 and phy 0x98304024 are
Unhandled fault: external abort on non-linefetch (0x1028) at 0xd8304024
Internal error: : 1028 [#1]
Modules linked in: omap_timer
CPU: 0    Not tainted  (2.6.22.1-omap3 #1)
PC is at omap_timer_read_register+0x30/0x3c [omap_timer]
LR is at release_console_sem+0x1c0/0x1d4
pc : [<bf000160>]    lr : [<c005f650>]    psr: 60000013
sp : c7f1bea0  ip : c7f1bdd8  fp : c7f1beb4
r10: c8858000  r9 : 00000026  r8 : 00000027
r7 : c06dfdf0  r6 : 00000000  r5 : bf001018  r4 : 00000024
r3 : d8304000  r2 : 00000000  r1 : 60000013  r0 : 0000003d
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 00c5387f  Table: 80694018  DAC: 00000015
Process insmod (pid: 306, stack limit = 0xc7f1a2d0)
Stack: (0xc7f1bea0 to 0xc7f1c000)
bea0: 00000000 bf001018 c7f1bed4 c7f1beb8 bf0001c4 bf00013c 00000000

48 more lines

Re: facing problem with io_p2v() function

From: Sergey Temerkhanov <hidden>
Date: 2008-08-21 00:11:10

Misbah khan wrote:
Hi all,

I am using io_p2v() function in my driver to get the virtual address mapping
timer control registers

i am passing address as 0x48304024 as base and after getting the virtual
address of it i am reading and writing to it but my any attempt to read the
location or write is giving segmentation fault

If i use __pa() to read the corresponding location it returning as
0x98304024 insted of 0x48304024

I dont know where the mapping is going wrong

Even when i tried using ioremap() i got the same kernel panic

Below is the error message


-------------------------------------------------------------------------------------------------------

In init function
 Read reg address virt 0xd8304024 and phy 0x98304024 are
Unhandled fault: external abort on non-linefetch (0x1028) at 0xd8304024
Internal error: : 1028 [#1]
Modules linked in: omap_timer
CPU: 0    Not tainted  (2.6.22.1-omap3 #1)
PC is at omap_timer_read_register+0x30/0x3c [omap_timer]
LR is at release_console_sem+0x1c0/0x1d4
pc : [<bf000160>]    lr : [<c005f650>]    psr: 60000013
sp : c7f1bea0  ip : c7f1bdd8  fp : c7f1beb4
r10: c8858000  r9 : 00000026  r8 : 00000027
r7 : c06dfdf0  r6 : 00000000  r5 : bf001018  r4 : 00000024
r3 : d8304000  r2 : 00000000  r1 : 60000013  r0 : 0000003d
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 00c5387f  Table: 80694018  DAC: 00000015
Process insmod (pid: 306, stack limit = 0xc7f1a2d0)
Stack: (0xc7f1bea0 to 0xc7f1c000)
bea0: 00000000 bf001018 c7f1bed4 c7f1beb8 bf0001c4 bf00013c 00000000
bf001280

45 more quoted lines

Did you try the ioremap() function for this?

Re: facing problem with io_p2v() function

From: Olof Johansson <hidden>
Date: 2008-08-21 19:54:40

On Wed, Aug 13, 2008 at 08:31:28AM -0700, Misbah khan wrote:
Below is the error message 
The below panic is not from a powerpc system, it looks like it might
be from ARM. I suggest you find an ARM embedded list to ask these
questions on.


-Olof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help