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


    On Mon, 20 May 2002, Paul Mackerras wrote:
    >
    > This patch splits up the existing tlb_remove_page into
    > tlb_remove_tlb_entry (for pages that are/were mapped into userspace)
    > and tlb_remove_page, as you suggested. It also adds the necessary
    > stuff for PPC, which has its own include/asm-ppc/tlb.h now. This
    > works on at least one PPC machine. :)

    Hmm.. The PPC <asm/tlb.h> seems to be largely a simplified version of
    the asm-generic one, with no support for the UP optimization, for example.

    And that UP optimization should be perfectly correct even on PPC, so you
    apparently lost something in the translation.

    I'd actually rather try to share more of the code, if possible.

    That does involve putting some of the helper functions in the native
    asm/tlb.h file, so I would suggest somehting along the line of

    - asm-i386/tlb.h:

    /*
    * x86 doesn't need to do any per-TLB work,
    * or care about VMA ranges
    */
    #define tlb_flush_one_page(tlb,page,address) do { } while (0)
    #define tlb_start_vma(tlb,vma) do { } while (0)
    #define tlb_end_vma(tlb,vma) do { } while (0)

    #include <asm-generic/tlb.h>

    - asm-ppc/tlb.h:


    static inline void tlb_flush_one_page(tlb, page, address)
    {
    if (tlb->nr == 0)
    tlb->start = address;
    else if (address - tlb->end > 32 * PAGE_SIZE) {
    tlb_flush_mmu(tlb);
    tlb->start = address;
    }
    tlb->end = address;
    }
    #define tlb_start_vma(tlb,vma) do { } while (0)
    #define tlb_end_vma(tlb,vma) tlb_flush_mmu(tlb)

    #include <asm-generic/tlb.h>

    See what I mean? You can share all the generic stuff, and only differ in
    the details.

    I think.

    Linus

    -
    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:4.632 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site