• Vineet Gupta's avatar
    ARC: [mm] optimise icache flush for kernel mappings · 7586bf72
    Vineet Gupta authored
    This change continues the theme from prev commit - this time icache
    handling for kernel's own code modification (vmalloc: loadable modules,
    breakpoints for kprobes/kgdb...)
    
    flush_icache_range() calls the CDU icache helper with vaddr to enable
    exact line invalidate.
    
    For a true kernel-virtual mapping, the vaddr is actually virtual hence
    valid as index into cache. For kprobes breakpoint however, the vaddr arg
    is actually paddr - since that's how normal kernel is mapped in ARC
    memory map.  This implies that CDU will use the same addr for
    indexing as for tag match - which is fine since kernel code would only
    have that "implicit" mapping and none other.
    
    This should speed up module loading significantly - specially on default
    ARC700 icache configurations (32k) which alias.
    Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
    7586bf72
cache_arc700.c 23.1 KB