Lines Matching refs:addr
359 boot_mapin(caddr_t addr, size_t size) in boot_mapin() argument
368 for (eaddr = addr + size; addr < eaddr; addr += PAGESIZE) { in boot_mapin()
369 pfnum = va_to_pfn(addr); in boot_mapin()
397 (void) page_hashin(pp, &kvp, (u_offset_t)(uintptr_t)addr, NULL); in boot_mapin()
414 caddr_t addr = inaddr; in boot_alloc() local
422 if (bop_alloc_chunk(addr, size, align) != (caddr_t)addr) in boot_alloc()
425 if (BOP_ALLOC(bootops, addr, size, align) != addr) in boot_alloc()
428 boot_mapin((caddr_t)addr, size); in boot_alloc()
429 return (addr); in boot_alloc()
442 segkmem_fault(struct hat *hat, struct seg *seg, caddr_t addr, size_t size, in segkmem_fault() argument
453 addr < seg->s_base || addr + size > seg->s_base + seg->s_size) in segkmem_fault()
460 BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base)))) in segkmem_fault()
461 return (SEGOP_FAULT(hat, segkp, addr, size, type, rw)); in segkmem_fault()
471 pp = page_lookup(vp, (u_offset_t)(uintptr_t)addr, in segkmem_fault()
478 if (!hat_probe(kas.a_hat, addr)) { in segkmem_fault()
479 addr -= PAGESIZE; in segkmem_fault()
482 (uintptr_t)addr); in segkmem_fault()
485 addr -= PAGESIZE; in segkmem_fault()
490 addr += PAGESIZE; in segkmem_fault()
493 hat_reserve(seg->s_as, addr, size); in segkmem_fault()
497 pp = page_find(vp, (u_offset_t)(uintptr_t)addr); in segkmem_fault()
500 addr += PAGESIZE; in segkmem_fault()
510 segkmem_setprot(struct seg *seg, caddr_t addr, size_t size, uint_t prot) in segkmem_setprot() argument
515 addr < seg->s_base || addr + size > seg->s_base + seg->s_size) in segkmem_setprot()
522 BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base)))) in segkmem_setprot()
523 return (SEGOP_SETPROT(segkp, addr, size, prot)); in segkmem_setprot()
526 hat_unload(kas.a_hat, addr, size, HAT_UNLOAD); in segkmem_setprot()
528 hat_chgprot(kas.a_hat, addr, size, prot); in segkmem_setprot()
538 segkmem_checkprot(struct seg *seg, caddr_t addr, size_t size, uint_t prot) in segkmem_checkprot() argument
549 BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base)))) in segkmem_checkprot()
550 return (SEGOP_CHECKPROT(segkp, addr, size, prot)); in segkmem_checkprot()
562 segkmem_kluster(struct seg *seg, caddr_t addr, ssize_t delta) in segkmem_kluster() argument
573 BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base)))) in segkmem_kluster()
574 return (SEGOP_KLUSTER(segkp, addr, delta)); in segkmem_kluster()
584 caddr_t addr = start; in segkmem_xdump_range() local
585 caddr_t addr_end = addr + size; in segkmem_xdump_range()
587 while (addr < addr_end) { in segkmem_xdump_range()
588 pfn_t pfn = hat_getpfnum(kas.a_hat, addr); in segkmem_xdump_range()
590 dump_addpage(as, addr, pfn); in segkmem_xdump_range()
591 addr += PAGESIZE; in segkmem_xdump_range()
599 caddr_t addr = start; in segkmem_dump_range() local
600 caddr_t addr_end = addr + size; in segkmem_dump_range()
608 addr == heap_lp_base && addr_end == heap_lp_end && in segkmem_dump_range()
679 segkmem_pagelock(struct seg *seg, caddr_t addr, size_t len, in segkmem_pagelock() argument
694 BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base)))) in segkmem_pagelock()
695 return (SEGOP_PAGELOCK(segkp, addr, len, ppp, type, rw)); in segkmem_pagelock()
721 pp = page_lookup(vp, (u_offset_t)(uintptr_t)addr, SE_SHARED); in segkmem_pagelock()
730 addr += PAGESIZE; in segkmem_pagelock()
743 segkmem_getmemid(struct seg *seg, caddr_t addr, memid_t *memidp) in segkmem_getmemid() argument
754 BT_TEST(segkp_bitmap, btop((uintptr_t)(addr - seg->s_base)))) in segkmem_getmemid()
755 return (SEGOP_GETMEMID(segkp, addr, memidp)); in segkmem_getmemid()
763 segkmem_getpolicy(struct seg *seg, caddr_t addr) in segkmem_getpolicy() argument
826 segkmem_page_create(void *addr, size_t size, int vmflag, void *arg) in segkmem_page_create() argument
851 return (page_create_va(vp, (u_offset_t)(uintptr_t)addr, size, in segkmem_page_create()
852 pgflags, &kseg, addr)); in segkmem_page_create()
864 caddr_t addr = inaddr; in segkmem_xalloc() local
868 if (inaddr == NULL && (addr = vmem_alloc(vmp, size, vmflag)) == NULL) in segkmem_xalloc()
871 ASSERT(((uintptr_t)addr & PAGEOFFSET) == 0); in segkmem_xalloc()
875 vmem_free(vmp, addr, size); in segkmem_xalloc()
879 ppl = page_create_func(addr, size, vmflag, pcarg); in segkmem_xalloc()
882 vmem_free(vmp, addr, size); in segkmem_xalloc()
926 return (addr); in segkmem_xalloc()
932 void *addr; in segkmem_alloc_vn() local
956 addr = vmem_alloc(vmp, size, vmflag | VM_PANIC); in segkmem_alloc_vn()
957 if (boot_alloc(addr, size, BO_NO_ALIGN) != addr) in segkmem_alloc_vn()
959 return (addr); in segkmem_alloc_vn()
988 caddr_t addr = inaddr; in segkmem_free_vn() local
992 ASSERT(((uintptr_t)addr & PAGEOFFSET) == 0); in segkmem_free_vn()
1004 hat_unload(kas.a_hat, addr, size, HAT_UNLOAD_UNLOCK); in segkmem_free_vn()
1006 for (eaddr = addr + size; addr < eaddr; addr += PAGESIZE) { in segkmem_free_vn()
1008 pp = page_find(vp, (u_offset_t)(uintptr_t)addr); in segkmem_free_vn()
1017 pp = page_lookup(vp, (u_offset_t)(uintptr_t)addr, in segkmem_free_vn()
1021 pp = page_lookup(vp, (u_offset_t)(uintptr_t)addr, SE_EXCL); in segkmem_free_vn()
1073 segkmem_mapin(struct seg *seg, void *addr, size_t size, uint_t vprot, in segkmem_mapin() argument
1076 hat_unload(seg->s_as->a_hat, addr, size, HAT_UNLOAD_UNLOCK); in segkmem_mapin()
1077 hat_devload(seg->s_as->a_hat, addr, size, pfn, vprot, in segkmem_mapin()
1082 segkmem_mapout(struct seg *seg, void *addr, size_t size) in segkmem_mapout() argument
1084 hat_unload(seg->s_as->a_hat, addr, size, HAT_UNLOAD_UNLOCK); in segkmem_mapout()
1094 kmem_freepages(void *addr, pgcnt_t npages) in kmem_freepages() argument
1096 kmem_free(addr, ptob(npages)); in kmem_freepages()
1105 segkmem_page_create_large(void *addr, size_t size, int vmflag, void *arg) in segkmem_page_create_large() argument
1120 return (page_create_va_large(&kvp, (u_offset_t)(uintptr_t)addr, size, in segkmem_page_create_large()
1121 pgflags, &kvseg, addr, arg)); in segkmem_page_create_large()
1134 caddr_t addr = inaddr, pa; in segkmem_xalloc_lp() local
1158 if (inaddr == NULL && (addr = vmem_alloc(vmp, size, vmflag)) == NULL) in segkmem_xalloc_lp()
1161 ASSERT(((uintptr_t)addr & (lpsize - 1)) == 0); in segkmem_xalloc_lp()
1164 for (pa = addr, i = 0; i < nlpages; i++, pa += lpsize) { in segkmem_xalloc_lp()
1196 return (addr); in segkmem_xalloc_lp()
1210 vmem_free(vmp, addr, size); in segkmem_xalloc_lp()
1222 segkmem_free_one_lp(caddr_t addr, size_t size) in segkmem_free_one_lp() argument
1229 hat_unload(kas.a_hat, addr, size, HAT_UNLOAD_UNLOCK); in segkmem_free_one_lp()
1231 for (; pgs_left > 0; addr += PAGESIZE, pgs_left--) { in segkmem_free_one_lp()
1232 pp = page_lookup(&kvp, (u_offset_t)(uintptr_t)addr, SE_EXCL); in segkmem_free_one_lp()
1271 void *addr = NULL; in segkmem_alloc_lp() local
1347 addr = vmem_alloc(kmem_lp_arena, asize, in segkmem_alloc_lp()
1359 if (addr != NULL) { in segkmem_alloc_lp()
1362 return (addr); in segkmem_alloc_lp()
1398 void *addr; in segkmem_alloc_lpi() local
1409 addr = segkmem_xalloc_lp(vmp, NULL, size, vmflag, 0, in segkmem_alloc_lpi()
1411 return (addr); in segkmem_alloc_lpi()
1424 caddr_t addr = inaddr; in segkmem_free_lpi() local
1429 ASSERT(IS_KMEM_VA_LARGEPAGE(addr)); in segkmem_free_lpi()
1433 segkmem_free_one_lp(addr, lpsize); in segkmem_free_lpi()
1434 addr += lpsize; in segkmem_free_lpi()
1544 void *addr; in segkmem_alloc_ppa() local
1551 addr = vmem_xalloc(vmp, size, ppaquantum, 0, 0, NULL, NULL, vmflag); in segkmem_alloc_ppa()
1552 if (addr != NULL && segkmem_xalloc(vmp, addr, size, vmflag, 0, in segkmem_alloc_ppa()
1554 vmem_xfree(vmp, addr, size); in segkmem_alloc_ppa()
1555 addr = NULL; in segkmem_alloc_ppa()
1558 return (addr); in segkmem_alloc_ppa()
1562 segkmem_free_ppa(vmem_t *vmp, void *addr, size_t size) in segkmem_free_ppa() argument
1566 ASSERT(addr != NULL); in segkmem_free_ppa()
1569 segkmem_free(vmp, addr, size); in segkmem_free_ppa()
1571 segkmem_free(NULL, addr, size); in segkmem_free_ppa()
1572 vmem_xfree(vmp, addr, size); in segkmem_free_ppa()
1583 void *addr; in segkmem_heap_lp_init() local
1633 if ((addr = segkmem_alloc_lpi(heap_lp_arena, in segkmem_heap_lp_init()
1636 addr = vmem_add(kmem_lp_arena, addr, in segkmem_heap_lp_init()
1638 ASSERT(addr != NULL); in segkmem_heap_lp_init()