HelenOS sources
PTL0_INDEX_ARCH 66 kernel/arch/abs32le/include/arch/mm/page.h #define PTL0_INDEX_ARCH(vaddr) (((vaddr) >> 22) & 0x3ffU)
PTL0_INDEX_ARCH 88 kernel/arch/amd64/include/arch/mm/page.h #define PTL0_INDEX_ARCH(vaddr) (((vaddr) >> 39) & 0x1ffU)
PTL0_INDEX_ARCH 82 kernel/arch/arm32/include/arch/mm/page.h #define PTL0_INDEX_ARCH(vaddr) (((vaddr) >> 20) & 0xfff)
PTL0_INDEX_ARCH 89 kernel/arch/arm64/include/arch/mm/page.h #define PTL0_INDEX_ARCH(vaddr) (((vaddr) >> PTL0_VA_SHIFT) & PTL0_VA_MASK)
PTL0_INDEX_ARCH 81 kernel/arch/ia32/include/arch/mm/page.h #define PTL0_INDEX_ARCH(vaddr) (((vaddr) >> 22) & 0x3ffU)
PTL0_INDEX_ARCH 88 kernel/arch/mips32/include/arch/mm/page.h #define PTL0_INDEX_ARCH(vaddr) ((vaddr) >> 26)
PTL0_INDEX_ARCH 77 kernel/arch/ppc32/include/arch/mm/page.h #define PTL0_INDEX_ARCH(vaddr) (((vaddr) >> 22) & 0x3ff)
PTL0_INDEX_ARCH 78 kernel/arch/riscv64/include/arch/mm/page.h #define PTL0_INDEX_ARCH(vaddr) (((vaddr) >> 39) & 0x1ff)
HelenOS homepage, sources at GitHub