aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2013-12-09 02:17:01 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-12-29 22:17:06 -0500
commite589a4404fa06730355de204d3d136ed9bbc7dea (patch)
treea7b4d1dad98a06d89e652194947735db7eec02b5 /drivers/net/ethernet/ibm
parentfee26f6d5d68a8815b20c32d15dd70d5384eb937 (diff)
powerpc/iommu: Update constant names to reflect their hardcoded page size
The powerpc iommu uses a hardcoded page size of 4K. This patch changes the name of the IOMMU_PAGE_* macros to reflect the hardcoded values. A future patch will use the existing names to support dynamic page sizes. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r--drivers/net/ethernet/ibm/ibmveth.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index 952d795230a4..f7d7538b6bd9 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -1282,24 +1282,25 @@ static unsigned long ibmveth_get_desired_dma(struct vio_dev *vdev)
1282 1282
1283 /* netdev inits at probe time along with the structures we need below*/ 1283 /* netdev inits at probe time along with the structures we need below*/
1284 if (netdev == NULL) 1284 if (netdev == NULL)
1285 return IOMMU_PAGE_ALIGN(IBMVETH_IO_ENTITLEMENT_DEFAULT); 1285 return IOMMU_PAGE_ALIGN_4K(IBMVETH_IO_ENTITLEMENT_DEFAULT);
1286 1286
1287 adapter = netdev_priv(netdev); 1287 adapter = netdev_priv(netdev);
1288 1288
1289 ret = IBMVETH_BUFF_LIST_SIZE + IBMVETH_FILT_LIST_SIZE; 1289 ret = IBMVETH_BUFF_LIST_SIZE + IBMVETH_FILT_LIST_SIZE;
1290 ret += IOMMU_PAGE_ALIGN(netdev->mtu); 1290 ret += IOMMU_PAGE_ALIGN_4K(netdev->mtu);
1291 1291
1292 for (i = 0; i < IBMVETH_NUM_BUFF_POOLS; i++) { 1292 for (i = 0; i < IBMVETH_NUM_BUFF_POOLS; i++) {
1293 /* add the size of the active receive buffers */ 1293 /* add the size of the active receive buffers */
1294 if (adapter->rx_buff_pool[i].active) 1294 if (adapter->rx_buff_pool[i].active)
1295 ret += 1295 ret +=
1296 adapter->rx_buff_pool[i].size * 1296 adapter->rx_buff_pool[i].size *
1297 IOMMU_PAGE_ALIGN(adapter->rx_buff_pool[i]. 1297 IOMMU_PAGE_ALIGN_4K(adapter->rx_buff_pool[i].
1298 buff_size); 1298 buff_size);
1299 rxqentries += adapter->rx_buff_pool[i].size; 1299 rxqentries += adapter->rx_buff_pool[i].size;
1300 } 1300 }
1301 /* add the size of the receive queue entries */ 1301 /* add the size of the receive queue entries */
1302 ret += IOMMU_PAGE_ALIGN(rxqentries * sizeof(struct ibmveth_rx_q_entry)); 1302 ret += IOMMU_PAGE_ALIGN_4K(
1303 rxqentries * sizeof(struct ibmveth_rx_q_entry));
1303 1304
1304 return ret; 1305 return ret;
1305} 1306}