Lines Matching refs:index
38 int16_t ref_count; /* Number of PCI mappings using this index */
61 int64_t index;
207 for (index = start_index; index >= 0; index--) {
208 if ((bar1_state[index].address_bits == physical >> 22) &&
209 (bar1_state[index].ref_count)) {
211 bar1_state[index].ref_count++;
212 if (unlikely(bar1_state[index].ref_count < 0))
215 (int) index);
216 result = (index << 22) | (physical & ((1 << 22) - 1));
225 for (index = start_index; index >= 0; index--) {
226 if (unlikely(bar1_state[index].ref_count == 0)) {
229 bar1_state[index].ref_count = 1;
230 bar1_state[index].address_bits = physical >> 22;
240 octeon_npi_write32(CVMX_NPI_PCI_BAR1_INDEXX(index),
243 result = (index << 22) | (physical & ((1 << 22) - 1));
252 "Can't find empty BAR1 index for physical mapping 0x%llx\n",
273 uint64_t index;
301 index = (dma_addr - (2ul << 30)) >> 22;
317 index = dma_addr >> 22;
325 if (unlikely(index > 31))
331 bar1_state[index].ref_count--;
332 if (bar1_state[index].ref_count == 0)
333 octeon_npi_write32(CVMX_NPI_PCI_BAR1_INDEXX(index), 0);
334 else if (unlikely(bar1_state[index].ref_count < 0))
336 (int) index);