mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
RDMA/amso1100: Endian annotate mqsq allocator
Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
dc544bc9cb
commit
26c4fc26d0
2 changed files with 8 additions and 8 deletions
|
@ -545,7 +545,7 @@ extern void c2_ae_event(struct c2_dev *c2dev, u32 mq_index);
|
||||||
extern int c2_init_mqsp_pool(struct c2_dev *c2dev, gfp_t gfp_mask,
|
extern int c2_init_mqsp_pool(struct c2_dev *c2dev, gfp_t gfp_mask,
|
||||||
struct sp_chunk **root);
|
struct sp_chunk **root);
|
||||||
extern void c2_free_mqsp_pool(struct c2_dev *c2dev, struct sp_chunk *root);
|
extern void c2_free_mqsp_pool(struct c2_dev *c2dev, struct sp_chunk *root);
|
||||||
extern u16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head,
|
extern __be16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head,
|
||||||
dma_addr_t *dma_addr, gfp_t gfp_mask);
|
dma_addr_t *dma_addr, gfp_t gfp_mask);
|
||||||
extern void c2_free_mqsp(u16 * mqsp);
|
extern void c2_free_mqsp(__be16* mqsp);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -87,8 +87,8 @@ void c2_free_mqsp_pool(struct c2_dev *c2dev, struct sp_chunk *root)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head,
|
__be16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head,
|
||||||
dma_addr_t *dma_addr, gfp_t gfp_mask)
|
dma_addr_t *dma_addr, gfp_t gfp_mask)
|
||||||
{
|
{
|
||||||
u16 mqsp;
|
u16 mqsp;
|
||||||
|
|
||||||
|
@ -115,12 +115,12 @@ u16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head,
|
||||||
(unsigned long) head);
|
(unsigned long) head);
|
||||||
pr_debug("%s addr %p dma_addr %llx\n", __FUNCTION__,
|
pr_debug("%s addr %p dma_addr %llx\n", __FUNCTION__,
|
||||||
&(head->shared_ptr[mqsp]), (unsigned long long) *dma_addr);
|
&(head->shared_ptr[mqsp]), (unsigned long long) *dma_addr);
|
||||||
return &(head->shared_ptr[mqsp]);
|
return (__force __be16 *) &(head->shared_ptr[mqsp]);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void c2_free_mqsp(u16 * mqsp)
|
void c2_free_mqsp(__be16 *mqsp)
|
||||||
{
|
{
|
||||||
struct sp_chunk *head;
|
struct sp_chunk *head;
|
||||||
u16 idx;
|
u16 idx;
|
||||||
|
@ -129,7 +129,7 @@ void c2_free_mqsp(u16 * mqsp)
|
||||||
head = (struct sp_chunk *) ((unsigned long) mqsp & PAGE_MASK);
|
head = (struct sp_chunk *) ((unsigned long) mqsp & PAGE_MASK);
|
||||||
|
|
||||||
/* Link head to new mqsp */
|
/* Link head to new mqsp */
|
||||||
*mqsp = head->head;
|
*mqsp = (__force __be16) head->head;
|
||||||
|
|
||||||
/* Compute the shared_ptr index */
|
/* Compute the shared_ptr index */
|
||||||
idx = ((unsigned long) mqsp & ~PAGE_MASK) >> 1;
|
idx = ((unsigned long) mqsp & ~PAGE_MASK) >> 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue