Lines Matching +full:2 +full:ppm

8  * General Public License (GPL) Version 2, available from the file
77 * [page selector:2] [sw/free bits] [0] [idx] [color:6]
113 unsigned char pg_idx:2;
120 /* per cpu ppm pool */
124 spinlock_t lock; /* ppm pool lock */
143 spinlock_t map_lock; /* ppm map lock */
153 #define PPOD_PAGES_SHIFT 2 /* 4 pages per pod */
158 /* page pods are allocated in groups of this size (must be power of 2) */
197 static inline int cxgbi_ppm_is_ddp_tag(struct cxgbi_ppm *ppm, u32 tag) in cxgbi_ppm_is_ddp_tag() argument
199 return !(tag & ppm->tformat.no_ddp_mask); in cxgbi_ppm_is_ddp_tag()
202 static inline int cxgbi_ppm_sw_tag_is_usable(struct cxgbi_ppm *ppm, in cxgbi_ppm_sw_tag_is_usable() argument
209 static inline int cxgbi_ppm_make_non_ddp_tag(struct cxgbi_ppm *ppm, in cxgbi_ppm_make_non_ddp_tag() argument
213 struct cxgbi_tag_format *tformat = &ppm->tformat; in cxgbi_ppm_make_non_ddp_tag()
215 if (!cxgbi_ppm_sw_tag_is_usable(ppm, sw_tag)) { in cxgbi_ppm_make_non_ddp_tag()
232 static inline u32 cxgbi_ppm_decode_non_ddp_tag(struct cxgbi_ppm *ppm, in cxgbi_ppm_decode_non_ddp_tag() argument
235 struct cxgbi_tag_format *tformat = &ppm->tformat; in cxgbi_ppm_decode_non_ddp_tag()
243 static inline u32 cxgbi_ppm_ddp_tag_get_idx(struct cxgbi_ppm *ppm, in cxgbi_ppm_ddp_tag_get_idx() argument
247 ppm->tformat.idx_mask; in cxgbi_ppm_ddp_tag_get_idx()
249 return hw_idx - ppm->base_idx; in cxgbi_ppm_ddp_tag_get_idx()
259 cxgbi_ppm_get_tag_caller_data(struct cxgbi_ppm *ppm, in cxgbi_ppm_get_tag_caller_data() argument
262 u32 idx = cxgbi_ppm_ddp_tag_get_idx(ppm, ddp_tag); in cxgbi_ppm_get_tag_caller_data()
264 return ppm->ppod_data[idx].caller_data; in cxgbi_ppm_get_tag_caller_data()
268 static inline int cxgbi_ppm_ddp_tag_update_sw_bits(struct cxgbi_ppm *ppm, in cxgbi_ppm_ddp_tag_update_sw_bits() argument
272 struct cxgbi_tag_format *tformat = &ppm->tformat; in cxgbi_ppm_ddp_tag_update_sw_bits()
280 if (!cxgbi_ppm_is_ddp_tag(ppm, orig_tag)) in cxgbi_ppm_ddp_tag_update_sw_bits()
284 (orig_tag & ppm->tformat.rsvd_mask); in cxgbi_ppm_ddp_tag_update_sw_bits()
298 /* reserve top most 2 bits for page selector */ in cxgbi_tagmask_check()
299 tformat->free_bits = 32 - 2 - bits; in cxgbi_tagmask_check()
314 tformat->pgsz_order[2], tformat->pgsz_order[3]); in cxgbi_tagmask_check()
317 int cxgbi_ppm_find_page_index(struct cxgbi_ppm *ppm, unsigned long pgsz);
318 void cxgbi_ppm_make_ppod_hdr(struct cxgbi_ppm *ppm, u32 tag,
331 int cxgbi_ppm_release(struct cxgbi_ppm *ppm);