* io_block_mapping & ioremap question
@ 2008-04-15 16:25 Gutson Daniel-ADG035
2008-04-16 3:52 ` Kumar Gala
0 siblings, 1 reply; 2+ messages in thread
From: Gutson Daniel-ADG035 @ 2008-04-15 16:25 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
I'm doing some work on 2.6.10, and got this problem:
- there are some io_block_mapping calls in the setup_io_mapping
callback, that use the BATs, and passing same va and pa each one.
Problem arises later when vmallocs gets a a pointer within the mapped
ranges. In other words, seems like the VMM is not aware of the BATs
mapping.
So what I did is: called first ioremap and then io_block_mapping in the
callback thus not hardcoding the va, something like:
va =3D ioremap(pa, size);
io_block_mapping(pa, va, size);
Questions:
1) Is it right?
2) Should I unmap that address sometime later? (i.e. after
mem_init_done).
Thanks!
Daniel.
=20
Daniel F. Gutson
Software Engineer
Motorola GSG Argentina
Tel =3D (54)-351-420-9218
Fax =3D (54)-351-420-9202
=20
iProtect Classification
[x] Public
[ ] Internal
[ ] Motorola Confidential Restricted
=20
"we made a big mistake in coming down from the trees in the first place"
- D. Adams
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: io_block_mapping & ioremap question
2008-04-15 16:25 io_block_mapping & ioremap question Gutson Daniel-ADG035
@ 2008-04-16 3:52 ` Kumar Gala
0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2008-04-16 3:52 UTC (permalink / raw)
To: Gutson Daniel-ADG035; +Cc: linuxppc-embedded
On Apr 15, 2008, at 11:25 AM, Gutson Daniel-ADG035 wrote:
> Hi,
> I'm doing some work on 2.6.10, and got this problem:
> - there are some io_block_mapping calls in the setup_io_mapping
> callback, that use the BATs, and passing same va and pa each one.
> Problem arises later when vmallocs gets a a pointer within the mapped
> ranges. In other words, seems like the VMM is not aware of the BATs
> mapping.
>
> So what I did is: called first ioremap and then io_block_mapping in
> the
> callback thus not hardcoding the va, something like:
> va = ioremap(pa, size);
> io_block_mapping(pa, va, size);
>
> Questions:
> 1) Is it right?
> 2) Should I unmap that address sometime later? (i.e. after
> mem_init_done).
You should look at getting ride of your io_block_mapping calls as
we've removed that in new kernels.
However, ioremap() should work properly in that it should lookup the
address you are mapping via p_mapped_by_bats().
- k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-16 3:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-15 16:25 io_block_mapping & ioremap question Gutson Daniel-ADG035
2008-04-16 3:52 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox