diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:01:08 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:01:08 -0400 |
commit | 26c4fc26d0af9b16a6a234318d15ee0b3896a63d (patch) | |
tree | 310f122de4c9487bc498e76bb8ccf73bff6a0eb3 /drivers/infiniband/hw/amso1100 | |
parent | dc544bc9cb8aa91c5d7fc9116a302f88a8a97250 (diff) |
RDMA/amso1100: Endian annotate mqsq allocator
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/amso1100')
-rw-r--r-- | drivers/infiniband/hw/amso1100/c2.h | 6 | ||||
-rw-r--r-- | drivers/infiniband/hw/amso1100/c2_alloc.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2.h b/drivers/infiniband/hw/amso1100/c2.h index 21bcb3ada7fe..ed38ab8d9c0c 100644 --- a/drivers/infiniband/hw/amso1100/c2.h +++ b/drivers/infiniband/hw/amso1100/c2.h | |||
@@ -545,7 +545,7 @@ extern void c2_ae_event(struct c2_dev *c2dev, u32 mq_index); | |||
545 | extern int c2_init_mqsp_pool(struct c2_dev *c2dev, gfp_t gfp_mask, | 545 | extern int c2_init_mqsp_pool(struct c2_dev *c2dev, gfp_t gfp_mask, |
546 | struct sp_chunk **root); | 546 | struct sp_chunk **root); |
547 | extern void c2_free_mqsp_pool(struct c2_dev *c2dev, struct sp_chunk *root); | 547 | extern void c2_free_mqsp_pool(struct c2_dev *c2dev, struct sp_chunk *root); |
548 | extern u16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head, | 548 | extern __be16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head, |
549 | dma_addr_t *dma_addr, gfp_t gfp_mask); | 549 | dma_addr_t *dma_addr, gfp_t gfp_mask); |
550 | extern void c2_free_mqsp(u16 * mqsp); | 550 | extern void c2_free_mqsp(__be16* mqsp); |
551 | #endif | 551 | #endif |
diff --git a/drivers/infiniband/hw/amso1100/c2_alloc.c b/drivers/infiniband/hw/amso1100/c2_alloc.c index 0315f99e4191..02091e69e206 100644 --- a/drivers/infiniband/hw/amso1100/c2_alloc.c +++ b/drivers/infiniband/hw/amso1100/c2_alloc.c | |||
@@ -87,8 +87,8 @@ void c2_free_mqsp_pool(struct c2_dev *c2dev, struct sp_chunk *root) | |||
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | u16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head, | 90 | __be16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head, |
91 | dma_addr_t *dma_addr, gfp_t gfp_mask) | 91 | dma_addr_t *dma_addr, gfp_t gfp_mask) |
92 | { | 92 | { |
93 | u16 mqsp; | 93 | u16 mqsp; |
94 | 94 | ||
@@ -115,12 +115,12 @@ u16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head, | |||
115 | (unsigned long) head); | 115 | (unsigned long) head); |
116 | pr_debug("%s addr %p dma_addr %llx\n", __FUNCTION__, | 116 | pr_debug("%s addr %p dma_addr %llx\n", __FUNCTION__, |
117 | &(head->shared_ptr[mqsp]), (unsigned long long) *dma_addr); | 117 | &(head->shared_ptr[mqsp]), (unsigned long long) *dma_addr); |
118 | return &(head->shared_ptr[mqsp]); | 118 | return (__force __be16 *) &(head->shared_ptr[mqsp]); |
119 | } | 119 | } |
120 | return NULL; | 120 | return NULL; |
121 | } | 121 | } |
122 | 122 | ||
123 | void c2_free_mqsp(u16 * mqsp) | 123 | void c2_free_mqsp(__be16 *mqsp) |
124 | { | 124 | { |
125 | struct sp_chunk *head; | 125 | struct sp_chunk *head; |
126 | u16 idx; | 126 | u16 idx; |
@@ -129,7 +129,7 @@ void c2_free_mqsp(u16 * mqsp) | |||
129 | head = (struct sp_chunk *) ((unsigned long) mqsp & PAGE_MASK); | 129 | head = (struct sp_chunk *) ((unsigned long) mqsp & PAGE_MASK); |
130 | 130 | ||
131 | /* Link head to new mqsp */ | 131 | /* Link head to new mqsp */ |
132 | *mqsp = head->head; | 132 | *mqsp = (__force __be16) head->head; |
133 | 133 | ||
134 | /* Compute the shared_ptr index */ | 134 | /* Compute the shared_ptr index */ |
135 | idx = ((unsigned long) mqsp & ~PAGE_MASK) >> 1; | 135 | idx = ((unsigned long) mqsp & ~PAGE_MASK) >> 1; |