/* * Each context is 512TB. But on 4k we restrict our max TASK size to 64TB * Hence also limit max EA bits to 64TB.
*/ #define MAX_EA_BITS_PER_CONTEXT 46
/* * Our page table limit us to 64TB. For 64TB physical memory, we only need 64GB * of vmemmap space. To better support sparse memory layout, we use 61TB * linear map range, 1TB of vmalloc, 1TB of I/O and 1TB of vmememmap.
*/ #define REGION_SHIFT (40) #define H_KERN_MAP_SIZE (ASM_CONST(1) << REGION_SHIFT)
/* * Limits the linear mapping range
*/ #define H_MAX_PHYSMEM_BITS 46
/* * Define the address range of the kernel non-linear virtual area (61TB)
*/ #define H_KERN_VIRT_START ASM_CONST(0xc0003d0000000000)
/* * On all 4K setups, remap_4k_pfn() equates to remap_pfn_range()
*/ #define remap_4k_pfn(vma, addr, pfn, prot) \
remap_pfn_range((vma), (addr), (pfn), PAGE_SIZE, (prot))
/* * With 4K page size the real_pte machinery is all nops.
*/ staticinline real_pte_t __real_pte(pte_t pte, pte_t *ptep, int offset)
{ return (real_pte_t){pte};
}
#define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \ do { \
index = 0; \
shift = mmu_psize_defs[psize].shift; \
#define pte_iterate_hashed_end() } while(0)
/* * We expect this to be called only for user addresses or kernel virtual * addresses other than the linear mapping.
*/ #define pte_pagesize_index(mm, addr, pte) MMU_PAGE_4K
/* * 4K PTE format is different from 64K PTE format. Saving the hash_slot is just * a matter of returning the PTE bits that need to be modified. On 64K PTE, * things are a little more involved and hence needs many more parameters to * accomplish the same. However we want to abstract this out from the caller by * keeping the prototype consistent across the two formats.
*/ staticinlineunsignedlong pte_set_hidx(pte_t *ptep, real_pte_t rpte, unsignedint subpg_index, unsignedlong hidx, int offset)
{ return (hidx << H_PAGE_F_GIX_SHIFT) &
(H_PAGE_F_SECOND | H_PAGE_F_GIX);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.