Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
1a70a05d
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
1a70a05d
编写于
5月 06, 2007
作者:
R
Roland Dreier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
IB/fmr_pool: Add prefix to all printks
Signed-off-by:
N
Roland Dreier
<
rolandd@cisco.com
>
上级
b7f008fd
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
15 deletion
+17
-15
drivers/infiniband/core/fmr_pool.c
drivers/infiniband/core/fmr_pool.c
+17
-15
未找到文件。
drivers/infiniband/core/fmr_pool.c
浏览文件 @
1a70a05d
...
...
@@ -43,6 +43,8 @@
#include "core_priv.h"
#define PFX "fmr_pool: "
enum
{
IB_FMR_MAX_REMAPS
=
32
,
...
...
@@ -150,7 +152,7 @@ static void ib_fmr_batch_release(struct ib_fmr_pool *pool)
#ifdef DEBUG
if
(
fmr
->
ref_count
!=
0
)
{
printk
(
KERN_WARNING
"Unmapping FMR 0x%08x with ref count %d"
,
printk
(
KERN_WARNING
PFX
"Unmapping FMR 0x%08x with ref count %d"
,
fmr
,
fmr
->
ref_count
);
}
#endif
...
...
@@ -168,7 +170,7 @@ static void ib_fmr_batch_release(struct ib_fmr_pool *pool)
ret
=
ib_unmap_fmr
(
&
fmr_list
);
if
(
ret
)
printk
(
KERN_WARNING
"ib_unmap_fmr returned %d"
,
ret
);
printk
(
KERN_WARNING
PFX
"ib_unmap_fmr returned %d"
,
ret
);
spin_lock_irq
(
&
pool
->
pool_lock
);
list_splice
(
&
unmap_list
,
&
pool
->
free_list
);
...
...
@@ -226,20 +228,20 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
device
=
pd
->
device
;
if
(
!
device
->
alloc_fmr
||
!
device
->
dealloc_fmr
||
!
device
->
map_phys_fmr
||
!
device
->
unmap_fmr
)
{
printk
(
KERN_
WARNING
"Device %s does not support fast memory regions
"
,
printk
(
KERN_
INFO
PFX
"Device %s does not support FMRs
\n
"
,
device
->
name
);
return
ERR_PTR
(
-
ENOSYS
);
}
attr
=
kmalloc
(
sizeof
*
attr
,
GFP_KERNEL
);
if
(
!
attr
)
{
printk
(
KERN_WARNING
"couldn't allocate device attr struct"
);
printk
(
KERN_WARNING
PFX
"couldn't allocate device attr struct"
);
return
ERR_PTR
(
-
ENOMEM
);
}
ret
=
ib_query_device
(
device
,
attr
);
if
(
ret
)
{
printk
(
KERN_WARNING
"couldn't query device"
);
printk
(
KERN_WARNING
PFX
"couldn't query device: %d"
,
ret
);
kfree
(
attr
);
return
ERR_PTR
(
ret
);
}
...
...
@@ -253,7 +255,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
pool
=
kmalloc
(
sizeof
*
pool
,
GFP_KERNEL
);
if
(
!
pool
)
{
printk
(
KERN_WARNING
"couldn't allocate pool struct"
);
printk
(
KERN_WARNING
PFX
"couldn't allocate pool struct"
);
return
ERR_PTR
(
-
ENOMEM
);
}
...
...
@@ -270,7 +272,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
kmalloc
(
IB_FMR_HASH_SIZE
*
sizeof
*
pool
->
cache_bucket
,
GFP_KERNEL
);
if
(
!
pool
->
cache_bucket
)
{
printk
(
KERN_WARNING
"Failed to allocate cache in pool"
);
printk
(
KERN_WARNING
PFX
"Failed to allocate cache in pool"
);
ret
=
-
ENOMEM
;
goto
out_free_pool
;
}
...
...
@@ -294,7 +296,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
"ib_fmr(%s)"
,
device
->
name
);
if
(
IS_ERR
(
pool
->
thread
))
{
printk
(
KERN_WARNING
"couldn't start cleanup thread"
);
printk
(
KERN_WARNING
PFX
"couldn't start cleanup thread"
);
ret
=
PTR_ERR
(
pool
->
thread
);
goto
out_free_pool
;
}
...
...
@@ -311,8 +313,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
fmr
=
kmalloc
(
sizeof
*
fmr
+
params
->
max_pages_per_fmr
*
sizeof
(
u64
),
GFP_KERNEL
);
if
(
!
fmr
)
{
printk
(
KERN_WARNING
"failed to allocate fmr struct
"
"for FMR %d"
,
i
);
printk
(
KERN_WARNING
PFX
"failed to allocate fmr
"
"
struct
for FMR %d"
,
i
);
goto
out_fail
;
}
...
...
@@ -323,7 +325,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
fmr
->
fmr
=
ib_alloc_fmr
(
pd
,
params
->
access
,
&
fmr_attr
);
if
(
IS_ERR
(
fmr
->
fmr
))
{
printk
(
KERN_WARNING
"fmr_create failed for FMR %d"
,
i
);
printk
(
KERN_WARNING
PFX
"fmr_create failed "
"for FMR %d"
,
i
);
kfree
(
fmr
);
goto
out_fail
;
}
...
...
@@ -378,7 +381,7 @@ void ib_destroy_fmr_pool(struct ib_fmr_pool *pool)
}
if
(
i
<
pool
->
pool_size
)
printk
(
KERN_WARNING
"pool still has %d regions registered"
,
printk
(
KERN_WARNING
PFX
"pool still has %d regions registered"
,
pool
->
pool_size
-
i
);
kfree
(
pool
->
cache_bucket
);
...
...
@@ -463,8 +466,7 @@ struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle,
list_add
(
&
fmr
->
list
,
&
pool
->
free_list
);
spin_unlock_irqrestore
(
&
pool
->
pool_lock
,
flags
);
printk
(
KERN_WARNING
"fmr_map returns %d
\n
"
,
result
);
printk
(
KERN_WARNING
PFX
"fmr_map returns %d
\n
"
,
result
);
return
ERR_PTR
(
result
);
}
...
...
@@ -516,7 +518,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
#ifdef DEBUG
if
(
fmr
->
ref_count
<
0
)
printk
(
KERN_WARNING
"FMR %p has ref count %d < 0"
,
printk
(
KERN_WARNING
PFX
"FMR %p has ref count %d < 0"
,
fmr
,
fmr
->
ref_count
);
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录