{"id":4167,"date":"2022-12-20T17:39:36","date_gmt":"2022-12-20T20:39:36","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/skel-man9-3\/"},"modified":"2022-12-20T17:39:36","modified_gmt":"2022-12-20T20:39:36","slug":"skel-man9-3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/skel-man9-3\/","title":{"rendered":"skel (man9)"},"content":{"rendered":"<h1 align=\"center\">skel<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#RETURN VALUE\">RETURN VALUE<\/a><br \/> <a href=\"#AVAILABILITY\">AVAILABILITY<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#BUGS\">BUGS<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">MAP_NR \u2212 get memory map index for page in kernel memory<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <linux\/mm.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#define MAP_NR(<\/b><i>page<\/i><b>)<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This macro maps the page of kernel memory to an index into the <b>mem_map<\/b> array. The input page is kernel-space page addresses such as those that come from the <b>get_free_page<\/b>(9) function. The expression <i>mem_map[MAP_NR(page)]<\/i> returns a pointer to a <i>mem_map_t<\/i> for the page in question.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">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.<\/p>\n<h2>RETURN VALUE <a name=\"RETURN VALUE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Returns an index into the <b>mem_map<\/b> array.<\/p>\n<h2>AVAILABILITY <a name=\"AVAILABILITY\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Linux 2.0+<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>get_free_pages<\/b>(9)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/usr\/include\/asm\/page.h<\/i><\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Stephen Williams <steve@icarus.com><\/p>\n<h2>BUGS <a name=\"BUGS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">There is no check that the page you are passing really is a valid page address.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  MAP_NR \u2212 get memory map index for page in kernel memory <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1222],"tags":[1226,1223,1225,1247],"class_list":["post-4167","post","type-post","status-publish","format-standard","hentry","category-9-rutinas-del-nucleo","tag-1226","tag-kernel","tag-man9","tag-map_nr"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4167"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4167\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}