Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
bf9c9eda
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看板
提交
bf9c9eda
编写于
3月 09, 2014
作者:
D
David Woodhouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
iommu/vt-d: Make domain_remove_one_dev_info() take struct device
Signed-off-by:
N
David Woodhouse
<
David.Woodhouse@intel.com
>
上级
5040a918
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
14 deletion
+11
-14
drivers/iommu/intel-iommu.c
drivers/iommu/intel-iommu.c
+11
-14
未找到文件。
drivers/iommu/intel-iommu.c
浏览文件 @
bf9c9eda
...
...
@@ -425,7 +425,7 @@ static long list_size;
static
void
domain_exit
(
struct
dmar_domain
*
domain
);
static
void
domain_remove_dev_info
(
struct
dmar_domain
*
domain
);
static
void
domain_remove_one_dev_info
(
struct
dmar_domain
*
domain
,
struct
pci_dev
*
p
dev
);
struct
device
*
dev
);
static
void
iommu_detach_dependent_devices
(
struct
intel_iommu
*
iommu
,
struct
device
*
dev
);
...
...
@@ -2488,7 +2488,7 @@ static int domain_add_dev_info(struct dmar_domain *domain,
ret
=
domain_context_mapping
(
domain
,
&
pdev
->
dev
,
translation
);
if
(
ret
)
{
domain_remove_one_dev_info
(
domain
,
p
dev
);
domain_remove_one_dev_info
(
domain
,
&
pdev
->
dev
);
return
ret
;
}
...
...
@@ -2928,7 +2928,7 @@ static int iommu_no_mapping(struct device *dev)
* 32 bit DMA is removed from si_domain and fall back
* to non-identity mapping.
*/
domain_remove_one_dev_info
(
si_domain
,
p
dev
);
domain_remove_one_dev_info
(
si_domain
,
dev
);
printk
(
KERN_INFO
"32bit %s uses non-identity mapping
\n
"
,
pci_name
(
pdev
));
return
0
;
...
...
@@ -3810,7 +3810,6 @@ static int device_notifier(struct notifier_block *nb,
unsigned
long
action
,
void
*
data
)
{
struct
device
*
dev
=
data
;
struct
pci_dev
*
pdev
=
to_pci_dev
(
dev
);
struct
dmar_domain
*
domain
;
if
(
iommu_dummy
(
dev
))
...
...
@@ -3825,7 +3824,7 @@ static int device_notifier(struct notifier_block *nb,
return
0
;
down_read
(
&
dmar_global_lock
);
domain_remove_one_dev_info
(
domain
,
p
dev
);
domain_remove_one_dev_info
(
domain
,
dev
);
if
(
!
(
domain
->
flags
&
DOMAIN_FLAG_VIRTUAL_MACHINE
)
&&
!
(
domain
->
flags
&
DOMAIN_FLAG_STATIC_IDENTITY
)
&&
list_empty
(
&
domain
->
devices
))
...
...
@@ -4027,7 +4026,7 @@ static void iommu_detach_dependent_devices(struct intel_iommu *iommu,
}
static
void
domain_remove_one_dev_info
(
struct
dmar_domain
*
domain
,
struct
pci_dev
*
p
dev
)
struct
device
*
dev
)
{
struct
device_domain_info
*
info
,
*
tmp
;
struct
intel_iommu
*
iommu
;
...
...
@@ -4035,21 +4034,20 @@ static void domain_remove_one_dev_info(struct dmar_domain *domain,
int
found
=
0
;
u8
bus
,
devfn
;
iommu
=
device_to_iommu
(
&
pdev
->
dev
,
&
bus
,
&
devfn
);
iommu
=
device_to_iommu
(
dev
,
&
bus
,
&
devfn
);
if
(
!
iommu
)
return
;
spin_lock_irqsave
(
&
device_domain_lock
,
flags
);
list_for_each_entry_safe
(
info
,
tmp
,
&
domain
->
devices
,
link
)
{
if
(
info
->
iommu
->
segment
==
pci_domain_nr
(
pdev
->
bus
)
&&
info
->
bus
==
pdev
->
bus
->
number
&&
info
->
devfn
==
pdev
->
devfn
)
{
if
(
info
->
iommu
==
iommu
&&
info
->
bus
==
bus
&&
info
->
devfn
==
devfn
)
{
unlink_domain_info
(
info
);
spin_unlock_irqrestore
(
&
device_domain_lock
,
flags
);
iommu_disable_dev_iotlb
(
info
);
iommu_detach_dev
(
iommu
,
info
->
bus
,
info
->
devfn
);
iommu_detach_dependent_devices
(
iommu
,
&
pdev
->
dev
);
iommu_detach_dependent_devices
(
iommu
,
dev
);
free_devinfo_mem
(
info
);
spin_lock_irqsave
(
&
device_domain_lock
,
flags
);
...
...
@@ -4165,7 +4163,7 @@ static int intel_iommu_attach_device(struct iommu_domain *domain,
if
(
old_domain
)
{
if
(
dmar_domain
->
flags
&
DOMAIN_FLAG_VIRTUAL_MACHINE
||
dmar_domain
->
flags
&
DOMAIN_FLAG_STATIC_IDENTITY
)
domain_remove_one_dev_info
(
old_domain
,
p
dev
);
domain_remove_one_dev_info
(
old_domain
,
dev
);
else
domain_remove_dev_info
(
old_domain
);
}
...
...
@@ -4210,9 +4208,8 @@ static void intel_iommu_detach_device(struct iommu_domain *domain,
struct
device
*
dev
)
{
struct
dmar_domain
*
dmar_domain
=
domain
->
priv
;
struct
pci_dev
*
pdev
=
to_pci_dev
(
dev
);
domain_remove_one_dev_info
(
dmar_domain
,
p
dev
);
domain_remove_one_dev_info
(
dmar_domain
,
dev
);
}
static
int
intel_iommu_map
(
struct
iommu_domain
*
domain
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录