This macro maps the page of kernel memory to an index into the
mem_map
array. The input page is kernel-space page addresses such as those
that come from the
get_free_page(9)
function. The expression
mem_map[MAP_NR(page)]
returns a pointer to a
mem_map_t
for the page in question.
Device drivers need access to the page structure if it is implimenting
some special kind of memory segment, i.e. cache for a virtual frame buffer.