Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
5d450806
Commit
5d450806
authored
Dec 03, 2008
by
Joerg Roedel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VT-d: adapt domain init and destroy functions for IOMMU API
Signed-off-by:
Joerg Roedel
<
joerg.roedel@amd.com
>
parent
19de40a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
+18
-17
drivers/pci/intel-iommu.c
drivers/pci/intel-iommu.c
+18
-15
include/linux/intel-iommu.h
include/linux/intel-iommu.h
+0
-2
No files found.
drivers/pci/intel-iommu.c
View file @
5d450806
...
...
@@ -34,6 +34,7 @@
#include <linux/mempool.h>
#include <linux/timer.h>
#include <linux/iova.h>
#include <linux/iommu.h>
#include <linux/intel-iommu.h>
#include <asm/cacheflush.h>
#include <asm/iommu.h>
...
...
@@ -2962,32 +2963,34 @@ static void vm_domain_exit(struct dmar_domain *domain)
free_domain_mem
(
domain
);
}
st
ruct
dmar_domain
*
intel_iommu_alloc_domain
(
void
)
st
atic
int
intel_iommu_domain_init
(
struct
iommu_domain
*
domain
)
{
struct
dmar_domain
*
domain
;
struct
dmar_domain
*
d
mar_d
omain
;
domain
=
iommu_alloc_vm_domain
();
if
(
!
domain
)
{
d
mar_d
omain
=
iommu_alloc_vm_domain
();
if
(
!
d
mar_d
omain
)
{
printk
(
KERN_ERR
"intel_iommu_domain_
alloc:
domain == NULL
\n
"
);
return
NULL
;
"intel_iommu_domain_
init: dmar_
domain == NULL
\n
"
);
return
-
ENOMEM
;
}
if
(
vm_domain_init
(
domain
,
DEFAULT_DOMAIN_ADDRESS_WIDTH
))
{
if
(
vm_domain_init
(
d
mar_d
omain
,
DEFAULT_DOMAIN_ADDRESS_WIDTH
))
{
printk
(
KERN_ERR
"intel_iommu_domain_
alloc: domain_
init() failed
\n
"
);
vm_domain_exit
(
domain
);
return
NULL
;
"intel_iommu_domain_init() failed
\n
"
);
vm_domain_exit
(
d
mar_d
omain
);
return
-
ENOMEM
;
}
domain
->
priv
=
dmar_domain
;
return
domain
;
return
0
;
}
EXPORT_SYMBOL_GPL
(
intel_iommu_alloc_domain
);
void
intel_iommu_free_domain
(
struct
dmar
_domain
*
domain
)
static
void
intel_iommu_domain_destroy
(
struct
iommu
_domain
*
domain
)
{
vm_domain_exit
(
domain
);
struct
dmar_domain
*
dmar_domain
=
domain
->
priv
;
domain
->
priv
=
NULL
;
vm_domain_exit
(
dmar_domain
);
}
EXPORT_SYMBOL_GPL
(
intel_iommu_free_domain
);
int
intel_iommu_attach_device
(
struct
dmar_domain
*
domain
,
struct
pci_dev
*
pdev
)
...
...
include/linux/intel-iommu.h
View file @
5d450806
...
...
@@ -330,8 +330,6 @@ extern int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr,
extern
void
qi_submit_sync
(
struct
qi_desc
*
desc
,
struct
intel_iommu
*
iommu
);
struct
dmar_domain
*
intel_iommu_alloc_domain
(
void
);
void
intel_iommu_free_domain
(
struct
dmar_domain
*
domain
);
int
intel_iommu_attach_device
(
struct
dmar_domain
*
domain
,
struct
pci_dev
*
pdev
);
void
intel_iommu_detach_device
(
struct
dmar_domain
*
domain
,
...
...
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