Lines Matching refs:page_sz
223 long page_sz; in open_db() local
238 if ((page_sz = sysconf(_SC_PAGE_SIZE)) == -1) { in open_db()
272 sz = size_db(hdp, page_sz, count); in open_db()
293 rv = invalid_db(hdp, sz, page_sz); in open_db()
295 rv = init_hdr(hdp, page_sz, count); in open_db()
487 invalid_db(struct di_devlink_handle *hdp, size_t fsize, long page_sz) in invalid_db() argument
497 if (DB_HDR(hdp)->page_sz == 0 || DB_HDR(hdp)->page_sz != page_sz) { in invalid_db()
509 assert(sz % page_sz == 0); in invalid_db()
777 init_hdr(struct di_devlink_handle *hdp, long page_sz, uint32_t *count) in init_hdr() argument
785 DB_HDR(hdp)->page_sz = (uint32_t)page_sz; in init_hdr()
2933 assert(DB_HDR(hdp)->page_sz); in seg_size()
2942 sz = (sz / DB_HDR(hdp)->page_sz) + 1; in seg_size()
2944 sz *= DB_HDR(hdp)->page_sz; in seg_size()
2950 size_db(struct di_devlink_handle *hdp, long page_sz, uint32_t *count) in size_db() argument
2956 assert(page_sz > 0); in size_db()
2969 sz = ((HDR_LEN / page_sz) + 1) * page_sz; in size_db()
2972 sz += (((count[i] * elem_sizes[i]) / page_sz) + 1) * page_sz; in size_db()