Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
1525a29a
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1525a29a
编写于
3月 06, 2014
作者:
D
David Woodhouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
iommu/vt-d: Make dmar_insert_dev_info() take struct device instead of struct pci_dev
Signed-off-by:
N
David Woodhouse
<
David.Woodhouse@intel.com
>
上级
3d89194a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
11 deletion
+10
-11
drivers/iommu/intel-iommu.c
drivers/iommu/intel-iommu.c
+10
-11
未找到文件。
drivers/iommu/intel-iommu.c
浏览文件 @
1525a29a
...
...
@@ -2113,15 +2113,14 @@ static void domain_remove_dev_info(struct dmar_domain *domain)
/*
* find_domain
* Note: we use struct
pci_dev->dev.
archdata.iommu stores the info
* Note: we use struct
device->
archdata.iommu stores the info
*/
static
struct
dmar_domain
*
find_domain
(
struct
pci_dev
*
pdev
)
static
struct
dmar_domain
*
find_domain
(
struct
device
*
dev
)
{
struct
device_domain_info
*
info
;
/* No lock here, assumes no domain exit in normal case */
info
=
pdev
->
dev
.
archdata
.
iommu
;
info
=
dev
->
archdata
.
iommu
;
if
(
info
)
return
info
->
domain
;
return
NULL
;
...
...
@@ -2161,7 +2160,7 @@ static int dmar_insert_dev_info(int segment, int bus, int devfn,
spin_lock_irqsave
(
&
device_domain_lock
,
flags
);
if
(
dev
)
found
=
find_domain
(
dev
);
found
=
find_domain
(
&
dev
->
dev
);
else
found
=
dmar_search_domain_by_dev_info
(
segment
,
bus
,
devfn
);
if
(
found
)
{
...
...
@@ -2193,7 +2192,7 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw)
int
bus
=
0
,
devfn
=
0
;
int
segment
;
domain
=
find_domain
(
p
dev
);
domain
=
find_domain
(
&
pdev
->
dev
);
if
(
domain
)
return
domain
;
...
...
@@ -2252,7 +2251,7 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw)
if
(
free
)
domain_exit
(
free
);
/* recheck it here, maybe others set it */
return
find_domain
(
p
dev
);
return
find_domain
(
&
pdev
->
dev
);
}
static
int
iommu_identity_mapping
;
...
...
@@ -3108,7 +3107,7 @@ static void intel_unmap_page(struct device *dev, dma_addr_t dev_addr,
if
(
iommu_no_mapping
(
dev
))
return
;
domain
=
find_domain
(
p
dev
);
domain
=
find_domain
(
dev
);
BUG_ON
(
!
domain
);
iommu
=
domain_get_iommu
(
domain
);
...
...
@@ -3200,7 +3199,7 @@ static void intel_unmap_sg(struct device *hwdev, struct scatterlist *sglist,
if
(
iommu_no_mapping
(
hwdev
))
return
;
domain
=
find_domain
(
p
dev
);
domain
=
find_domain
(
hw
dev
);
BUG_ON
(
!
domain
);
iommu
=
domain_get_iommu
(
domain
);
...
...
@@ -3808,7 +3807,7 @@ static int device_notifier(struct notifier_block *nb,
action
!=
BUS_NOTIFY_DEL_DEVICE
)
return
0
;
domain
=
find_domain
(
p
dev
);
domain
=
find_domain
(
dev
);
if
(
!
domain
)
return
0
;
...
...
@@ -4147,7 +4146,7 @@ static int intel_iommu_attach_device(struct iommu_domain *domain,
if
(
unlikely
(
domain_context_mapped
(
pdev
)))
{
struct
dmar_domain
*
old_domain
;
old_domain
=
find_domain
(
p
dev
);
old_domain
=
find_domain
(
dev
);
if
(
old_domain
)
{
if
(
dmar_domain
->
flags
&
DOMAIN_FLAG_VIRTUAL_MACHINE
||
dmar_domain
->
flags
&
DOMAIN_FLAG_STATIC_IDENTITY
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录