icm.c (e4da3fbfbd1de56d2367653e3823e6445e49f8a9) icm.c (f9baff509f8a05a79626defdbdf4f4aa4efd373b)
1/*
2 * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
3 * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
4 *
5 * This software is available to you under a choice of one of two
6 * licenses. You may choose to be licensed under the terms of the GNU
7 * General Public License (GPL) Version 2, available from the file
8 * COPYING in the main directory of this source tree, or the

--- 199 unchanged lines hidden (view full) ---

208static int mlx4_MAP_ICM(struct mlx4_dev *dev, struct mlx4_icm *icm, u64 virt)
209{
210 return mlx4_map_cmd(dev, MLX4_CMD_MAP_ICM, icm, virt);
211}
212
213static int mlx4_UNMAP_ICM(struct mlx4_dev *dev, u64 virt, u32 page_count)
214{
215 return mlx4_cmd(dev, virt, page_count, 0, MLX4_CMD_UNMAP_ICM,
1/*
2 * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
3 * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
4 *
5 * This software is available to you under a choice of one of two
6 * licenses. You may choose to be licensed under the terms of the GNU
7 * General Public License (GPL) Version 2, available from the file
8 * COPYING in the main directory of this source tree, or the

--- 199 unchanged lines hidden (view full) ---

208static int mlx4_MAP_ICM(struct mlx4_dev *dev, struct mlx4_icm *icm, u64 virt)
209{
210 return mlx4_map_cmd(dev, MLX4_CMD_MAP_ICM, icm, virt);
211}
212
213static int mlx4_UNMAP_ICM(struct mlx4_dev *dev, u64 virt, u32 page_count)
214{
215 return mlx4_cmd(dev, virt, page_count, 0, MLX4_CMD_UNMAP_ICM,
216 MLX4_CMD_TIME_CLASS_B);
216 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE);
217}
218
219int mlx4_MAP_ICM_AUX(struct mlx4_dev *dev, struct mlx4_icm *icm)
220{
221 return mlx4_map_cmd(dev, MLX4_CMD_MAP_ICM_AUX, icm, -1);
222}
223
224int mlx4_UNMAP_ICM_AUX(struct mlx4_dev *dev)
225{
217}
218
219int mlx4_MAP_ICM_AUX(struct mlx4_dev *dev, struct mlx4_icm *icm)
220{
221 return mlx4_map_cmd(dev, MLX4_CMD_MAP_ICM_AUX, icm, -1);
222}
223
224int mlx4_UNMAP_ICM_AUX(struct mlx4_dev *dev)
225{
226 return mlx4_cmd(dev, 0, 0, 0, MLX4_CMD_UNMAP_ICM_AUX, MLX4_CMD_TIME_CLASS_B);
226 return mlx4_cmd(dev, 0, 0, 0, MLX4_CMD_UNMAP_ICM_AUX,
227 MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE);
227}
228
229int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, int obj)
230{
231 int i = (obj & (table->num_obj - 1)) / (MLX4_TABLE_CHUNK_SIZE / table->obj_size);
232 int ret = 0;
233
234 mutex_lock(&table->mutex);

--- 196 unchanged lines hidden ---
228}
229
230int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, int obj)
231{
232 int i = (obj & (table->num_obj - 1)) / (MLX4_TABLE_CHUNK_SIZE / table->obj_size);
233 int ret = 0;
234
235 mutex_lock(&table->mutex);

--- 196 unchanged lines hidden ---