Lines Matching refs:res_idx
302 #define CCIO_SEARCH_LOOP(ioc, res_idx, mask, size) \
306 res_idx = (unsigned int)((unsigned long)res_ptr - (unsigned long)ioc->res_map); \
307 ioc->res_hint = res_idx + (size >> 3); \
312 #define CCIO_FIND_FREE_MAPPING(ioa, res_idx, mask, size) \
315 CCIO_SEARCH_LOOP(ioc, res_idx, mask, size); \
317 CCIO_SEARCH_LOOP(ioa, res_idx, mask, size);
346 unsigned int res_idx;
368 CCIO_FIND_FREE_MAPPING(ioc, res_idx, 0xff, 8);
370 CCIO_FIND_FREE_MAPPING(ioc, res_idx, 0xffff, 16);
372 CCIO_FIND_FREE_MAPPING(ioc, res_idx, ~(unsigned int)0, 32);
375 CCIO_FIND_FREE_MAPPING(ioc, res_idx, ~0UL, 64);
387 DBG_RES("%s() res_idx %d res_hint: %d\n",
388 __FUNCTION__, res_idx, ioc->res_hint);
406 return res_idx << 3;
409 #define CCIO_FREE_MAPPINGS(ioc, res_idx, mask, size) \
410 u##size *res_ptr = (u##size *)&((ioc)->res_map[res_idx]); \
427 unsigned int res_idx = PDIR_INDEX(iovp) >> 3;
433 DBG_RES("%s(): res_idx: %d pages_mapped %d\n",
434 __FUNCTION__, res_idx, pages_mapped);
441 CCIO_FREE_MAPPINGS(ioc, res_idx, 0xff, 8);
443 CCIO_FREE_MAPPINGS(ioc, res_idx, 0xffff, 16);
445 CCIO_FREE_MAPPINGS(ioc, res_idx, ~(unsigned int)0, 32);
448 CCIO_FREE_MAPPINGS(ioc, res_idx, ~0UL, 64);