From: Linus Torvalds <torvalds@transmeta.com>
Date: Mon, 20 May 2002 09:13:22 -0700 (PDT)
See what I mean? You can share all the generic stuff, and only differ in
the details.
I think it is easier to make tlb_{start,end}_vma do the cache/tlb
flushing, and then change tlb_flush_mmu() to look something like:
static inline void tlb_flush_mmu(mmu_gather_t *tlb, unsigned long start, unsigned long end)
{
unsigned long nr;
- flush_tlb_mm(tlb->mm);
+ tlb_flush_mm(tlb->mm);
nr = tlb->nr;
if (nr != ~0UL) {
unsigned long i;
tlb->nr = 0;
for (i=0; i < nr; i++)
free_page_and_swap_cache(tlb->pages[i]);
}
}
Architectures define tlb_flush_mm() as appropriate, on x86 it would
be just flush_tlb_mm(mm), on Sparc/PPC/etc. which uses the VMA
flushing it would just be a NOP.
This allows to share all of the infrastructure, with just a few
overrides for the arch specific bits.
-
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 : Thu May 23 2002 - 22:00:20 EST