• Alexandre Ghiti's avatar
    riscv: Fix DEBUG_VIRTUAL false warnings · 5f763b3b
    Alexandre Ghiti authored
    KERN_VIRT_SIZE used to encompass the kernel mapping before it was
    redefined when moving the kasan mapping next to the kernel mapping to only
    match the maximum amount of physical memory.
    
    Then, kernel mapping addresses that go through __virt_to_phys are now
    declared as wrong which is not true, one can use __virt_to_phys on such
    addresses.
    
    Fix this by redefining the condition that matches wrong addresses.
    
    Fixes: f7ae0233 ("riscv: Move KASAN mapping next to the kernel mapping")
    Signed-off-by: default avatarAlexandre Ghiti <alexandre.ghiti@canonical.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
    5f763b3b
physaddr.c 891 Bytes