kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* [mm subsystem] A question about function page_table_range_init_count()
@ 2017-03-15 14:12 Hao Lee
  2017-03-21 14:01 ` Rik van Riel
  0 siblings, 1 reply; 2+ messages in thread
From: Hao Lee @ 2017-03-15 14:12 UTC (permalink / raw)
  To: kernelnewbies

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20170315/cff9edd8/attachment.html 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [mm subsystem] A question about function page_table_range_init_count()
  2017-03-15 14:12 [mm subsystem] A question about function page_table_range_init_count() Hao Lee
@ 2017-03-21 14:01 ` Rik van Riel
  0 siblings, 0 replies; 2+ messages in thread
From: Rik van Riel @ 2017-03-21 14:01 UTC (permalink / raw)
  To: kernelnewbies

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-21 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-15 14:12 [mm subsystem] A question about function page_table_range_init_count() Hao Lee
2017-03-21 14:01 ` Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).