mr.c (296382) | mr.c (299179) |
---|---|
1/* 2 * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. 3 * Copyright (c) 2007, 2008 Mellanox Technologies. 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 --- 327 unchanged lines hidden (view full) --- 336 if (current_block_len == 0 && current_block_start == 0) { 337 first_block_start = current_block_start = 338 sg_dma_address(sg); 339 /* Find the bits that are different between 340 the physical address and the virtual 341 address for the start of the MR. 342 */ 343 /* umem_get aligned the start_va to a page | 1/* 2 * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. 3 * Copyright (c) 2007, 2008 Mellanox Technologies. 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 --- 327 unchanged lines hidden (view full) --- 336 if (current_block_len == 0 && current_block_start == 0) { 337 first_block_start = current_block_start = 338 sg_dma_address(sg); 339 /* Find the bits that are different between 340 the physical address and the virtual 341 address for the start of the MR. 342 */ 343 /* umem_get aligned the start_va to a page |
344 boundry. Therefore, we need to align the 345 start va to the same boundry */ | 344 boundary. Therefore, we need to align the 345 start va to the same boundary */ |
346 /* misalignment_bits is needed to handle the 347 case of a single memory region. In this 348 case, the rest of the logic will not reduce 349 the block size. If we use a block size 350 which is bigger than the alignment of the 351 misalignment bits, we might use the virtual 352 page number instead of the physical page 353 number, resulting in access to the wrong --- 532 unchanged lines hidden --- | 346 /* misalignment_bits is needed to handle the 347 case of a single memory region. In this 348 case, the rest of the logic will not reduce 349 the block size. If we use a block size 350 which is bigger than the alignment of the 351 misalignment bits, we might use the virtual 352 page number instead of the physical page 353 number, resulting in access to the wrong --- 532 unchanged lines hidden --- |