lkml.org 
[lkml]   [2002]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: Linux-2.5.16
    From
       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/

    \
     
     \ /
      Last update: 2005-03-22 13:26    [W:0.024 / U:30.288 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site