Lines Matching +full:group +full:- +full:index +full:- +full:shift

1 // SPDX-License-Identifier: GPL-2.0-or-later
27 #include <asm/ppc-opcode.h>
28 #include <asm/feature-fixups.h>
30 #include <misc/cxl-base.h>
95 va &= ~((1ul << (64 - 52)) - 1); in ___tlbie()
106 va &= ~((1ul << mmu_psize_defs[apsize].shift) - 1); in ___tlbie()
142 * re-order the tlbie in fixup_tlbie_vpn()
185 va &= ~((1ul << (64 - 52)) - 1); in __tlbiel()
196 va &= ~((1ul << mmu_psize_defs[apsize].shift) - 1); in __tlbiel()
244 unsigned long *word = (unsigned long *)&hptep->v; in native_lock_hpte()
259 unsigned long *word = (unsigned long *)&hptep->v; in native_unlock_hpte()
277 DBG_LOW(" insert(group=%lx, vpn=%016lx, pa=%016lx," in native_hpte_insert()
283 if (! (be64_to_cpu(hptep->v) & HPTE_V_VALID)) { in native_hpte_insert()
286 if (! (be64_to_cpu(hptep->v) & HPTE_V_VALID)) in native_hpte_insert()
296 return -1; in native_hpte_insert()
312 hptep->r = cpu_to_be64(hpte_r); in native_hpte_insert()
320 hptep->v = cpu_to_be64(hpte_v); in native_hpte_insert()
338 DBG_LOW(" remove(group=%lx)\n", hpte_group); in native_hpte_remove()
345 hpte_v = be64_to_cpu(hptep->v); in native_hpte_remove()
350 hpte_v = be64_to_cpu(hptep->v); in native_hpte_remove()
362 i = -1; in native_hpte_remove()
368 hptep->v = 0; in native_hpte_remove()
387 DBG_LOW(" update(vpn=%016lx, avpnv=%016lx, group=%lx, newpp=%lx)", in native_hpte_updatepp()
399 DBG_LOW(" -> miss\n"); in native_hpte_updatepp()
400 ret = -1; in native_hpte_updatepp()
407 ret = -1; in native_hpte_updatepp()
409 DBG_LOW(" -> hit\n"); in native_hpte_updatepp()
411 hptep->r = cpu_to_be64((be64_to_cpu(hptep->r) & in native_hpte_updatepp()
448 return -1; in __native_hpte_find()
458 hash = hpt_hash(vpn, mmu_psize_defs[psize].shift, ssize); in native_hpte_find()
472 return -1; in native_hpte_find()
500 if (slot == -1) in native_hpte_updateboltedpp()
505 hptep->r = cpu_to_be64((be64_to_cpu(hptep->r) & in native_hpte_updateboltedpp()
536 if (slot == -1) in native_hpte_removebolted()
537 return -ENOENT; in native_hpte_removebolted()
541 VM_WARN_ON(!(be64_to_cpu(hptep->v) & HPTE_V_BOLTED)); in native_hpte_removebolted()
544 hptep->v = 0; in native_hpte_removebolted()
578 hptep->v = 0; in native_hpte_invalidate()
605 unsigned long hpte_v, want_v, shift; in native_hugepage_invalidate() local
608 shift = mmu_psize_defs[psize].shift; in native_hugepage_invalidate()
609 max_hpte_count = 1U << (PMD_SHIFT - shift); in native_hugepage_invalidate()
619 addr = s_addr + (i * (1ul << shift)); in native_hugepage_invalidate()
621 hash = hpt_hash(vpn, shift, ssize); in native_hugepage_invalidate()
641 hptep->v = 0; in native_hugepage_invalidate()
668 unsigned long hpte_v = be64_to_cpu(hpte->v); in hpte_decode()
669 unsigned long hpte_r = be64_to_cpu(hpte->r); in hpte_decode()
671 int size, a_size, shift; in hpte_decode() local
673 unsigned int lp = (hpte_r >> LP_SHIFT) & ((1 << LP_BITS) - 1); in hpte_decode()
688 shift = mmu_psize_defs[size].shift; in hpte_decode()
697 /* We only have 28 - 23 bits of seg_off in avpn */ in hpte_decode()
701 if (shift < 23) { in hpte_decode()
703 seg_off |= vpi << shift; in hpte_decode()
705 *vpn = vsid << (SID_SHIFT - VPN_SHIFT) | seg_off >> VPN_SHIFT; in hpte_decode()
708 /* We only have 40 - 23 bits of seg_off in avpn */ in hpte_decode()
711 if (shift < 23) { in hpte_decode()
713 seg_off |= vpi << shift; in hpte_decode()
715 *vpn = vsid << (SID_SHIFT_1T - VPN_SHIFT) | seg_off >> VPN_SHIFT; in hpte_decode()
759 hpte_v = be64_to_cpu(hptep->v); in native_hpte_clear()
767 hptep->v = 0; in native_hpte_clear()
782 unsigned long hash, index, hidx, shift, slot; in native_flush_hash_range() local
789 unsigned long psize = batch->psize; in native_flush_hash_range()
790 int ssize = batch->ssize; in native_flush_hash_range()
800 vpn = batch->vpn[i]; in native_flush_hash_range()
801 pte = batch->pte[i]; in native_flush_hash_range()
803 pte_iterate_hashed_subpages(pte, psize, vpn, index, shift) { in native_flush_hash_range()
804 hash = hpt_hash(vpn, shift, ssize); in native_flush_hash_range()
805 hidx = __rpte_to_hidx(pte, index); in native_flush_hash_range()
824 hptep->v = 0; in native_flush_hash_range()
833 vpn = batch->vpn[i]; in native_flush_hash_range()
834 pte = batch->pte[i]; in native_flush_hash_range()
837 vpn, index, shift) { in native_flush_hash_range()
850 vpn = batch->vpn[i]; in native_flush_hash_range()
851 pte = batch->pte[i]; in native_flush_hash_range()
854 vpn, index, shift) { in native_flush_hash_range()