lkml.org 
[lkml]   [2005]   [Nov]   [30]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 30 Nov 2005 15:36:21 +0800
FromHua Feijun <>
Subjectwhy does the function page_to_nid always return zero?
Hi everybody:
Tthe following code deoes not work under linux/em64t, and the function
page_to_nid always return zero.Who can tell me the answer to the
problem?
Any advice will be appreciated sincerely.Thanks!!!

pgd = pgd_offset(mm, vaddr);
 if (pgd == NULL) {
   return -1;
 }
 pmd = pmd_offset(pgd, vaddr);
 if (pmd == NULL) {
     return -2;
 }
 pte = pte_offset_map(pmd, vaddr);
 PDEBUG("pte=%ul\n", pte->pte);
 if (pte == NULL) {
    return -3;
 }
return page_to_nid (page);
 if (pte_present(*pte) == NULL) {
    return -4;
 }
 page = pte_page(*pte);
 pte_unmap(pte);
return page_to_nid(page);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-30 07:39    [from the cache]
©2003-2008