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
0ac72664
Commit
0ac72664
authored
Mar 09, 2014
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iommu/vt-d: use dmar_insert_dev_info() from dma_add_dev_info()
Signed-off-by:
David Woodhouse
<
David.Woodhouse@intel.com
>
parent
b718cd3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
drivers/iommu/intel-iommu.c
drivers/iommu/intel-iommu.c
+7
-15
No files found.
drivers/iommu/intel-iommu.c
View file @
0ac72664
...
@@ -2452,29 +2452,21 @@ static int domain_add_dev_info(struct dmar_domain *domain,
...
@@ -2452,29 +2452,21 @@ static int domain_add_dev_info(struct dmar_domain *domain,
struct
pci_dev
*
pdev
,
struct
pci_dev
*
pdev
,
int
translation
)
int
translation
)
{
{
struct
dmar_domain
*
ndomain
;
struct
device_domain_info
*
info
;
struct
device_domain_info
*
info
;
unsigned
long
flags
;
unsigned
long
flags
;
int
ret
;
int
ret
;
info
=
alloc_devinfo_mem
();
ndomain
=
dmar_insert_dev_info
(
pci_domain_nr
(
pdev
->
bus
),
if
(
!
info
)
pdev
->
bus
->
number
,
pdev
->
devfn
,
return
-
ENOMEM
;
&
pdev
->
dev
,
domain
);
if
(
ndomain
!=
domain
)
info
->
segment
=
pci_domain_nr
(
pdev
->
bus
);
return
-
EBUSY
;
info
->
bus
=
pdev
->
bus
->
number
;
info
->
devfn
=
pdev
->
devfn
;
info
->
dev
=
&
pdev
->
dev
;
info
->
domain
=
domain
;
spin_lock_irqsave
(
&
device_domain_lock
,
flags
);
list_add
(
&
info
->
link
,
&
domain
->
devices
);
list_add
(
&
info
->
global
,
&
device_domain_list
);
pdev
->
dev
.
archdata
.
iommu
=
info
;
spin_unlock_irqrestore
(
&
device_domain_lock
,
flags
);
ret
=
domain_context_mapping
(
domain
,
pdev
,
translation
);
ret
=
domain_context_mapping
(
domain
,
pdev
,
translation
);
if
(
ret
)
{
if
(
ret
)
{
spin_lock_irqsave
(
&
device_domain_lock
,
flags
);
spin_lock_irqsave
(
&
device_domain_lock
,
flags
);
info
=
pdev
->
dev
.
archdata
.
iommu
;
unlink_domain_info
(
info
);
unlink_domain_info
(
info
);
spin_unlock_irqrestore
(
&
device_domain_lock
,
flags
);
spin_unlock_irqrestore
(
&
device_domain_lock
,
flags
);
free_devinfo_mem
(
info
);
free_devinfo_mem
(
info
);
...
...
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