meminfo_buff->up_extmem2_hi = hi;
lo = t4_read_reg(padap, TP_PMM_RX_MAX_PAGE_A);
+ for (i = 0, meminfo_buff->free_rx_cnt = 0; i < 2; i++)
+ meminfo_buff->free_rx_cnt +=
+ FREERXPAGECOUNT_G(t4_read_reg(padap,
+ TP_FLM_FREE_RX_CNT_A));
+
meminfo_buff->rx_pages_data[0] = PMRXMAXPAGE_G(lo);
meminfo_buff->rx_pages_data[1] =
t4_read_reg(padap, TP_PMM_RX_PAGE_SIZE_A) >> 10;
lo = t4_read_reg(padap, TP_PMM_TX_MAX_PAGE_A);
hi = t4_read_reg(padap, TP_PMM_TX_PAGE_SIZE_A);
+ for (i = 0, meminfo_buff->free_tx_cnt = 0; i < 4; i++)
+ meminfo_buff->free_tx_cnt +=
+ FREETXPAGECOUNT_G(t4_read_reg(padap,
+ TP_FLM_FREE_TX_CNT_A));
+
meminfo_buff->tx_pages_data[0] = PMTXMAXPAGE_G(lo);
meminfo_buff->tx_pages_data[1] =
hi >= (1 << 20) ? (hi >> 20) : (hi >> 10);
{
static const char * const memory[] = { "EDC0:", "EDC1:", "MC:",
"MC0:", "MC1:", "HMA:"};
- unsigned int free_rx_cnt, free_tx_cnt;
struct adapter *adap = seq->private;
struct cudbg_meminfo meminfo;
int i, rc;
mem_region_show(seq, "uP Extmem2:", meminfo.up_extmem2_lo,
meminfo.up_extmem2_hi);
- for (i = 0, free_rx_cnt = 0; i < 2; i++)
- free_rx_cnt += FREERXPAGECOUNT_G
- (t4_read_reg(adap, TP_FLM_FREE_RX_CNT_A));
seq_printf(seq, "\n%u Rx pages (%u free) of size %uKiB for %u channels\n",
- meminfo.rx_pages_data[0], free_rx_cnt,
+ meminfo.rx_pages_data[0], meminfo.free_rx_cnt,
meminfo.rx_pages_data[1], meminfo.rx_pages_data[2]);
- for (i = 0, free_tx_cnt = 0; i < 4; i++)
- free_tx_cnt += FREETXPAGECOUNT_G
- (t4_read_reg(adap, TP_FLM_FREE_TX_CNT_A));
seq_printf(seq, "%u Tx pages (%u free) of size %u%ciB for %u channels\n",
- meminfo.tx_pages_data[0], free_tx_cnt,
+ meminfo.tx_pages_data[0], meminfo.free_tx_cnt,
meminfo.tx_pages_data[1], meminfo.tx_pages_data[2],
meminfo.tx_pages_data[3]);