Lines Matching refs:res_ptr

457 static unsigned long ptr_to_pide(struct ioc *ioc, unsigned long *res_ptr,  in ptr_to_pide()  argument
460 return (((unsigned long)res_ptr - (unsigned long)ioc->res_map) << 3) in ptr_to_pide()
478 unsigned long *res_ptr; in sba_search_bitmap() local
486 ASSERT(res_ptr < res_end); in sba_search_bitmap()
498 res_ptr = ioc->res_hint; in sba_search_bitmap()
500 res_ptr = (ulong *)ioc->res_map; in sba_search_bitmap()
514 for(; res_ptr < res_end ; res_ptr++) { in sba_search_bitmap()
515 if (likely(*res_ptr != ~0UL)) { in sba_search_bitmap()
516 bitshiftcnt = ffz(*res_ptr); in sba_search_bitmap()
517 *res_ptr |= (1UL << bitshiftcnt); in sba_search_bitmap()
518 pide = ptr_to_pide(ioc, res_ptr, bitshiftcnt); in sba_search_bitmap()
541 DBG_RES("%s() o %ld %p", __func__, o, res_ptr); in sba_search_bitmap()
542 for(; res_ptr < res_end ; res_ptr++) in sba_search_bitmap()
544 DBG_RES(" %p %lx %lx\n", res_ptr, mask, *res_ptr); in sba_search_bitmap()
547 tpide = ptr_to_pide(ioc, res_ptr, bitshiftcnt); in sba_search_bitmap()
551 if ((0 == ((*res_ptr) & mask)) && !ret) { in sba_search_bitmap()
552 *res_ptr |= mask; /* mark resources busy! */ in sba_search_bitmap()
573 for (; res_ptr < end; res_ptr++) { in sba_search_bitmap()
574 tpide = ptr_to_pide(ioc, res_ptr, 0); in sba_search_bitmap()
580 if (res_ptr[i] != 0) in sba_search_bitmap()
583 if (bits && res_ptr[i] && (__ffs(res_ptr[i]) < bits)) in sba_search_bitmap()
588 res_ptr[i] = ~0UL; in sba_search_bitmap()
589 res_ptr[i] |= RESMAP_MASK(bits); in sba_search_bitmap()
592 res_ptr += qwords; in sba_search_bitmap()
608 ioc->res_hint = res_ptr; in sba_search_bitmap()
726 unsigned long *res_ptr = (unsigned long *) &((ioc)->res_map[ridx & ~RESMAP_IDX_MASK]); in sba_free_range() local
732 for (; bits_not_wanted > 0 ; res_ptr++) { in sba_free_range()
737 *res_ptr = 0UL; in sba_free_range()
748 bits_not_wanted, m, pide, res_ptr, *res_ptr); in sba_free_range()
752 ASSERT((*res_ptr & m) == m); /* verify same bits are set */ in sba_free_range()
753 *res_ptr &= ~m; in sba_free_range()
1872 unsigned long *res_ptr = (unsigned long *)ioc->res_map; in ioc_show() local
1884 for (i = 0; i < (ioc->res_size / sizeof(unsigned long)); ++i, ++res_ptr) in ioc_show()
1885 used += hweight64(*res_ptr); in ioc_show()