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
90dcfb5e
Commit
90dcfb5e
authored
Jun 27, 2009
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
intel-iommu: Change dma_addr_level_pte() to dma_pfn_level_pte()
Signed-off-by:
David Woodhouse
<
David.Woodhouse@intel.com
>
parent
77dfa56c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
drivers/pci/intel-iommu.c
drivers/pci/intel-iommu.c
+7
-5
No files found.
drivers/pci/intel-iommu.c
View file @
90dcfb5e
...
@@ -740,8 +740,9 @@ static struct dma_pte * addr_to_dma_pte(struct dmar_domain *domain, u64 addr)
...
@@ -740,8 +740,9 @@ static struct dma_pte * addr_to_dma_pte(struct dmar_domain *domain, u64 addr)
}
}
/* return address's pte at specific level */
/* return address's pte at specific level */
static
struct
dma_pte
*
dma_addr_level_pte
(
struct
dmar_domain
*
domain
,
u64
addr
,
static
struct
dma_pte
*
dma_pfn_level_pte
(
struct
dmar_domain
*
domain
,
int
level
)
unsigned
long
pfn
,
int
level
)
{
{
struct
dma_pte
*
parent
,
*
pte
=
NULL
;
struct
dma_pte
*
parent
,
*
pte
=
NULL
;
int
total
=
agaw_to_level
(
domain
->
agaw
);
int
total
=
agaw_to_level
(
domain
->
agaw
);
...
@@ -749,7 +750,7 @@ static struct dma_pte *dma_addr_level_pte(struct dmar_domain *domain, u64 addr,
...
@@ -749,7 +750,7 @@ static struct dma_pte *dma_addr_level_pte(struct dmar_domain *domain, u64 addr,
parent
=
domain
->
pgd
;
parent
=
domain
->
pgd
;
while
(
level
<=
total
)
{
while
(
level
<=
total
)
{
offset
=
pfn_level_offset
(
addr
>>
VTD_PAGE_SHIFT
,
total
);
offset
=
pfn_level_offset
(
pfn
,
total
);
pte
=
&
parent
[
offset
];
pte
=
&
parent
[
offset
];
if
(
level
==
total
)
if
(
level
==
total
)
return
pte
;
return
pte
;
...
@@ -768,7 +769,7 @@ static void dma_pte_clear_one(struct dmar_domain *domain, u64 addr)
...
@@ -768,7 +769,7 @@ static void dma_pte_clear_one(struct dmar_domain *domain, u64 addr)
struct
dma_pte
*
pte
=
NULL
;
struct
dma_pte
*
pte
=
NULL
;
/* get last level pte */
/* get last level pte */
pte
=
dma_
addr_level_pte
(
domain
,
addr
,
1
);
pte
=
dma_
pfn_level_pte
(
domain
,
addr
>>
VTD_PAGE_SHIFT
,
1
);
if
(
pte
)
{
if
(
pte
)
{
dma_clear_pte
(
pte
);
dma_clear_pte
(
pte
);
...
@@ -817,7 +818,8 @@ static void dma_pte_free_pagetable(struct dmar_domain *domain,
...
@@ -817,7 +818,8 @@ static void dma_pte_free_pagetable(struct dmar_domain *domain,
return
;
return
;
while
(
tmp
<
end
)
{
while
(
tmp
<
end
)
{
pte
=
dma_addr_level_pte
(
domain
,
tmp
,
level
);
pte
=
dma_pfn_level_pte
(
domain
,
tmp
>>
VTD_PAGE_SHIFT
,
level
);
if
(
pte
)
{
if
(
pte
)
{
free_pgtable_page
(
free_pgtable_page
(
phys_to_virt
(
dma_pte_addr
(
pte
)));
phys_to_virt
(
dma_pte_addr
(
pte
)));
...
...
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