Lines Matching refs:meminfo_buff
537 struct cudbg_meminfo *meminfo_buff) in cudbg_fill_meminfo() argument
543 memset(meminfo_buff->avail, 0, in cudbg_fill_meminfo()
544 ARRAY_SIZE(meminfo_buff->avail) * in cudbg_fill_meminfo()
546 memset(meminfo_buff->mem, 0, in cudbg_fill_meminfo()
548 md = meminfo_buff->mem; in cudbg_fill_meminfo()
550 for (i = 0; i < ARRAY_SIZE(meminfo_buff->mem); i++) { in cudbg_fill_meminfo()
551 meminfo_buff->mem[i].limit = 0; in cudbg_fill_meminfo()
552 meminfo_buff->mem[i].idx = i; in cudbg_fill_meminfo()
560 meminfo_buff->avail[i].base = in cudbg_fill_meminfo()
562 meminfo_buff->avail[i].limit = in cudbg_fill_meminfo()
563 meminfo_buff->avail[i].base + in cudbg_fill_meminfo()
565 meminfo_buff->avail[i].idx = 0; in cudbg_fill_meminfo()
571 meminfo_buff->avail[i].base = in cudbg_fill_meminfo()
573 meminfo_buff->avail[i].limit = in cudbg_fill_meminfo()
574 meminfo_buff->avail[i].base + in cudbg_fill_meminfo()
576 meminfo_buff->avail[i].idx = 1; in cudbg_fill_meminfo()
583 meminfo_buff->avail[i].base = in cudbg_fill_meminfo()
585 meminfo_buff->avail[i].limit = in cudbg_fill_meminfo()
586 meminfo_buff->avail[i].base + in cudbg_fill_meminfo()
588 meminfo_buff->avail[i].idx = 3; in cudbg_fill_meminfo()
594 meminfo_buff->avail[i].base = in cudbg_fill_meminfo()
596 meminfo_buff->avail[i].limit = in cudbg_fill_meminfo()
597 meminfo_buff->avail[i].base + in cudbg_fill_meminfo()
599 meminfo_buff->avail[i].idx = 4; in cudbg_fill_meminfo()
605 meminfo_buff->avail[i].base = in cudbg_fill_meminfo()
607 meminfo_buff->avail[i].limit = in cudbg_fill_meminfo()
608 meminfo_buff->avail[i].base + in cudbg_fill_meminfo()
610 meminfo_buff->avail[i].idx = 2; in cudbg_fill_meminfo()
616 meminfo_buff->avail[i].base = in cudbg_fill_meminfo()
618 meminfo_buff->avail[i].limit = in cudbg_fill_meminfo()
619 meminfo_buff->avail[i].base + in cudbg_fill_meminfo()
621 meminfo_buff->avail[i].idx = 5; in cudbg_fill_meminfo()
629 meminfo_buff->avail_c = i; in cudbg_fill_meminfo()
630 sort(meminfo_buff->avail, i, sizeof(struct cudbg_mem_desc), in cudbg_fill_meminfo()
724 if (meminfo_buff->avail[n].limit < in cudbg_fill_meminfo()
725 meminfo_buff->avail[n + 1].base) in cudbg_fill_meminfo()
726 (md++)->base = meminfo_buff->avail[n].limit; in cudbg_fill_meminfo()
728 if (meminfo_buff->avail[n].limit) in cudbg_fill_meminfo()
729 (md++)->base = meminfo_buff->avail[n].limit; in cudbg_fill_meminfo()
731 n = md - meminfo_buff->mem; in cudbg_fill_meminfo()
732 meminfo_buff->mem_c = n; in cudbg_fill_meminfo()
734 sort(meminfo_buff->mem, n, sizeof(struct cudbg_mem_desc), in cudbg_fill_meminfo()
739 meminfo_buff->up_ram_lo = lo; in cudbg_fill_meminfo()
740 meminfo_buff->up_ram_hi = hi; in cudbg_fill_meminfo()
744 meminfo_buff->up_extmem2_lo = lo; in cudbg_fill_meminfo()
745 meminfo_buff->up_extmem2_hi = hi; in cudbg_fill_meminfo()
748 for (i = 0, meminfo_buff->free_rx_cnt = 0; i < 2; i++) in cudbg_fill_meminfo()
749 meminfo_buff->free_rx_cnt += in cudbg_fill_meminfo()
753 meminfo_buff->rx_pages_data[0] = PMRXMAXPAGE_G(lo); in cudbg_fill_meminfo()
754 meminfo_buff->rx_pages_data[1] = in cudbg_fill_meminfo()
756 meminfo_buff->rx_pages_data[2] = (lo & PMRXNUMCHN_F) ? 2 : 1; in cudbg_fill_meminfo()
760 for (i = 0, meminfo_buff->free_tx_cnt = 0; i < 4; i++) in cudbg_fill_meminfo()
761 meminfo_buff->free_tx_cnt += in cudbg_fill_meminfo()
765 meminfo_buff->tx_pages_data[0] = PMTXMAXPAGE_G(lo); in cudbg_fill_meminfo()
766 meminfo_buff->tx_pages_data[1] = in cudbg_fill_meminfo()
768 meminfo_buff->tx_pages_data[2] = in cudbg_fill_meminfo()
770 meminfo_buff->tx_pages_data[3] = 1 << PMTXNUMCHN_G(lo); in cudbg_fill_meminfo()
772 meminfo_buff->p_structs = t4_read_reg(padap, TP_CMM_MM_MAX_PSTRUCT_A); in cudbg_fill_meminfo()
773 meminfo_buff->p_structs_free_cnt = in cudbg_fill_meminfo()
789 meminfo_buff->port_used[i] = used; in cudbg_fill_meminfo()
790 meminfo_buff->port_alloc[i] = alloc; in cudbg_fill_meminfo()
806 meminfo_buff->loopback_used[i] = used; in cudbg_fill_meminfo()
807 meminfo_buff->loopback_alloc[i] = alloc; in cudbg_fill_meminfo()
1908 struct cudbg_meminfo *meminfo_buff; in cudbg_collect_meminfo() local
1924 meminfo_buff = (struct cudbg_meminfo *)(temp_buff.data + in cudbg_collect_meminfo()
1926 rc = cudbg_fill_meminfo(padap, meminfo_buff); in cudbg_collect_meminfo()