Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
26c4fc26
Commit
26c4fc26
authored
Apr 16, 2008
by
Roland Dreier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RDMA/amso1100: Endian annotate mqsq allocator
Signed-off-by:
Roland Dreier
<
rolandd@cisco.com
>
parent
dc544bc9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
drivers/infiniband/hw/amso1100/c2.h
drivers/infiniband/hw/amso1100/c2.h
+3
-3
drivers/infiniband/hw/amso1100/c2_alloc.c
drivers/infiniband/hw/amso1100/c2_alloc.c
+5
-5
No files found.
drivers/infiniband/hw/amso1100/c2.h
View file @
26c4fc26
...
...
@@ -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
,
struct
sp_chunk
**
root
);
extern
void
c2_free_mqsp_pool
(
struct
c2_dev
*
c2dev
,
struct
sp_chunk
*
root
);
extern
u
16
*
c2_alloc_mqsp
(
struct
c2_dev
*
c2dev
,
struct
sp_chunk
*
head
,
dma_addr_t
*
dma_addr
,
gfp_t
gfp_mask
);
extern
void
c2_free_mqsp
(
u16
*
mqsp
);
extern
__be
16
*
c2_alloc_mqsp
(
struct
c2_dev
*
c2dev
,
struct
sp_chunk
*
head
,
dma_addr_t
*
dma_addr
,
gfp_t
gfp_mask
);
extern
void
c2_free_mqsp
(
__be16
*
mqsp
);
#endif
drivers/infiniband/hw/amso1100/c2_alloc.c
View file @
26c4fc26
...
...
@@ -87,8 +87,8 @@ void c2_free_mqsp_pool(struct c2_dev *c2dev, struct sp_chunk *root)
}
}
u
16
*
c2_alloc_mqsp
(
struct
c2_dev
*
c2dev
,
struct
sp_chunk
*
head
,
dma_addr_t
*
dma_addr
,
gfp_t
gfp_mask
)
__be
16
*
c2_alloc_mqsp
(
struct
c2_dev
*
c2dev
,
struct
sp_chunk
*
head
,
dma_addr_t
*
dma_addr
,
gfp_t
gfp_mask
)
{
u16
mqsp
;
...
...
@@ -115,12 +115,12 @@ u16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head,
(
unsigned
long
)
head
);
pr_debug
(
"%s addr %p dma_addr %llx
\n
"
,
__FUNCTION__
,
&
(
head
->
shared_ptr
[
mqsp
]),
(
unsigned
long
long
)
*
dma_addr
);
return
&
(
head
->
shared_ptr
[
mqsp
]);
return
(
__force
__be16
*
)
&
(
head
->
shared_ptr
[
mqsp
]);
}
return
NULL
;
}
void
c2_free_mqsp
(
u16
*
mqsp
)
void
c2_free_mqsp
(
__be16
*
mqsp
)
{
struct
sp_chunk
*
head
;
u16
idx
;
...
...
@@ -129,7 +129,7 @@ void c2_free_mqsp(u16 * mqsp)
head
=
(
struct
sp_chunk
*
)
((
unsigned
long
)
mqsp
&
PAGE_MASK
);
/* Link head to new mqsp */
*
mqsp
=
head
->
head
;
*
mqsp
=
(
__force
__be16
)
head
->
head
;
/* Compute the shared_ptr index */
idx
=
((
unsigned
long
)
mqsp
&
~
PAGE_MASK
)
>>
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment