Lines Matching refs:ea

1219 static int subpage_protection(struct mm_struct *mm, unsigned long ea)  in subpage_protection()  argument
1228 if (ea >= spt->maxaddr) in subpage_protection()
1230 if (ea < 0x100000000UL) { in subpage_protection()
1234 sbpm = spt->protptrs[ea >> SBP_L3_SHIFT]; in subpage_protection()
1238 sbpp = sbpm[(ea >> SBP_L2_SHIFT) & (SBP_L2_COUNT - 1)]; in subpage_protection()
1241 spp = sbpp[(ea >> PAGE_SHIFT) & (SBP_L1_COUNT - 1)]; in subpage_protection()
1244 spp >>= 30 - 2 * ((ea >> 12) & 0xf); in subpage_protection()
1257 static inline int subpage_protection(struct mm_struct *mm, unsigned long ea) in subpage_protection() argument
1263 void hash_failure_debug(unsigned long ea, unsigned long access, in hash_failure_debug() argument
1270 ea, access, current->comm); in hash_failure_debug()
1275 static void check_paca_psize(unsigned long ea, struct mm_struct *mm, in check_paca_psize() argument
1279 if (psize != get_paca_psize(ea)) { in check_paca_psize()
1298 int hash_page_mm(struct mm_struct *mm, unsigned long ea, in hash_page_mm() argument
1311 ea, access, trap); in hash_page_mm()
1312 trace_hash_fault(ea, access, trap); in hash_page_mm()
1315 switch (get_region_id(ea)) { in hash_page_mm()
1323 psize = get_slice_psize(mm, ea); in hash_page_mm()
1324 ssize = user_segment_size(ea); in hash_page_mm()
1325 vsid = get_user_vsid(&mm->context, ea, ssize); in hash_page_mm()
1328 vsid = get_kernel_vsid(ea, mmu_kernel_ssize); in hash_page_mm()
1335 vsid = get_kernel_vsid(ea, mmu_kernel_ssize); in hash_page_mm()
1377 ea &= ~((1ul << mmu_psize_defs[psize].shift) - 1); in hash_page_mm()
1381 ptep = find_linux_pte(pgdir, ea, &is_thp, &hugeshift); in hash_page_mm()
1410 rc = __hash_page_thp(ea, access, vsid, (pmd_t *)ptep, in hash_page_mm()
1414 rc = __hash_page_huge(ea, access, vsid, ptep, trap, in hash_page_mm()
1427 check_paca_psize(ea, mm, psize, user_region); in hash_page_mm()
1442 demote_segment_4k(mm, ea); in hash_page_mm()
1452 demote_segment_4k(mm, ea); in hash_page_mm()
1454 } else if (ea < VMALLOC_END) { in hash_page_mm()
1471 check_paca_psize(ea, mm, psize, user_region); in hash_page_mm()
1475 rc = __hash_page_64K(ea, access, vsid, ptep, trap, in hash_page_mm()
1480 int spp = subpage_protection(mm, ea); in hash_page_mm()
1484 rc = __hash_page_4K(ea, access, vsid, ptep, trap, in hash_page_mm()
1493 hash_failure_debug(ea, access, vsid, trap, ssize, psize, in hash_page_mm()
1508 int hash_page(unsigned long ea, unsigned long access, unsigned long trap, in hash_page() argument
1514 if ((get_region_id(ea) == VMALLOC_REGION_ID) || in hash_page()
1515 (get_region_id(ea) == IO_REGION_ID)) in hash_page()
1521 return hash_page_mm(mm, ea, access, trap, flags); in hash_page()
1528 unsigned long ea = regs->dar; in DEFINE_INTERRUPT_HANDLER() local
1541 region_id = get_region_id(ea); in DEFINE_INTERRUPT_HANDLER()
1567 err = hash_page_mm(mm, ea, access, TRAP(regs), flags); in DEFINE_INTERRUPT_HANDLER()
1572 _exception(SIGSEGV, regs, SEGV_ACCERR, ea); in DEFINE_INTERRUPT_HANDLER()
1574 _exception(SIGBUS, regs, BUS_ADRERR, ea); in DEFINE_INTERRUPT_HANDLER()
1615 static bool should_hash_preload(struct mm_struct *mm, unsigned long ea) in should_hash_preload() argument
1617 int psize = get_slice_psize(mm, ea); in should_hash_preload()
1626 if (unlikely((psize == MMU_PAGE_4K) && subpage_protection(mm, ea))) in should_hash_preload()
1632 static bool should_hash_preload(struct mm_struct *mm, unsigned long ea) in should_hash_preload() argument
1638 static void hash_preload(struct mm_struct *mm, pte_t *ptep, unsigned long ea, in hash_preload() argument
1647 BUG_ON(get_region_id(ea) != USER_REGION_ID); in hash_preload()
1649 if (!should_hash_preload(mm, ea)) in hash_preload()
1653 " trap=%lx\n", mm, mm->pgd, ea, access, trap); in hash_preload()
1661 ssize = user_segment_size(ea); in hash_preload()
1662 vsid = get_user_vsid(&mm->context, ea, ssize); in hash_preload()
1708 rc = __hash_page_64K(ea, access, vsid, ptep, trap, in hash_preload()
1712 rc = __hash_page_4K(ea, access, vsid, ptep, trap, update_flags, in hash_preload()
1713 ssize, subpage_protection(mm, ea)); in hash_preload()
1719 hash_failure_debug(ea, access, vsid, trap, ssize, in hash_preload()