Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mthca/mthca_memfree.h
Show All 36 Lines | |||||
#include <linux/list.h> | #include <linux/list.h> | ||||
#include <linux/mutex.h> | #include <linux/mutex.h> | ||||
#define MTHCA_ICM_CHUNK_LEN \ | #define MTHCA_ICM_CHUNK_LEN \ | ||||
((256 - sizeof (struct list_head) - 2 * sizeof (int)) / \ | ((256 - sizeof (struct list_head) - 2 * sizeof (int)) / \ | ||||
(sizeof (struct scatterlist))) | (sizeof (struct scatterlist))) | ||||
enum { | #define MTHCA_ICM_PAGE_SHIFT 12 | ||||
MTHCA_ICM_PAGE_SHIFT = 12, | #define MTHCA_ICM_PAGE_SIZE (1 << MTHCA_ICM_PAGE_SHIFT) | ||||
MTHCA_ICM_PAGE_SIZE = 1 << MTHCA_ICM_PAGE_SHIFT, | #define MTHCA_DB_REC_PER_PAGE (MTHCA_ICM_PAGE_SIZE / 8) | ||||
MTHCA_DB_REC_PER_PAGE = MTHCA_ICM_PAGE_SIZE / 8 | |||||
}; | |||||
struct mthca_icm_chunk { | struct mthca_icm_chunk { | ||||
struct list_head list; | struct list_head list; | ||||
int npages; | int npages; | ||||
int nsg; | int nsg; | ||||
struct scatterlist mem[MTHCA_ICM_CHUNK_LEN]; | struct scatterlist mem[MTHCA_ICM_CHUNK_LEN]; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |