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()
497 res_ptr = ioc->res_hint; in sba_search_bitmap()
499 res_ptr = (ulong *)ioc->res_map; in sba_search_bitmap()
513 for(; res_ptr < res_end ; res_ptr++) { in sba_search_bitmap()
514 if (likely(*res_ptr != ~0UL)) { in sba_search_bitmap()
515 bitshiftcnt = ffz(*res_ptr); in sba_search_bitmap()
516 *res_ptr |= (1UL << bitshiftcnt); in sba_search_bitmap()
517 pide = ptr_to_pide(ioc, res_ptr, bitshiftcnt); in sba_search_bitmap()
540 DBG_RES("%s() o %ld %p", __func__, o, res_ptr); in sba_search_bitmap()
541 for(; res_ptr < res_end ; res_ptr++) in sba_search_bitmap()
543 DBG_RES(" %p %lx %lx\n", res_ptr, mask, *res_ptr); in sba_search_bitmap()
546 tpide = ptr_to_pide(ioc, res_ptr, bitshiftcnt); in sba_search_bitmap()
550 if ((0 == ((*res_ptr) & mask)) && !ret) { in sba_search_bitmap()
551 *res_ptr |= mask; /* mark resources busy! */ in sba_search_bitmap()
572 for (; res_ptr < end; res_ptr++) { in sba_search_bitmap()
573 tpide = ptr_to_pide(ioc, res_ptr, 0); in sba_search_bitmap()
579 if (res_ptr[i] != 0) in sba_search_bitmap()
582 if (bits && res_ptr[i] && (__ffs(res_ptr[i]) < bits)) in sba_search_bitmap()
587 res_ptr[i] = ~0UL; in sba_search_bitmap()
588 res_ptr[i] |= RESMAP_MASK(bits); in sba_search_bitmap()
591 res_ptr += qwords; in sba_search_bitmap()
607 ioc->res_hint = res_ptr; in sba_search_bitmap()
725 unsigned long *res_ptr = (unsigned long *) &((ioc)->res_map[ridx & ~RESMAP_IDX_MASK]); in sba_free_range() local
731 for (; bits_not_wanted > 0 ; res_ptr++) { in sba_free_range()
736 *res_ptr = 0UL; in sba_free_range()
747 bits_not_wanted, m, pide, res_ptr, *res_ptr); in sba_free_range()
751 ASSERT((*res_ptr & m) == m); /* verify same bits are set */ in sba_free_range()
752 *res_ptr &= ~m; in sba_free_range()
1879 unsigned long *res_ptr = (unsigned long *)ioc->res_map; in ioc_show() local
1891 for (i = 0; i < (ioc->res_size / sizeof(unsigned long)); ++i, ++res_ptr) in ioc_show()
1892 used += hweight64(*res_ptr); in ioc_show()