• G
    csky: bugfix tlb_get_pgd error. · 63e19c82
    Guo Ren 提交于
    It's wrong to mask/unmask highest bit in addr to translate the vaddr
    to paddr. We should use PAGE_OFFSET and PHYS_OFFSET.
    
    Wrong implement:
      return ((get_pgd()|(1<<31)) - PHYS_OFFSET) & ~1;
    
    When PHYS_OFFSET=0xc0000000 and get_pgd() return 0xe0000000, it'll
    return 0x60000000. It's wrong and should be 0xa0000000.
    
    Now correct it to:
      return ((get_pgd() - PHYS_OFFSET) & ~1) + PAGE_OFFSET;
    Signed-off-by: NGuo Ren <ren_guo@c-sky.com>
    63e19c82
mmu_context.h 3.7 KB