Lines Matching refs:meminfo_buff

130 		       struct cudbg_meminfo *meminfo_buff)  in cudbg_fill_meminfo()  argument
136 memset(meminfo_buff->avail, 0, in cudbg_fill_meminfo()
137 ARRAY_SIZE(meminfo_buff->avail) * in cudbg_fill_meminfo()
139 memset(meminfo_buff->mem, 0, in cudbg_fill_meminfo()
141 md = meminfo_buff->mem; in cudbg_fill_meminfo()
143 for (i = 0; i < ARRAY_SIZE(meminfo_buff->mem); i++) { in cudbg_fill_meminfo()
144 meminfo_buff->mem[i].limit = 0; in cudbg_fill_meminfo()
145 meminfo_buff->mem[i].idx = i; in cudbg_fill_meminfo()
153 meminfo_buff->avail[i].base = in cudbg_fill_meminfo()
155 meminfo_buff->avail[i].limit = in cudbg_fill_meminfo()
156 meminfo_buff->avail[i].base + in cudbg_fill_meminfo()
158 meminfo_buff->avail[i].idx = 0; in cudbg_fill_meminfo()
164 meminfo_buff->avail[i].base = in cudbg_fill_meminfo()
166 meminfo_buff->avail[i].limit = in cudbg_fill_meminfo()
167 meminfo_buff->avail[i].base + in cudbg_fill_meminfo()
169 meminfo_buff->avail[i].idx = 1; in cudbg_fill_meminfo()
176 meminfo_buff->avail[i].base = in cudbg_fill_meminfo()
178 meminfo_buff->avail[i].limit = in cudbg_fill_meminfo()
179 meminfo_buff->avail[i].base + in cudbg_fill_meminfo()
181 meminfo_buff->avail[i].idx = 3; in cudbg_fill_meminfo()
187 meminfo_buff->avail[i].base = in cudbg_fill_meminfo()
189 meminfo_buff->avail[i].limit = in cudbg_fill_meminfo()
190 meminfo_buff->avail[i].base + in cudbg_fill_meminfo()
192 meminfo_buff->avail[i].idx = 4; in cudbg_fill_meminfo()
198 meminfo_buff->avail[i].base = in cudbg_fill_meminfo()
200 meminfo_buff->avail[i].limit = in cudbg_fill_meminfo()
201 meminfo_buff->avail[i].base + in cudbg_fill_meminfo()
203 meminfo_buff->avail[i].idx = 2; in cudbg_fill_meminfo()
209 meminfo_buff->avail[i].base = in cudbg_fill_meminfo()
211 meminfo_buff->avail[i].limit = in cudbg_fill_meminfo()
212 meminfo_buff->avail[i].base + in cudbg_fill_meminfo()
214 meminfo_buff->avail[i].idx = 5; in cudbg_fill_meminfo()
222 meminfo_buff->avail_c = i; in cudbg_fill_meminfo()
223 sort(meminfo_buff->avail, i, sizeof(struct cudbg_mem_desc), in cudbg_fill_meminfo()
317 if (meminfo_buff->avail[n].limit < in cudbg_fill_meminfo()
318 meminfo_buff->avail[n + 1].base) in cudbg_fill_meminfo()
319 (md++)->base = meminfo_buff->avail[n].limit; in cudbg_fill_meminfo()
321 if (meminfo_buff->avail[n].limit) in cudbg_fill_meminfo()
322 (md++)->base = meminfo_buff->avail[n].limit; in cudbg_fill_meminfo()
324 n = md - meminfo_buff->mem; in cudbg_fill_meminfo()
325 meminfo_buff->mem_c = n; in cudbg_fill_meminfo()
327 sort(meminfo_buff->mem, n, sizeof(struct cudbg_mem_desc), in cudbg_fill_meminfo()
332 meminfo_buff->up_ram_lo = lo; in cudbg_fill_meminfo()
333 meminfo_buff->up_ram_hi = hi; in cudbg_fill_meminfo()
337 meminfo_buff->up_extmem2_lo = lo; in cudbg_fill_meminfo()
338 meminfo_buff->up_extmem2_hi = hi; in cudbg_fill_meminfo()
341 for (i = 0, meminfo_buff->free_rx_cnt = 0; i < 2; i++) in cudbg_fill_meminfo()
342 meminfo_buff->free_rx_cnt += in cudbg_fill_meminfo()
346 meminfo_buff->rx_pages_data[0] = PMRXMAXPAGE_G(lo); in cudbg_fill_meminfo()
347 meminfo_buff->rx_pages_data[1] = in cudbg_fill_meminfo()
349 meminfo_buff->rx_pages_data[2] = (lo & PMRXNUMCHN_F) ? 2 : 1; in cudbg_fill_meminfo()
353 for (i = 0, meminfo_buff->free_tx_cnt = 0; i < 4; i++) in cudbg_fill_meminfo()
354 meminfo_buff->free_tx_cnt += in cudbg_fill_meminfo()
358 meminfo_buff->tx_pages_data[0] = PMTXMAXPAGE_G(lo); in cudbg_fill_meminfo()
359 meminfo_buff->tx_pages_data[1] = in cudbg_fill_meminfo()
361 meminfo_buff->tx_pages_data[2] = in cudbg_fill_meminfo()
363 meminfo_buff->tx_pages_data[3] = 1 << PMTXNUMCHN_G(lo); in cudbg_fill_meminfo()
365 meminfo_buff->p_structs = t4_read_reg(padap, TP_CMM_MM_MAX_PSTRUCT_A); in cudbg_fill_meminfo()
366 meminfo_buff->p_structs_free_cnt = in cudbg_fill_meminfo()
382 meminfo_buff->port_used[i] = used; in cudbg_fill_meminfo()
383 meminfo_buff->port_alloc[i] = alloc; in cudbg_fill_meminfo()
399 meminfo_buff->loopback_used[i] = used; in cudbg_fill_meminfo()
400 meminfo_buff->loopback_alloc[i] = alloc; in cudbg_fill_meminfo()
1479 struct cudbg_meminfo *meminfo_buff; in cudbg_collect_meminfo() local
1495 meminfo_buff = (struct cudbg_meminfo *)(temp_buff.data + in cudbg_collect_meminfo()
1497 rc = cudbg_fill_meminfo(padap, meminfo_buff); in cudbg_collect_meminfo()