Greetings:
I was looking a little bit at sparc(32) and ran into a difficulty
with pmd_page. The 2.5 version returns struct page*, presumably
to support page tables in highmem. Unfortunately, sparc (sun4m
actually) cannot do that, because its page tables are smaller
than memory pages.
This is the only code fragment that makes use of pmd_page:
mm/memory.c:
static inline void free_one_pmd(mmu_gather_t *tlb, pmd_t * dir)
{
struct page *pte;
if (pmd_none(*dir))
return;
if (pmd_bad(*dir)) {
pmd_ERROR(*dir);
pmd_clear(dir);
return;
}
pte = pmd_page(*dir);
pmd_clear(dir);
pte_free_tlb(tlb, pte);
}
Has anyone got an idea how to fix this? I've got some, but all seem bad:
a) Use 2 lower bits of the page pointer to store an index and
have pte_free to mask it out (possibly change pmd_page to return void*),
b) Map the page table temporarily in pmd_page,
c) Create a new architecture function pmd_zap which contains
the sequence { tmp = pmd_page(); pmd_clear(); pte_free_tlb(tmp); }
on all architectures except sparc,
d) Copy *dir into tmp instead of pte as we do now explicitly,
if that can work, say, on s390
-- Pete
-
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/
This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:24 EST