Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
9c637646
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9c637646
编写于
8月 23, 2006
作者:
G
Greg Kroah-Hartman
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
上级
b8b99e85
834ac73d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
55 addition
and
26 deletion
+55
-26
drivers/infiniband/core/cache.c
drivers/infiniband/core/cache.c
+2
-1
drivers/infiniband/core/sa_query.c
drivers/infiniband/core/sa_query.c
+2
-1
drivers/infiniband/hw/mthca/mthca_main.c
drivers/infiniband/hw/mthca/mthca_main.c
+3
-3
drivers/infiniband/hw/mthca/mthca_provider.c
drivers/infiniband/hw/mthca/mthca_provider.c
+6
-5
drivers/infiniband/hw/mthca/mthca_provider.h
drivers/infiniband/hw/mthca/mthca_provider.h
+2
-2
drivers/infiniband/hw/mthca/mthca_qp.c
drivers/infiniband/hw/mthca/mthca_qp.c
+40
-14
未找到文件。
drivers/infiniband/core/cache.c
浏览文件 @
9c637646
...
...
@@ -301,7 +301,8 @@ static void ib_cache_event(struct ib_event_handler *handler,
event
->
event
==
IB_EVENT_PORT_ACTIVE
||
event
->
event
==
IB_EVENT_LID_CHANGE
||
event
->
event
==
IB_EVENT_PKEY_CHANGE
||
event
->
event
==
IB_EVENT_SM_CHANGE
)
{
event
->
event
==
IB_EVENT_SM_CHANGE
||
event
->
event
==
IB_EVENT_CLIENT_REREGISTER
)
{
work
=
kmalloc
(
sizeof
*
work
,
GFP_ATOMIC
);
if
(
work
)
{
INIT_WORK
(
&
work
->
work
,
ib_cache_task
,
work
);
...
...
drivers/infiniband/core/sa_query.c
浏览文件 @
9c637646
...
...
@@ -405,7 +405,8 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event
event
->
event
==
IB_EVENT_PORT_ACTIVE
||
event
->
event
==
IB_EVENT_LID_CHANGE
||
event
->
event
==
IB_EVENT_PKEY_CHANGE
||
event
->
event
==
IB_EVENT_SM_CHANGE
)
{
event
->
event
==
IB_EVENT_SM_CHANGE
||
event
->
event
==
IB_EVENT_CLIENT_REREGISTER
)
{
struct
ib_sa_device
*
sa_dev
;
sa_dev
=
container_of
(
handler
,
typeof
(
*
sa_dev
),
event_handler
);
...
...
drivers/infiniband/hw/mthca/mthca_main.c
浏览文件 @
9c637646
...
...
@@ -967,12 +967,12 @@ static struct {
}
mthca_hca_table
[]
=
{
[
TAVOR
]
=
{
.
latest_fw
=
MTHCA_FW_VER
(
3
,
4
,
0
),
.
flags
=
0
},
[
ARBEL_COMPAT
]
=
{
.
latest_fw
=
MTHCA_FW_VER
(
4
,
7
,
4
00
),
[
ARBEL_COMPAT
]
=
{
.
latest_fw
=
MTHCA_FW_VER
(
4
,
7
,
6
00
),
.
flags
=
MTHCA_FLAG_PCIE
},
[
ARBEL_NATIVE
]
=
{
.
latest_fw
=
MTHCA_FW_VER
(
5
,
1
,
0
),
[
ARBEL_NATIVE
]
=
{
.
latest_fw
=
MTHCA_FW_VER
(
5
,
1
,
40
0
),
.
flags
=
MTHCA_FLAG_MEMFREE
|
MTHCA_FLAG_PCIE
},
[
SINAI
]
=
{
.
latest_fw
=
MTHCA_FW_VER
(
1
,
0
,
80
0
),
[
SINAI
]
=
{
.
latest_fw
=
MTHCA_FW_VER
(
1
,
1
,
0
),
.
flags
=
MTHCA_FLAG_MEMFREE
|
MTHCA_FLAG_PCIE
|
MTHCA_FLAG_SINAI_OPT
}
...
...
drivers/infiniband/hw/mthca/mthca_provider.c
浏览文件 @
9c637646
...
...
@@ -1287,11 +1287,7 @@ int mthca_register_device(struct mthca_dev *dev)
(
1ull
<<
IB_USER_VERBS_CMD_MODIFY_QP
)
|
(
1ull
<<
IB_USER_VERBS_CMD_DESTROY_QP
)
|
(
1ull
<<
IB_USER_VERBS_CMD_ATTACH_MCAST
)
|
(
1ull
<<
IB_USER_VERBS_CMD_DETACH_MCAST
)
|
(
1ull
<<
IB_USER_VERBS_CMD_CREATE_SRQ
)
|
(
1ull
<<
IB_USER_VERBS_CMD_MODIFY_SRQ
)
|
(
1ull
<<
IB_USER_VERBS_CMD_QUERY_SRQ
)
|
(
1ull
<<
IB_USER_VERBS_CMD_DESTROY_SRQ
);
(
1ull
<<
IB_USER_VERBS_CMD_DETACH_MCAST
);
dev
->
ib_dev
.
node_type
=
IB_NODE_CA
;
dev
->
ib_dev
.
phys_port_cnt
=
dev
->
limits
.
num_ports
;
dev
->
ib_dev
.
dma_device
=
&
dev
->
pdev
->
dev
;
...
...
@@ -1316,6 +1312,11 @@ int mthca_register_device(struct mthca_dev *dev)
dev
->
ib_dev
.
modify_srq
=
mthca_modify_srq
;
dev
->
ib_dev
.
query_srq
=
mthca_query_srq
;
dev
->
ib_dev
.
destroy_srq
=
mthca_destroy_srq
;
dev
->
ib_dev
.
uverbs_cmd_mask
|=
(
1ull
<<
IB_USER_VERBS_CMD_CREATE_SRQ
)
|
(
1ull
<<
IB_USER_VERBS_CMD_MODIFY_SRQ
)
|
(
1ull
<<
IB_USER_VERBS_CMD_QUERY_SRQ
)
|
(
1ull
<<
IB_USER_VERBS_CMD_DESTROY_SRQ
);
if
(
mthca_is_memfree
(
dev
))
dev
->
ib_dev
.
post_srq_recv
=
mthca_arbel_post_srq_recv
;
...
...
drivers/infiniband/hw/mthca/mthca_provider.h
浏览文件 @
9c637646
...
...
@@ -136,8 +136,8 @@ struct mthca_ah {
* We have one global lock that protects dev->cq/qp_table. Each
* struct mthca_cq/qp also has its own lock. An individual qp lock
* may be taken inside of an individual cq lock. Both cqs attached to
* a qp may be locked, with the
send cq locked first. No other
* nesting should be done.
* a qp may be locked, with the
cq with the lower cqn locked first.
*
No other
nesting should be done.
*
* Each struct mthca_cq/qp also has an ref count, protected by the
* corresponding table lock. The pointer from the cq/qp_table to the
...
...
drivers/infiniband/hw/mthca/mthca_qp.c
浏览文件 @
9c637646
...
...
@@ -99,6 +99,10 @@ enum {
MTHCA_QP_BIT_RSC
=
1
<<
3
};
enum
{
MTHCA_SEND_DOORBELL_FENCE
=
1
<<
5
};
struct
mthca_qp_path
{
__be32
port_pkey
;
u8
rnr_retry
;
...
...
@@ -1259,6 +1263,32 @@ int mthca_alloc_qp(struct mthca_dev *dev,
return
0
;
}
static
void
mthca_lock_cqs
(
struct
mthca_cq
*
send_cq
,
struct
mthca_cq
*
recv_cq
)
{
if
(
send_cq
==
recv_cq
)
spin_lock_irq
(
&
send_cq
->
lock
);
else
if
(
send_cq
->
cqn
<
recv_cq
->
cqn
)
{
spin_lock_irq
(
&
send_cq
->
lock
);
spin_lock_nested
(
&
recv_cq
->
lock
,
SINGLE_DEPTH_NESTING
);
}
else
{
spin_lock_irq
(
&
recv_cq
->
lock
);
spin_lock_nested
(
&
send_cq
->
lock
,
SINGLE_DEPTH_NESTING
);
}
}
static
void
mthca_unlock_cqs
(
struct
mthca_cq
*
send_cq
,
struct
mthca_cq
*
recv_cq
)
{
if
(
send_cq
==
recv_cq
)
spin_unlock_irq
(
&
send_cq
->
lock
);
else
if
(
send_cq
->
cqn
<
recv_cq
->
cqn
)
{
spin_unlock
(
&
recv_cq
->
lock
);
spin_unlock_irq
(
&
send_cq
->
lock
);
}
else
{
spin_unlock
(
&
send_cq
->
lock
);
spin_unlock_irq
(
&
recv_cq
->
lock
);
}
}
int
mthca_alloc_sqp
(
struct
mthca_dev
*
dev
,
struct
mthca_pd
*
pd
,
struct
mthca_cq
*
send_cq
,
...
...
@@ -1311,17 +1341,13 @@ int mthca_alloc_sqp(struct mthca_dev *dev,
* Lock CQs here, so that CQ polling code can do QP lookup
* without taking a lock.
*/
spin_lock_irq
(
&
send_cq
->
lock
);
if
(
send_cq
!=
recv_cq
)
spin_lock
(
&
recv_cq
->
lock
);
mthca_lock_cqs
(
send_cq
,
recv_cq
);
spin_lock
(
&
dev
->
qp_table
.
lock
);
mthca_array_clear
(
&
dev
->
qp_table
.
qp
,
mqpn
);
spin_unlock
(
&
dev
->
qp_table
.
lock
);
if
(
send_cq
!=
recv_cq
)
spin_unlock
(
&
recv_cq
->
lock
);
spin_unlock_irq
(
&
send_cq
->
lock
);
mthca_unlock_cqs
(
send_cq
,
recv_cq
);
err_out:
dma_free_coherent
(
&
dev
->
pdev
->
dev
,
sqp
->
header_buf_size
,
...
...
@@ -1355,9 +1381,7 @@ void mthca_free_qp(struct mthca_dev *dev,
* Lock CQs here, so that CQ polling code can do QP lookup
* without taking a lock.
*/
spin_lock_irq
(
&
send_cq
->
lock
);
if
(
send_cq
!=
recv_cq
)
spin_lock
(
&
recv_cq
->
lock
);
mthca_lock_cqs
(
send_cq
,
recv_cq
);
spin_lock
(
&
dev
->
qp_table
.
lock
);
mthca_array_clear
(
&
dev
->
qp_table
.
qp
,
...
...
@@ -1365,9 +1389,7 @@ void mthca_free_qp(struct mthca_dev *dev,
--
qp
->
refcount
;
spin_unlock
(
&
dev
->
qp_table
.
lock
);
if
(
send_cq
!=
recv_cq
)
spin_unlock
(
&
recv_cq
->
lock
);
spin_unlock_irq
(
&
send_cq
->
lock
);
mthca_unlock_cqs
(
send_cq
,
recv_cq
);
wait_event
(
qp
->
wait
,
!
get_qp_refcount
(
dev
,
qp
));
...
...
@@ -1502,7 +1524,7 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
int
i
;
int
size
;
int
size0
=
0
;
u32
f0
=
0
;
u32
f0
;
int
ind
;
u8
op0
=
0
;
...
...
@@ -1686,6 +1708,8 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
if
(
!
size0
)
{
size0
=
size
;
op0
=
mthca_opcode
[
wr
->
opcode
];
f0
=
wr
->
send_flags
&
IB_SEND_FENCE
?
MTHCA_SEND_DOORBELL_FENCE
:
0
;
}
++
ind
;
...
...
@@ -1843,7 +1867,7 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
int
i
;
int
size
;
int
size0
=
0
;
u32
f0
=
0
;
u32
f0
;
int
ind
;
u8
op0
=
0
;
...
...
@@ -2051,6 +2075,8 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
if
(
!
size0
)
{
size0
=
size
;
op0
=
mthca_opcode
[
wr
->
opcode
];
f0
=
wr
->
send_flags
&
IB_SEND_FENCE
?
MTHCA_SEND_DOORBELL_FENCE
:
0
;
}
++
ind
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录