/openbmc/linux/arch/powerpc/mm/ |
H A D | copro_fault.c | 85 u64 vsid, vsidkey; in copro_calculate_slb() local 95 vsid = get_user_vsid(&mm->context, ea, ssize); in copro_calculate_slb() 102 vsid = get_kernel_vsid(ea, mmu_kernel_ssize); in copro_calculate_slb() 109 vsid = get_kernel_vsid(ea, mmu_kernel_ssize); in copro_calculate_slb() 116 vsid = get_kernel_vsid(ea, mmu_kernel_ssize); in copro_calculate_slb() 124 if (!vsid) in copro_calculate_slb() 127 vsid = (vsid << slb_vsid_shift(ssize)) | vsidkey; in copro_calculate_slb() 129 vsid |= mmu_psize_defs[psize].sllp | in copro_calculate_slb() 133 slb->vsid = vsid; in copro_calculate_slb()
|
/openbmc/linux/arch/powerpc/include/asm/book3s/64/ |
H A D | mmu-hash.h | 159 void (*hugepage_invalidate)(unsigned long vsid, 421 unsigned long vsid, int ssize) in hpt_vpn() argument 437 unsigned long hash, vsid; in hpt_hash() local 446 vsid = vpn >> (SID_SHIFT_1T - VPN_SHIFT); in hpt_hash() 447 hash = vsid ^ (vsid << 25) ^ in hpt_hash() 483 unsigned long vsid, pmd_t *pmdp, in __hash_page_thp() argument 515 u64 vsid; member 757 unsigned long vsid; in vsid_scramble() local 762 vsid = protovsid * vsid_multiplier; in vsid_scramble() 763 vsid = (vsid >> vsid_bits) + (vsid & vsid_modulus); in vsid_scramble() [all …]
|
/openbmc/qemu/target/ppc/ |
H A D | mmu-hash64.c | 96 slbv = env->slb[i].vsid; in dump_slb() 282 slb->vsid = vsid; in ppc_store_slb() 287 slb->esid, slb->vsid); in ppc_store_slb() 319 *rt = slb->vsid; in ppc_load_slb_vsid() 336 *rt = slb->vsid; in ppc_find_slb_vsid() 731 if (slb->vsid & SLB_VSID_B) { in ppc_hash64_htab_lookup() 733 vsid = (slb->vsid & SLB_VSID_VSID) >> SLB_VSID_SHIFT_1T; in ppc_hash64_htab_lookup() 735 hash = vsid ^ (vsid << 25) ^ (epn >> sps->page_shift); in ppc_hash64_htab_lookup() 738 vsid = (slb->vsid & SLB_VSID_VSID) >> SLB_VSID_SHIFT; in ppc_hash64_htab_lookup() 757 vsid, ptem, hash); in ppc_hash64_htab_lookup() [all …]
|
H A D | mmu-hash32.c | 260 uint32_t vsid, pgidx, ptem; in ppc_hash32_htab_lookup() local 262 vsid = sr & SR32_VSID; in ppc_hash32_htab_lookup() 264 hash = vsid ^ pgidx; in ppc_hash32_htab_lookup() 265 ptem = (vsid << 7) | (pgidx >> 10); in ppc_hash32_htab_lookup() 278 vsid, ptem, hash); in ppc_hash32_htab_lookup() 286 ppc_hash32_hpt_mask(cpu), vsid, ptem, ~hash); in ppc_hash32_htab_lookup()
|
/openbmc/linux/arch/powerpc/kvm/ |
H A D | book3s_32_mmu.c | 73 u64 *vsid); 83 u64 vsid; in kvmppc_mmu_book3s_32_ea_to_vp() local 156 u64 vsid; in kvmppc_mmu_book3s_32_xlate_bat() local 158 eaddr >> SID_SHIFT, &vsid); in kvmppc_mmu_book3s_32_xlate_bat() 159 vsid <<= 16; in kvmppc_mmu_book3s_32_xlate_bat() 349 u64 *vsid) in kvmppc_mmu_book3s_32_esid_to_vsid() argument 367 *vsid = VSID_REAL | esid; in kvmppc_mmu_book3s_32_esid_to_vsid() 370 *vsid = VSID_REAL_IR | gvsid; in kvmppc_mmu_book3s_32_esid_to_vsid() 377 *vsid = sr_vsid(sr); in kvmppc_mmu_book3s_32_esid_to_vsid() 379 *vsid = VSID_BAT | gvsid; in kvmppc_mmu_book3s_32_esid_to_vsid() [all …]
|
H A D | book3s_32_mmu_host.c | 106 static u32 *kvmppc_mmu_get_pteg(struct kvm_vcpu *vcpu, u32 vsid, u32 eaddr, in kvmppc_mmu_get_pteg() argument 114 hash = ((vsid ^ page) << 6); in kvmppc_mmu_get_pteg() 135 u64 vsid; in kvmppc_mmu_map_page() local 158 vcpu->arch.mmu.esid_to_vsid(vcpu, orig_pte->eaddr >> SID_SHIFT, &vsid); in kvmppc_mmu_map_page() 159 map = find_sid_vsid(vcpu, vsid); in kvmppc_mmu_map_page() 162 map = find_sid_vsid(vcpu, vsid); in kvmppc_mmu_map_page() 166 vsid = map->host_vsid; in kvmppc_mmu_map_page() 167 vpn = (vsid << (SID_SHIFT - VPN_SHIFT)) | in kvmppc_mmu_map_page() 176 pteg = kvmppc_mmu_get_pteg(vcpu, vsid, eaddr, primary); in kvmppc_mmu_map_page() 194 pteg0 = ((eaddr & 0x0fffffff) >> 22) | (vsid << 7) | PTE_V | in kvmppc_mmu_map_page()
|
H A D | book3s_64_mmu_host.c | 77 u64 vsid; in kvmppc_mmu_map_page() local 107 vcpu->arch.mmu.esid_to_vsid(vcpu, orig_pte->eaddr >> SID_SHIFT, &vsid); in kvmppc_mmu_map_page() 108 map = find_sid_vsid(vcpu, vsid); in kvmppc_mmu_map_page() 112 map = find_sid_vsid(vcpu, vsid); in kvmppc_mmu_map_page() 116 vsid, orig_pte->eaddr); in kvmppc_mmu_map_page() 144 if (vsid & VSID_64K) in kvmppc_mmu_map_page() 217 u64 vsid; in kvmppc_mmu_unmap_page() local 219 vcpu->arch.mmu.esid_to_vsid(vcpu, pte->eaddr >> SID_SHIFT, &vsid); in kvmppc_mmu_unmap_page() 220 if (vsid & VSID_64K) in kvmppc_mmu_unmap_page() 349 svcpu->slb[slb_index].vsid = slb_vsid; in kvmppc_mmu_map_segment()
|
H A D | book3s_64_mmu.c | 51 if (vcpu->arch.slb[i].vsid) in kvmppc_mmu_book3s_64_find_slbe() 57 vcpu->arch.slb[i].vsid); in kvmppc_mmu_book3s_64_find_slbe() 78 ((slb->vsid) << (kvmppc_slb_sid_shift(slb) - VPN_SHIFT)); in kvmppc_slb_calc_vpn() 141 page, vcpu_book3s->sdr1, pteg, slbe->vsid); in kvmppc_mmu_book3s_64_get_pteg() 161 avpn |= slbe->vsid << (kvmppc_slb_sid_shift(slbe) - p); in kvmppc_mmu_book3s_64_get_avpn() 383 slbe->vsid = (rs & ~SLB_VSID_B) >> (kvmppc_slb_sid_shift(slbe) - 16); in kvmppc_mmu_book3s_64_slbmte() 573 u64 *vsid) in kvmppc_mmu_book3s_64_esid_to_vsid() argument 585 gvsid = slb->vsid; in kvmppc_mmu_book3s_64_esid_to_vsid() 631 *vsid = gvsid; in kvmppc_mmu_book3s_64_esid_to_vsid() 639 *vsid = VSID_REAL | esid; in kvmppc_mmu_book3s_64_esid_to_vsid()
|
/openbmc/linux/drivers/misc/lkdtm/ |
H A D | powerpc.c | 73 unsigned long esid, vsid; in insert_dup_slb_entry_0() local 80 asm volatile("slbmfev %0,%1" : "=r" (vsid) : "r" (i)); in insert_dup_slb_entry_0() 84 : "r" (vsid), in insert_dup_slb_entry_0() 89 asm volatile("slbmfev %0,%1" : "=r" (vsid) : "r" (i)); in insert_dup_slb_entry_0() 93 : "r" (vsid), in insert_dup_slb_entry_0()
|
/openbmc/linux/arch/powerpc/mm/book3s64/ |
H A D | hash_native.c | 489 unsigned long vsid; in native_hpte_updateboltedpp() local 496 vsid = get_kernel_vsid(ea, ssize); in native_hpte_updateboltedpp() 497 vpn = hpt_vpn(ea, vsid, ssize); in native_hpte_updateboltedpp() 525 unsigned long vsid; in native_hpte_removebolted() local 532 vsid = get_kernel_vsid(ea, ssize); in native_hpte_removebolted() 533 vpn = hpt_vpn(ea, vsid, ssize); in native_hpte_removebolted() 620 vpn = hpt_vpn(addr, vsid, ssize); in native_hugepage_invalidate() 670 unsigned long vsid, seg_off; in hpte_decode() local 699 vsid = avpn >> 5; in hpte_decode() 710 vsid = avpn >> 17; in hpte_decode() [all …]
|
H A D | hash_tlb.c | 45 unsigned long vsid; in hpte_need_flush() local 90 vsid = get_user_vsid(&mm->context, addr, ssize); in hpte_need_flush() 92 vsid = get_kernel_vsid(addr, mmu_kernel_ssize); in hpte_need_flush() 95 WARN_ON(vsid == 0); in hpte_need_flush() 96 vpn = hpt_vpn(addr, vsid, ssize); in hpte_need_flush()
|
H A D | hash_utils.c | 378 if (!vsid) in htab_bolt_mapping() 1418 unsigned long vsid, unsigned long trap, in hash_failure_debug() argument 1426 trap, vsid, ssize, psize, lpsize, pte); in hash_failure_debug() 1458 unsigned long vsid; in hash_page_mm() local 1482 vsid = get_kernel_vsid(ea, mmu_kernel_ssize); in hash_page_mm() 1489 vsid = get_kernel_vsid(ea, mmu_kernel_ssize); in hash_page_mm() 1505 if (!vsid) { in hash_page_mm() 1758 unsigned long vsid; in hash_preload() local 1780 if (!vsid) in hash_preload() 1987 vpn = hpt_vpn(addr, vsid, ssize); in flush_hash_hugepage() [all …]
|
H A D | hash_hugepage.c | 21 int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid, in __hash_page_thp() argument 79 vpn = hpt_vpn(ea, vsid, ssize); in __hash_page_thp() 88 flush_hash_hugepage(vsid, ea, pmdp, MMU_PAGE_64K, in __hash_page_thp() 166 hash_failure_debug(ea, access, vsid, trap, ssize, in __hash_page_thp()
|
H A D | hash_64k.c | 38 int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid, in __hash_page_4K() argument 90 vpn = hpt_vpn(ea, vsid, ssize); in __hash_page_4K() 213 hash_failure_debug(ea, access, vsid, trap, ssize, in __hash_page_4K() 229 unsigned long vsid, pte_t *ptep, unsigned long trap, in __hash_page_64K() argument 275 vpn = hpt_vpn(ea, vsid, ssize); in __hash_page_64K() 328 hash_failure_debug(ea, access, vsid, trap, ssize, in __hash_page_64K()
|
H A D | slb.c | 78 WRITE_ONCE(p->save_area[index].vsid, cpu_to_be64(mk_vsid_data(ea, ssize, flags))); in slb_shadow_update() 117 : "r" (be64_to_cpu(p->save_area[index].vsid)), in __slb_restore_bolted_realmode() 164 ksp_vsid_data = be64_to_cpu(p->save_area[KSTACK_INDEX].vsid); in __slb_flush_and_restore_bolted() 217 slb_ptr->vsid = v; in slb_save_contents() 235 v = slb_ptr->vsid; in slb_dump_contents() 674 unsigned long vsid; in slb_insert_entry() local 678 vsid = get_vsid(context, ea, ssize); in slb_insert_entry() 679 if (!vsid) in slb_insert_entry() 695 vsid_data = __mk_vsid_data(vsid, ssize, flags); in slb_insert_entry()
|
H A D | hash_4k.c | 21 int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid, in __hash_page_4K() argument 66 vpn = hpt_vpn(ea, vsid, ssize); in __hash_page_4K() 117 hash_failure_debug(ea, access, vsid, trap, ssize, in __hash_page_4K()
|
H A D | hugetlbpage.c | 20 int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid, in __hash_page_huge() argument 33 vpn = hpt_vpn(ea, vsid, ssize); in __hash_page_huge() 112 hash_failure_debug(ea, access, vsid, trap, ssize, in __hash_page_huge()
|
H A D | hash_pgtable.c | 317 unsigned long vsid; in hpte_do_hugepage_flush() local 332 vsid = get_user_vsid(&mm->context, addr, ssize); in hpte_do_hugepage_flush() 333 WARN_ON(vsid == 0); in hpte_do_hugepage_flush() 335 vsid = get_kernel_vsid(addr, mmu_kernel_ssize); in hpte_do_hugepage_flush() 342 return flush_hash_hugepage(vsid, addr, pmdp, psize, ssize, flags); in hpte_do_hugepage_flush()
|
/openbmc/linux/drivers/misc/cxl/ |
H A D | fault.c | 24 return ((sste->vsid_data == cpu_to_be64(slb->vsid)) && in sste_matches() 40 if (slb->vsid & SLB_VSID_B_1T) in find_free_sste() 75 sste - ctx->sstp, slb->vsid, slb->esid); in cxl_load_segment() 76 trace_cxl_ste_write(ctx, sste - ctx->sstp, slb->esid, slb->vsid); in cxl_load_segment() 78 sste->vsid_data = cpu_to_be64(slb->vsid); in cxl_load_segment() 283 static u64 next_segment(u64 ea, u64 vsid) in next_segment() argument 285 if (vsid & SLB_VSID_B_1T) in next_segment() 304 ea = next_segment(ea, slb.vsid)) { in cxl_prefault_vma()
|
H A D | main.c | 110 unsigned long vsid; in cxl_alloc_sst() local 125 vsid = get_kernel_vsid((u64)ctx->sstp, mmu_kernel_ssize) << 12; in cxl_alloc_sst() 142 sstp0 |= vsid >> (50-14); /* Top 14 bits of VSID */ in cxl_alloc_sst() 143 sstp1 |= (vsid << (64-(50-14))) & ~ea_mask; in cxl_alloc_sst() 148 (u64)ctx->sstp, (u64)ctx->sstp & ESID_MASK, mmu_kernel_ssize, vsid, sstp0, sstp1); in cxl_alloc_sst()
|
/openbmc/qemu/hw/ppc/ |
H A D | spapr_vhyp_mmu.c | 460 uint64_t offset, vsid; in rehash_hpte() local 464 vsid = avpn >> 5; in rehash_hpte() 467 offset |= ((vsid ^ pteg) & old_hash_mask) << base_pg_shift; in rehash_hpte() 470 hash = vsid ^ (offset >> base_pg_shift); in rehash_hpte() 472 uint64_t offset, vsid; in rehash_hpte() local 476 vsid = avpn >> 17; in rehash_hpte() 478 offset |= ((vsid ^ (vsid << 25) ^ pteg) & old_hash_mask) in rehash_hpte() 482 hash = vsid ^ (vsid << 25) ^ (offset >> base_pg_shift); in rehash_hpte()
|
/openbmc/linux/arch/microblaze/include/asm/ |
H A D | mmu.h | 20 unsigned long vsid:24; /* Virtual segment identifier */ member 48 unsigned long vsid:24; /* Virtual Segment Identifier */ member
|
/openbmc/linux/arch/powerpc/mm/ptdump/ |
H A D | hashpagetable.c | 210 unsigned long hash, vsid, vpn, hpte_group, want_v, hpte_v; in native_find() local 215 vsid = get_kernel_vsid(ea, ssize); in native_find() 216 vpn = hpt_vpn(ea, vsid, ssize); in native_find() 245 unsigned long vsid, vpn, hash, hpte_group, want_v; in pseries_find() local 251 vsid = get_kernel_vsid(ea, ssize); in pseries_find() 252 vpn = hpt_vpn(ea, vsid, ssize); in pseries_find()
|
/openbmc/linux/arch/powerpc/platforms/pseries/ |
H A D | lpar.c | 1017 unsigned long lpar_rc, slot, vsid, flags; in pSeries_lpar_hpte_updateboltedpp() local 1019 vsid = get_kernel_vsid(ea, ssize); in pSeries_lpar_hpte_updateboltedpp() 1020 vpn = hpt_vpn(ea, vsid, ssize); in pSeries_lpar_hpte_updateboltedpp() 1271 vpn = hpt_vpn(addr, vsid, ssize); in pSeries_lpar_hugepage_invalidate() 1311 unsigned long slot, vsid; in pSeries_lpar_hpte_removebolted() local 1313 vsid = get_kernel_vsid(ea, ssize); in pSeries_lpar_hpte_removebolted() 1314 vpn = hpt_vpn(ea, vsid, ssize); in pSeries_lpar_hpte_removebolted() 1951 if (vsid >= vsid_modulus) in vsid_unscramble() 1961 max_mod_inv = 0x7fffffffffffffffull / vsid; in vsid_unscramble() 1963 return (vsid * modinv) % vsid_modulus; in vsid_unscramble() [all …]
|
/openbmc/linux/arch/powerpc/include/asm/ |
H A D | copro.h | 13 u64 esid, vsid; member
|