Skip to contentSkip to conversation

ioremap and page table

DISCUSSION [email protected] 2 participants 3 messages Jul 11, 2021 – Jul 12, 2021

lore
Share & tools
lore
#0 lore raw

Hello all,

I'm almost sure but want to check if my understanding is correct.

To use a memory mapped IO, we use functions like request_mem_region and ioremap, iounmap functions.

I guess when we call ioremap function, the kernel sets up page table for the region so that the region becomes non-cacheable, and I don't also have to worry about reordering problem.

Is my understanding correct?

Thanks!

Chan Kim

_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

#1 lore raw

What my understanding is that ioremap converts your address to a virtual address. So, yes everything then is handled by the kernel

Quoted 13 lines · On Sun, Jul 11, 2021 at 9:04 PM <[email protected]> wrote:

Hello all,

I’m almost sure but want to check if my understanding is correct.

To use a memory mapped IO, we use functions like request_mem_region and ioremap, iounmap functions.

I guess when we call ioremap function, the kernel sets up page table for the region so that the region becomes non-cacheable, and I don’t also have
to worry about reordering problem.

Is my understanding correct?

Quoted 8 lines

Thanks!

Chan Kim
_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

#2 lore raw

Ah, yes of course the virtual address. Thanks for pointing it out!

Chan Kim

From: Deepanshu Kartikey <[email protected]>
Sent: Monday, July 12, 2021 1:48 AM
To: [email protected]
Cc: [email protected]
Subject: Re: ioremap and page table

What my understanding is that ioremap converts your address to a virtual address. So, yes everything then is handled by the kernel

On Sun, Jul 11, 2021 at 9:04 PM <[email protected] <mailto:[email protected]> > wrote:

Hello all,

I’m almost sure but want to check if my understanding is correct.

To use a memory mapped IO, we use functions like request_mem_region and ioremap, iounmap functions.

I guess when we call ioremap function, the kernel sets up page table for the region so that the region becomes non-cacheable, and I don’t also have to worry about reordering problem.

Is my understanding correct?

Thanks!

Chan Kim

_______________________________________________
Kernelnewbies mailing list
[email protected] <mailto:[email protected]>
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies