/freebsd/contrib/ofed/libmlx5/ |
H A D | dbrec.c | 51 struct mlx5_db_page *page; in __add_page() local 60 page = malloc(sizeof *page + nlong * sizeof(long)); in __add_page() 61 if (!page) in __add_page() 64 if (mlx5_alloc_buf(&page->buf, ps, ps)) { in __add_page() 65 free(page); in __add_page() 69 page->num_db = pp; in __add_page() 70 page->use_cnt = 0; in __add_page() 72 page->free[i] = ~0; in __add_page() 74 page->prev = NULL; in __add_page() 75 page->next = context->db_list; in __add_page() [all …]
|
/freebsd/contrib/ofed/libmlx4/ |
H A D | dbrec.c | 57 struct mlx4_db_page *page; in __add_page() local 64 page = malloc(sizeof *page + pp / 8); in __add_page() 65 if (!page) in __add_page() 68 if (mlx4_alloc_buf(&page->buf, ps, ps)) { in __add_page() 69 free(page); in __add_page() 73 page->num_db = pp; in __add_page() 74 page->use_cnt = 0; in __add_page() 76 page->free[i] = ~0; in __add_page() 78 page->prev = NULL; in __add_page() 79 page->next = context->db_list[type]; in __add_page() [all …]
|
/freebsd/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_mlock.c | 58 static long page = 0; variable 71 buf = malloc(page); in ATF_TC_BODY() 74 if (page < 1024) in ATF_TC_BODY() 77 for (size_t i = page; i >= 1; i = i - 1024) { in ATF_TC_BODY() 78 (void)mlock(buf, page - i); in ATF_TC_BODY() 79 (void)munlock(buf, page - i); in ATF_TC_BODY() 121 ATF_REQUIRE_ERRNO(ENOMEM, mlock(NULL, page) == -1); in ATF_TC_BODY() 125 ATF_REQUIRE_ERRNO(ENOMEM, mlock((char *)0, page) == -1); in ATF_TC_BODY() 128 ATF_REQUIRE_ERRNO(ENOMEM, munlock(NULL, page) == -1); in ATF_TC_BODY() 131 ATF_REQUIRE_ERRNO(ENOMEM, munlock((char *)0, page) == -1); in ATF_TC_BODY() [all …]
|
H A D | t_mincore.c | 78 static long page = 0; variable 91 ATF_REQUIRE(mincore(addr, npgs * page, vec) == 0); in check_residency() 100 (char *)addr + (i * page), vec[i] ? "" : "not "); in check_residency() 119 map = mmap(NULL, page, PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); in ATF_TC_BODY() 120 vec = malloc(page); in ATF_TC_BODY() 131 ATF_REQUIRE_ERRNO(ENOMEM, mincore(0, page, vec) == -1); in ATF_TC_BODY() 134 ATF_REQUIRE_ERRNO(EFAULT, mincore(map, page, (void *)-1) == -1); in ATF_TC_BODY() 137 ATF_REQUIRE(munmap(map, page) == 0); in ATF_TC_BODY() 167 buf = malloc(page * 5); in ATF_TC_BODY() 172 rv = write(fd, buf, page * 5); in ATF_TC_BODY() [all …]
|
H A D | t_minherit.c | 47 static long page; variable 51 void *map = mmap(NULL, page, PROT_READ|PROT_WRITE, in makemap() 54 memset(map, v, page); in makemap() 56 ATF_REQUIRE(minherit(map, page, f) == 0); in makemap() 58 ATF_REQUIRE(minherit(map, page, f) == -1); in makemap() 76 ATF_REQUIRE(memcmp(map1, map2, page) == 0); in ATF_TC_BODY() 82 ATF_REQUIRE(memcmp(map1, map2, page) == 0); in ATF_TC_BODY() 83 memset(map1, 0, page); in ATF_TC_BODY() 103 memset(map2, 0, page); in ATF_TC_BODY() 104 ATF_REQUIRE(memcmp(map1, map2, page) == 0); in ATF_TC_BODY() [all …]
|
H A D | t_mmap.c | 81 static long page = 0; variable 99 ATF_REQUIRE(munmap(map, page) == 0); in map_check() 133 nwritten = write(fds[0], (char *)vp + page, BUFSIZE - page); in testloan() 141 nread = read(fds[1], buf + page, BUFSIZE - page); in testloan() 149 if (docheck != 0 && memcmp(backup, buf + page, nread) != 0) in testloan() 227 map = mmap(&addr, page, PROT_READ, MAP_FIXED|MAP_PRIVATE, -1, 0); in ATF_TC_BODY() 233 map = mmap(NULL, page, PROT_READ, MAP_ANON|MAP_PRIVATE, INT_MAX, 0); in ATF_TC_BODY() 342 map = mmap(NULL, page, PROT_NONE, MAP_ANON|MAP_PRIVATE, -1, 0); in ATF_TC_BODY() 357 ATF_REQUIRE(munmap(map, page) == 0); in ATF_TC_BODY() 444 ATF_REQUIRE(ftruncate(fd, page) == 0); in ATF_TC_BODY() [all …]
|
H A D | t_msync.c | 44 static long page = 0; variable 62 buf = malloc(page); in msync_sync() 67 memset(buf, 'x', page); in msync_sync() 76 ATF_REQUIRE_MSG(write(fd, buf, page) != -1, "write(2) failed: %s", in msync_sync() 79 map = mmap(NULL, page, PROT_READ | PROT_WRITE, MAP_FILE|MAP_PRIVATE, in msync_sync() 108 if (msync(map, page, flags) != 0) { in msync_sync() 125 (void)munmap(map, page); in msync_sync() 175 map = mmap(NULL, page, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, in ATF_TC_BODY() 179 (void)munmap(map, page); in ATF_TC_BODY() 181 ATF_REQUIRE(msync(map, page, MS_SYNC) != 0); in ATF_TC_BODY() [all …]
|
H A D | t_mprotect.c | 51 static long page = 0; variable 128 map = mmap(NULL, page, prot[i], MAP_SHARED, fd, 0); in ATF_TC_BODY() 135 ATF_REQUIRE(mprotect(map, page, PROT_WRITE) != 0); in ATF_TC_BODY() 137 ATF_REQUIRE(munmap(map, page) == 0); in ATF_TC_BODY() 209 map = mmap(NULL, page, PROT_WRITE|PROT_READ, MAP_ANON, -1, 0); in ATF_TC_BODY() 216 ATF_REQUIRE(mprotect(map, page, PROT_EXEC|PROT_READ) == 0); in ATF_TC_BODY() 220 ATF_REQUIRE(mprotect(map, page, PROT_READ) == 0); in ATF_TC_BODY() 233 ATF_REQUIRE(munmap(map, page) == 0); in ATF_TC_BODY() 293 map = mmap(NULL, page, prot[i], MAP_ANON, -1, 0); in ATF_TC_BODY() 300 (void)munmap(map, page); in ATF_TC_BODY() [all …]
|
/freebsd/sys/compat/linuxkpi/common/include/linux/ |
H A D | highmem.h | 47 #include <linux/page.h> 51 static inline struct page * in kmap_to_page() 59 kmap(struct page *page) in kmap() 64 return ((void *)PHYS_TO_DMAP(page_to_phys(page))); in kmap() 67 sf = sf_buf_alloc(page, SFB_NOWAIT | SFB_CPUPRIVATE); in kmap() 77 kmap_atomic_prot(struct page *page, pgprot_t prot) in kmap_atomic_prot() 82 vm_page_lock(page); in kmap_atomic_prot() 83 page in kmap_atomic_prot() 58 kmap(struct page * page) kmap() argument 76 kmap_atomic_prot(struct page * page,pgprot_t prot) kmap_atomic_prot() argument 90 kmap_atomic(struct page * page) kmap_atomic() argument 97 kmap_local_page_prot(struct page * page,pgprot_t prot) kmap_local_page_prot() argument 104 kunmap(struct page * page) kunmap() argument [all...] |
H A D | mm.h | 138 struct page *page; member 157 static inline struct page * 187 void *linux_page_address(struct page *); 188 #define page_address(page) linux_page_address(page) argument 191 lowmem_page_address(struct page *page) in lowmem_page_address() argument 193 return (page_address(page)); in lowmem_page_address() 261 set_page_dirty(struct page *page) in set_page_dirty() argument 263 vm_page_dirty(page); in set_page_dirty() 267 mark_page_accessed(struct page *page) in mark_page_accessed() argument 269 vm_page_reference(page); in mark_page_accessed() [all …]
|
H A D | gfp.h | 90 struct page *linux_alloc_pages(gfp_t flags, unsigned int order); 91 void linux_free_pages(struct page *page, unsigned int order); 94 void linuxkpi__page_frag_cache_drain(struct page *, size_t); 96 static inline struct page * 103 static inline struct page * 110 static inline struct page * 118 __free_pages(struct page *page, unsigned int order) in __free_pages() argument 121 linux_free_pages(page, order); in __free_pages() 125 __free_page(struct page *page) in __free_page() argument 128 linux_free_pages(page, 0); in __free_page() [all …]
|
/freebsd/sys/compat/linuxkpi/common/src/ |
H A D | linux_page.c | 86 linux_page_address(struct page *page) in linux_page_address() argument 89 if (page->object != kernel_object) { in linux_page_address() 91 ((void *)(uintptr_t)PHYS_TO_DMAP(page_to_phys(page))) : in linux_page_address() 95 IDX_TO_OFF(page->pindex))); in linux_page_address() 98 struct page * 101 struct page *page; in linux_alloc_pages() local 110 page = vm_page_alloc_noobj(req); in linux_alloc_pages() 111 if (page == NULL) in linux_alloc_pages() 117 page = vm_page_alloc_noobj_contig(req, npages, 0, pmax, in linux_alloc_pages() 119 if (page == NULL) { in linux_alloc_pages() [all …]
|
/freebsd/contrib/mandoc/ |
H A D | dba.c | 85 struct dba_array *page; in dba_free() local 102 dba_array_FOREACH(dba->pages, page) { in dba_free() 103 dba_array_free(dba_array_get(page, DBP_NAME)); in dba_free() 104 dba_array_free(dba_array_get(page, DBP_SECT)); in dba_free() 105 dba_array_free(dba_array_get(page, DBP_ARCH)); in dba_free() 106 free(dba_array_get(page, DBP_DESC)); in dba_free() 107 dba_array_free(dba_array_get(page, DBP_FILE)); in dba_free() 108 dba_array_free(page); in dba_free() 161 struct dba_array *page, *entry; in dba_page_new() local 163 page = dba_array_new(DBP_MAX, 0); in dba_page_new() [all …]
|
H A D | mansearch.c | 92 struct dbm_page *page; in mansearch() local 170 page = dbm_page_get(rp->page); in mansearch() 172 if (lstmatch(search->sec, page->sect) == 0 || in mansearch() 173 lstmatch(search->arch, page->arch) == 0 || in mansearch() 189 paths->paths[i], page->file + 1); in mansearch() 190 if (access(chdir_status ? page->file + 1 : in mansearch() 195 page->file + 1, paths->paths[i]); in mansearch() 200 mpage->names = buildnames(page); in mansearch() 201 mpage->output = buildoutput(outkey, page); in mansearch() 204 mpage->sec = *page->sect - '0'; in mansearch() [all …]
|
/freebsd/sys/dev/mthca/ |
H A D | mthca_memfree.c | 60 } page[0]; member 108 struct page *page; in mthca_alloc_icm_pages() local 114 page = alloc_pages(gfp_mask | __GFP_ZERO, order); in mthca_alloc_icm_pages() 115 if (!page) in mthca_alloc_icm_pages() 118 sg_set_page(mem, page, PAGE_SIZE << order, 0); in mthca_alloc_icm_pages() 282 struct page *page = NULL; in mthca_table_find() local 308 page = sg_page(&chunk->mem[i]); in mthca_table_find() 317 return page ? lowmem_page_address(page) + offset : NULL; in mthca_table_find() 438 static u64 mthca_uarc_virt(struct mthca_dev *dev, struct mthca_uar *uar, int page) in mthca_uarc_virt() argument 442 page * MTHCA_ICM_PAGE_SIZE; in mthca_uarc_virt() [all …]
|
/freebsd/sys/dev/mlx4/mlx4_ib/ |
H A D | mlx4_ib_doorbell.c | 47 struct mlx4_ib_user_db_page *page; in mlx4_ib_db_map_user() local 52 list_for_each_entry(page, &context->db_page_list, list) in mlx4_ib_db_map_user() 53 if (page->user_virt == (virt & PAGE_MASK)) in mlx4_ib_db_map_user() 56 page = kmalloc(sizeof *page, GFP_KERNEL); in mlx4_ib_db_map_user() 57 if (!page) { in mlx4_ib_db_map_user() 62 page->user_virt = (virt & PAGE_MASK); in mlx4_ib_db_map_user() 63 page->refcnt = 0; in mlx4_ib_db_map_user() 64 page->umem = ib_umem_get(&context->ibucontext, virt & PAGE_MASK, in mlx4_ib_db_map_user() 66 if (IS_ERR(page->umem)) { in mlx4_ib_db_map_user() 67 err = PTR_ERR(page->umem); in mlx4_ib_db_map_user() [all …]
|
/freebsd/sys/dev/mlx5/mlx5_ib/ |
H A D | mlx5_ib_doorbell.c | 45 struct mlx5_ib_user_db_page *page; in mlx5_ib_db_map_user() local 50 list_for_each_entry(page, &context->db_page_list, list) in mlx5_ib_db_map_user() 51 if (page->user_virt == (virt & PAGE_MASK)) in mlx5_ib_db_map_user() 54 page = kmalloc(sizeof(*page), GFP_KERNEL); in mlx5_ib_db_map_user() 55 if (!page) { in mlx5_ib_db_map_user() 60 page->user_virt = (virt & PAGE_MASK); in mlx5_ib_db_map_user() 61 page->refcnt = 0; in mlx5_ib_db_map_user() 62 page->umem = ib_umem_get(&context->ibucontext, virt & PAGE_MASK, in mlx5_ib_db_map_user() 64 if (IS_ERR(page->umem)) { in mlx5_ib_db_map_user() 65 err = PTR_ERR(page->umem); in mlx5_ib_db_map_user() [all …]
|
/freebsd/sys/compat/linuxkpi/common/include/asm/ |
H A D | set_memory.h | 32 #include <linux/page.h> 66 set_pages_uc(struct page *page, int numpages) in set_memory_wb() 70 pmap_page_set_memattr(page, VM_MEMATTR_UNCACHEABLE); in set_memory_wb() 75 set_pages_wc(struct page *page, int numpages) in set_pages_uc() argument 80 pmap_page_set_memattr(page, VM_MEMATTR_WRITE_COMBINING); in set_pages_uc() 82 return (set_pages_uc(page, numpages)); 88 set_pages_wb(struct page *page, in in set_pages_wc() 84 set_pages_wc(struct page * page,int numpages) set_pages_wc() argument 97 set_pages_wb(struct page * page,int numpages) set_pages_wb() argument [all...] |
/freebsd/sys/contrib/openzfs/module/os/linux/zfs/ |
H A D | abd_os.c | 188 struct page; 195 static struct page *abd_zero_page = NULL; 237 abd_mark_zfs_page(struct page *page) in abd_mark_zfs_page() argument 239 get_page(page); in abd_mark_zfs_page() 240 SetPagePrivate(page); in abd_mark_zfs_page() 241 set_page_private(page, ABD_FILE_CACHE_PAGE); in abd_mark_zfs_page() 245 abd_unmark_zfs_page(struct page *page) in abd_unmark_zfs_page() argument 247 set_page_private(page, 0UL); in abd_unmark_zfs_page() 248 ClearPagePrivate(page); in abd_unmark_zfs_page() 249 put_page(page); in abd_unmark_zfs_page() [all …]
|
/freebsd/sys/contrib/openzfs/include/os/linux/kernel/linux/ |
H A D | kmap_compat.h | 34 #define zfs_kmap_local(page) kmap_local_page(page) argument 38 #define zfs_kmap_local(page) kmap_atomic(page) argument 41 #define zfs_kmap(page) kmap(page) argument 42 #define zfs_kunmap(page) kunmap(page) argument
|
/freebsd/sbin/camcontrol/ |
H A D | modeedit.c | 81 int page; member 105 int cdb_len, int dbd, int pc, int page, int subpage, 108 int cdb_len, int llbaa, int pc, int page, 112 int dbd, int pc, int page, int subpage, 115 int llbaa, int pc, int page, int subpage, 117 static void nameentry_create(int page, int subpage, char *name); 118 static struct pagename *nameentry_lookup(int page, int subpage); 125 int dbd, int pc, int page, int subpage, 128 int cdb_len, int llbaa, int pc, int page, 368 nameentry_create(int page, int subpage, char *name) { in nameentry_create() argument [all …]
|
/freebsd/lib/libc/db/btree/ |
H A D | bt_seq.c | 79 /* Toss any page pinned across calls. */ in __bt_seq() 88 * the page the cursor references if they're successful. in __bt_seq() 109 __bt_setcur(t, e.page->pgno, e.index); in __bt_seq() 116 * key/data, toss the page. in __bt_seq() 119 mpool_put(t->bt_mp, e.page, 0); in __bt_seq() 121 t->bt_pinned = e.page; in __bt_seq() 137 * Pins the page the cursor references. 183 ep->page = h; in __bt_seqset() 205 ep->page = h; in __bt_seqset() 221 * Pins the page th [all...] |
/freebsd/contrib/netbsd-tests/lib/libc/string/ |
H A D | t_memset.c | 41 static long page = 0; variable 92 buf = malloc(page); in ATF_TC_BODY() 93 ret = malloc(page); in ATF_TC_BODY() 98 fill(ret, page, 0); in ATF_TC_BODY() 99 memset(buf, 0, page); in ATF_TC_BODY() 101 ATF_REQUIRE(memcmp(ret, buf, page) == 0); in ATF_TC_BODY() 103 fill(ret, page, 'x'); in ATF_TC_BODY() 104 memset(buf, 'x', page); in ATF_TC_BODY() 106 ATF_REQUIRE(memcmp(ret, buf, page) == 0); in ATF_TC_BODY() 124 buf = malloc(page); in ATF_TC_BODY() [all …]
|
/freebsd/contrib/llvm-project/lld/MachO/ |
H A D | UnwindInfoSection.cpp | 566 SecondLevelPage &page = secondLevelPages.back(); in finalize() local 567 page.entryIndex = i; in finalize() 581 page.localEncodingIndexes.count(cuPtr->encoding)) { in finalize() 585 page.localEncodings.emplace_back(cuPtr->encoding); in finalize() 586 page.localEncodingIndexes[cuPtr->encoding] = n++; in finalize() 593 page.entryCount = i - page.entryIndex; in finalize() 599 page.entryCount < REGULAR_SECOND_LEVEL_ENTRIES_MAX) { in finalize() 600 page.kind = UNWIND_SECOND_LEVEL_REGULAR; in finalize() 601 page.entryCount = std::min(REGULAR_SECOND_LEVEL_ENTRIES_MAX, in finalize() 602 cuIndices.size() - page.entryIndex); in finalize() [all …]
|
/freebsd/sys/dev/mpr/ |
H A D | mpr_config.c | 76 MPI2_CONFIG_PAGE_IOC_8 *page = NULL; in mpr_config_get_ioc_pg8() local 148 page = malloc((cm->cm_length), M_MPR, M_ZERO | M_NOWAIT); in mpr_config_get_ioc_pg8() 149 if (!page) { in mpr_config_get_ioc_pg8() 154 cm->cm_data = page; in mpr_config_get_ioc_pg8() 183 bcopy(page, config_page, MIN(cm->cm_length, (sizeof(Mpi2IOCPage8_t)))); in mpr_config_get_ioc_pg8() 186 free(page, M_MPR); in mpr_config_get_ioc_pg8() 208 MPI2_CONFIG_PAGE_IO_UNIT_8 *page = NULL; in mpr_config_get_iounit_pg8() local 280 page = malloc((cm->cm_length), M_MPR, M_ZERO | M_NOWAIT); in mpr_config_get_iounit_pg8() 281 if (!page) { in mpr_config_get_iounit_pg8() 286 cm->cm_data = page; in mpr_config_get_iounit_pg8() [all …]
|