* why does the function page_to_nid always return zero?
@ 2005-11-30 7:36 Hua Feijun
0 siblings, 0 replies; only message in thread
From: Hua Feijun @ 2005-11-30 7:36 UTC (permalink / raw)
To: linux-kernel
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-11-30 7:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-30 7:36 why does the function page_to_nid always return zero? Hua Feijun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®