[mm subsystem] A question about function page_table_range_init_count()
Hi, all I encounter a problem when I read the source code of kernel 4.9.9. In arch/x86/mm/init_32.c, at line 125 [1], there is a function named page_table_range_init_count(...). I have analyzed some codes and find its two parameters are PKMAP_BASE and FIXADDR_START. Between Line 141 and Line 150, there is a for loop and I don't know what it means, especially Line 144-Line147. Could someone can give me some tips. Thanks a lot! Here is the code: [1] http://lxr.free-electrons.com/source/arch/x86/mm/init_32.c?v=4.9#L125 Hao Lee Thanks.
On Wed, 2017-03-15 at 22:12 +0800, Hao Lee wrote:
Hi, all
I encounter a problem when I read the source code of kernel 4.9.9.
In arch/x86/mm/init_32.c, at line 125 [1], there is a function named page_table_range_init_count(...). I have analyzed some codes and find its two parameters are PKMAP_BASE and FIXADDR_START.
Between Line 141 and Line 150, there is a for loop and I don't know what it means, especially Line 144-Line147.
Could someone can give me some tips. Thanks a lot!
The code iterates over the virtual memory addresses specified, and counts the number of pmds (second level page tables) that will be needed to map that address space.
participants (2)
-
Hao Lee -
Rik van Riel