• John David Anglin's avatar
    parisc: Optimze cache flush algorithms · 4c5fe5db
    John David Anglin authored
    The attached patch implements three optimizations:
    
    1) Loops in flush_user_dcache_range_asm, flush_kernel_dcache_range_asm,
    purge_kernel_dcache_range_asm, flush_user_icache_range_asm, and
    flush_kernel_icache_range_asm are unrolled to reduce branch overhead.
    
    2) The static branch prediction for cmpb instructions in pacache.S have
    been reviewed and the operand order adjusted where necessary.
    
    3) For flush routines in cache.c, we purge rather flush when we have no
    context.  The pdc instruction at level 0 is not required to write back
    dirty lines to memory. This provides a performance improvement over the
    fdc instruction if the feature is implemented.
    
    Version 2 adds alternative patching.
    
    The patch provides an average improvement of about 2%.
    Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
    Signed-off-by: default avatarHelge Deller <deller@gmx.de>
    4c5fe5db
pacache.S 35 KB