Lines Matching defs:res_idx
284 #define CCIO_SEARCH_LOOP(ioc, res_idx, mask, size) \
292 res_idx = idx;\
293 ioc->res_hint = res_idx + (size >> 3); \
298 #define CCIO_FIND_FREE_MAPPING(ioa, res_idx, mask, size) \
301 CCIO_SEARCH_LOOP(ioc, res_idx, mask, size); \
303 CCIO_SEARCH_LOOP(ioa, res_idx, mask, size);
333 unsigned int res_idx;
364 CCIO_FIND_FREE_MAPPING(ioc, res_idx, mask, 8);
366 CCIO_FIND_FREE_MAPPING(ioc, res_idx, 0xff, 8);
369 CCIO_FIND_FREE_MAPPING(ioc, res_idx, 0xffff, 16);
371 CCIO_FIND_FREE_MAPPING(ioc, res_idx, ~(unsigned int)0, 32);
374 CCIO_FIND_FREE_MAPPING(ioc, res_idx, ~0UL, 64);
386 DBG_RES("%s() res_idx %d res_hint: %d\n",
387 __func__, res_idx, ioc->res_hint);
403 return res_idx << 3;
406 #define CCIO_FREE_MAPPINGS(ioc, res_idx, mask, size) \
407 u##size *res_ptr = (u##size *)&((ioc)->res_map[res_idx]); \
424 unsigned int res_idx = PDIR_INDEX(iovp) >> 3;
430 DBG_RES("%s(): res_idx: %d pages_mapped %lu\n",
431 __func__, res_idx, pages_mapped);
441 CCIO_FREE_MAPPINGS(ioc, res_idx, mask, 8);
443 CCIO_FREE_MAPPINGS(ioc, res_idx, 0xffUL, 8);
446 CCIO_FREE_MAPPINGS(ioc, res_idx, 0xffffUL, 16);
448 CCIO_FREE_MAPPINGS(ioc, res_idx, ~(unsigned int)0, 32);
451 CCIO_FREE_MAPPINGS(ioc, res_idx, ~0UL, 64);