• Florian Fainelli's avatar
    MIPS: Fixed __debug_virt_addr_valid() · 8a2b4566
    Florian Fainelli authored
    It is permissible for kernel code to call virt_to_phys() against virtual
    addresses that are in KSEG0 or KSEG1 and we need to be dealing with both
    types. Rewrite the test condition to ensure that the kernel virtual
    addresses are above PAGE_OFFSET which they must be, and below KSEG2
    where the non-linear mapping starts.
    
    For EVA, there is not much that we can do given the linear address range
    that is offered, so just return any virtual address as being valid.
    
    Finally, when HIGHMEM is not enabled, all virtual addresses are assumed
    to be valid as well.
    
    Fixes: dfad83cb ("MIPS: Add support for CONFIG_DEBUG_VIRTUAL")
    Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Reviewed-by: default avatarSerge Semin <fancer.lancer@gmail.com>
    Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
    8a2b4566
physaddr.c 1.28 KB