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
nexedi
linux
Commits
063071df
Commit
063071df
authored
May 28, 2015
by
Joerg Roedel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iommu/amd: Use default domain if available for DMA-API
Signed-off-by:
Joerg Roedel
<
jroedel@suse.de
>
parent
35cf248f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
drivers/iommu/amd_iommu.c
drivers/iommu/amd_iommu.c
+7
-0
No files found.
drivers/iommu/amd_iommu.c
View file @
063071df
...
...
@@ -2495,12 +2495,19 @@ void amd_iommu_init_notifier(void)
static
struct
protection_domain
*
get_domain
(
struct
device
*
dev
)
{
struct
protection_domain
*
domain
;
struct
iommu_domain
*
io_domain
;
struct
dma_ops_domain
*
dma_dom
;
u16
devid
=
get_device_id
(
dev
);
if
(
!
check_device
(
dev
))
return
ERR_PTR
(
-
EINVAL
);
io_domain
=
iommu_get_domain_for_dev
(
dev
);
if
(
io_domain
)
{
domain
=
to_pdomain
(
io_domain
);
return
domain
;
}
domain
=
domain_for_device
(
dev
);
if
(
domain
!=
NULL
&&
!
dma_ops_domain
(
domain
))
return
ERR_PTR
(
-
EBUSY
);
...
...
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