diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_mr.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_mr.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c index 15d9f8f290a0..0965e66061b7 100644 --- a/drivers/infiniband/hw/mthca/mthca_mr.c +++ b/drivers/infiniband/hw/mthca/mthca_mr.c | |||
@@ -51,18 +51,18 @@ struct mthca_mtt { | |||
51 | * Must be packed because mtt_seg is 64 bits but only aligned to 32 bits. | 51 | * Must be packed because mtt_seg is 64 bits but only aligned to 32 bits. |
52 | */ | 52 | */ |
53 | struct mthca_mpt_entry { | 53 | struct mthca_mpt_entry { |
54 | u32 flags; | 54 | __be32 flags; |
55 | u32 page_size; | 55 | __be32 page_size; |
56 | u32 key; | 56 | __be32 key; |
57 | u32 pd; | 57 | __be32 pd; |
58 | u64 start; | 58 | __be64 start; |
59 | u64 length; | 59 | __be64 length; |
60 | u32 lkey; | 60 | __be32 lkey; |
61 | u32 window_count; | 61 | __be32 window_count; |
62 | u32 window_count_limit; | 62 | __be32 window_count_limit; |
63 | u64 mtt_seg; | 63 | __be64 mtt_seg; |
64 | u32 mtt_sz; /* Arbel only */ | 64 | __be32 mtt_sz; /* Arbel only */ |
65 | u32 reserved[2]; | 65 | u32 reserved[2]; |
66 | } __attribute__((packed)); | 66 | } __attribute__((packed)); |
67 | 67 | ||
68 | #define MTHCA_MPT_FLAG_SW_OWNS (0xfUL << 28) | 68 | #define MTHCA_MPT_FLAG_SW_OWNS (0xfUL << 28) |
@@ -248,7 +248,7 @@ int mthca_write_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt, | |||
248 | int start_index, u64 *buffer_list, int list_len) | 248 | int start_index, u64 *buffer_list, int list_len) |
249 | { | 249 | { |
250 | struct mthca_mailbox *mailbox; | 250 | struct mthca_mailbox *mailbox; |
251 | u64 *mtt_entry; | 251 | __be64 *mtt_entry; |
252 | int err = 0; | 252 | int err = 0; |
253 | u8 status; | 253 | u8 status; |
254 | int i; | 254 | int i; |
@@ -390,7 +390,7 @@ int mthca_mr_alloc(struct mthca_dev *dev, u32 pd, int buffer_size_shift, | |||
390 | for (i = 0; i < sizeof (struct mthca_mpt_entry) / 4; ++i) { | 390 | for (i = 0; i < sizeof (struct mthca_mpt_entry) / 4; ++i) { |
391 | if (i % 4 == 0) | 391 | if (i % 4 == 0) |
392 | printk("[%02x] ", i * 4); | 392 | printk("[%02x] ", i * 4); |
393 | printk(" %08x", be32_to_cpu(((u32 *) mpt_entry)[i])); | 393 | printk(" %08x", be32_to_cpu(((__be32 *) mpt_entry)[i])); |
394 | if ((i + 1) % 4 == 0) | 394 | if ((i + 1) % 4 == 0) |
395 | printk("\n"); | 395 | printk("\n"); |
396 | } | 396 | } |
@@ -563,7 +563,7 @@ int mthca_fmr_alloc(struct mthca_dev *dev, u32 pd, | |||
563 | for (i = 0; i < sizeof (struct mthca_mpt_entry) / 4; ++i) { | 563 | for (i = 0; i < sizeof (struct mthca_mpt_entry) / 4; ++i) { |
564 | if (i % 4 == 0) | 564 | if (i % 4 == 0) |
565 | printk("[%02x] ", i * 4); | 565 | printk("[%02x] ", i * 4); |
566 | printk(" %08x", be32_to_cpu(((u32 *) mpt_entry)[i])); | 566 | printk(" %08x", be32_to_cpu(((__be32 *) mpt_entry)[i])); |
567 | if ((i + 1) % 4 == 0) | 567 | if ((i + 1) % 4 == 0) |
568 | printk("\n"); | 568 | printk("\n"); |
569 | } | 569 | } |
@@ -670,7 +670,7 @@ int mthca_tavor_map_phys_fmr(struct ib_fmr *ibfmr, u64 *page_list, | |||
670 | mpt_entry.length = cpu_to_be64(list_len * (1ull << fmr->attr.page_size)); | 670 | mpt_entry.length = cpu_to_be64(list_len * (1ull << fmr->attr.page_size)); |
671 | mpt_entry.start = cpu_to_be64(iova); | 671 | mpt_entry.start = cpu_to_be64(iova); |
672 | 672 | ||
673 | writel(mpt_entry.lkey, &fmr->mem.tavor.mpt->key); | 673 | __raw_writel((__force u32) mpt_entry.lkey, &fmr->mem.tavor.mpt->key); |
674 | memcpy_toio(&fmr->mem.tavor.mpt->start, &mpt_entry.start, | 674 | memcpy_toio(&fmr->mem.tavor.mpt->start, &mpt_entry.start, |
675 | offsetof(struct mthca_mpt_entry, window_count) - | 675 | offsetof(struct mthca_mpt_entry, window_count) - |
676 | offsetof(struct mthca_mpt_entry, start)); | 676 | offsetof(struct mthca_mpt_entry, start)); |