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
f0c5b592
Commit
f0c5b592
authored
Nov 25, 2011
by
Cong Wang
Committed by
Cong Wang
Mar 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gma500: remove the second argument of k[un]map_atomic()
Signed-off-by:
Cong Wang
<
amwang@redhat.com
>
parent
c2e022cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
drivers/gpu/drm/gma500/mmu.c
drivers/gpu/drm/gma500/mmu.c
+15
-15
No files found.
drivers/gpu/drm/gma500/mmu.c
View file @
f0c5b592
...
@@ -125,14 +125,14 @@ static void psb_page_clflush(struct psb_mmu_driver *driver, struct page* page)
...
@@ -125,14 +125,14 @@ static void psb_page_clflush(struct psb_mmu_driver *driver, struct page* page)
int
i
;
int
i
;
uint8_t
*
clf
;
uint8_t
*
clf
;
clf
=
kmap_atomic
(
page
,
KM_USER0
);
clf
=
kmap_atomic
(
page
);
mb
();
mb
();
for
(
i
=
0
;
i
<
clflush_count
;
++
i
)
{
for
(
i
=
0
;
i
<
clflush_count
;
++
i
)
{
psb_clflush
(
clf
);
psb_clflush
(
clf
);
clf
+=
clflush_add
;
clf
+=
clflush_add
;
}
}
mb
();
mb
();
kunmap_atomic
(
clf
,
KM_USER0
);
kunmap_atomic
(
clf
);
}
}
static
void
psb_pages_clflush
(
struct
psb_mmu_driver
*
driver
,
static
void
psb_pages_clflush
(
struct
psb_mmu_driver
*
driver
,
...
@@ -325,7 +325,7 @@ static struct psb_mmu_pt *psb_mmu_alloc_pt(struct psb_mmu_pd *pd)
...
@@ -325,7 +325,7 @@ static struct psb_mmu_pt *psb_mmu_alloc_pt(struct psb_mmu_pd *pd)
spin_lock
(
lock
);
spin_lock
(
lock
);
v
=
kmap_atomic
(
pt
->
p
,
KM_USER0
);
v
=
kmap_atomic
(
pt
->
p
);
clf
=
(
uint8_t
*
)
v
;
clf
=
(
uint8_t
*
)
v
;
ptes
=
(
uint32_t
*
)
v
;
ptes
=
(
uint32_t
*
)
v
;
for
(
i
=
0
;
i
<
(
PAGE_SIZE
/
sizeof
(
uint32_t
));
++
i
)
for
(
i
=
0
;
i
<
(
PAGE_SIZE
/
sizeof
(
uint32_t
));
++
i
)
...
@@ -341,7 +341,7 @@ static struct psb_mmu_pt *psb_mmu_alloc_pt(struct psb_mmu_pd *pd)
...
@@ -341,7 +341,7 @@ static struct psb_mmu_pt *psb_mmu_alloc_pt(struct psb_mmu_pd *pd)
mb
();
mb
();
}
}
kunmap_atomic
(
v
,
KM_USER0
);
kunmap_atomic
(
v
);
spin_unlock
(
lock
);
spin_unlock
(
lock
);
pt
->
count
=
0
;
pt
->
count
=
0
;
...
@@ -376,18 +376,18 @@ struct psb_mmu_pt *psb_mmu_pt_alloc_map_lock(struct psb_mmu_pd *pd,
...
@@ -376,18 +376,18 @@ struct psb_mmu_pt *psb_mmu_pt_alloc_map_lock(struct psb_mmu_pd *pd,
continue
;
continue
;
}
}
v
=
kmap_atomic
(
pd
->
p
,
KM_USER0
);
v
=
kmap_atomic
(
pd
->
p
);
pd
->
tables
[
index
]
=
pt
;
pd
->
tables
[
index
]
=
pt
;
v
[
index
]
=
(
page_to_pfn
(
pt
->
p
)
<<
12
)
|
pd
->
pd_mask
;
v
[
index
]
=
(
page_to_pfn
(
pt
->
p
)
<<
12
)
|
pd
->
pd_mask
;
pt
->
index
=
index
;
pt
->
index
=
index
;
kunmap_atomic
((
void
*
)
v
,
KM_USER0
);
kunmap_atomic
((
void
*
)
v
);
if
(
pd
->
hw_context
!=
-
1
)
{
if
(
pd
->
hw_context
!=
-
1
)
{
psb_mmu_clflush
(
pd
->
driver
,
(
void
*
)
&
v
[
index
]);
psb_mmu_clflush
(
pd
->
driver
,
(
void
*
)
&
v
[
index
]);
atomic_set
(
&
pd
->
driver
->
needs_tlbflush
,
1
);
atomic_set
(
&
pd
->
driver
->
needs_tlbflush
,
1
);
}
}
}
}
pt
->
v
=
kmap_atomic
(
pt
->
p
,
KM_USER0
);
pt
->
v
=
kmap_atomic
(
pt
->
p
);
return
pt
;
return
pt
;
}
}
...
@@ -404,7 +404,7 @@ static struct psb_mmu_pt *psb_mmu_pt_map_lock(struct psb_mmu_pd *pd,
...
@@ -404,7 +404,7 @@ static struct psb_mmu_pt *psb_mmu_pt_map_lock(struct psb_mmu_pd *pd,
spin_unlock
(
lock
);
spin_unlock
(
lock
);
return
NULL
;
return
NULL
;
}
}
pt
->
v
=
kmap_atomic
(
pt
->
p
,
KM_USER0
);
pt
->
v
=
kmap_atomic
(
pt
->
p
);
return
pt
;
return
pt
;
}
}
...
@@ -413,9 +413,9 @@ static void psb_mmu_pt_unmap_unlock(struct psb_mmu_pt *pt)
...
@@ -413,9 +413,9 @@ static void psb_mmu_pt_unmap_unlock(struct psb_mmu_pt *pt)
struct
psb_mmu_pd
*
pd
=
pt
->
pd
;
struct
psb_mmu_pd
*
pd
=
pt
->
pd
;
uint32_t
*
v
;
uint32_t
*
v
;
kunmap_atomic
(
pt
->
v
,
KM_USER0
);
kunmap_atomic
(
pt
->
v
);
if
(
pt
->
count
==
0
)
{
if
(
pt
->
count
==
0
)
{
v
=
kmap_atomic
(
pd
->
p
,
KM_USER0
);
v
=
kmap_atomic
(
pd
->
p
);
v
[
pt
->
index
]
=
pd
->
invalid_pde
;
v
[
pt
->
index
]
=
pd
->
invalid_pde
;
pd
->
tables
[
pt
->
index
]
=
NULL
;
pd
->
tables
[
pt
->
index
]
=
NULL
;
...
@@ -424,7 +424,7 @@ static void psb_mmu_pt_unmap_unlock(struct psb_mmu_pt *pt)
...
@@ -424,7 +424,7 @@ static void psb_mmu_pt_unmap_unlock(struct psb_mmu_pt *pt)
(
void
*
)
&
v
[
pt
->
index
]);
(
void
*
)
&
v
[
pt
->
index
]);
atomic_set
(
&
pd
->
driver
->
needs_tlbflush
,
1
);
atomic_set
(
&
pd
->
driver
->
needs_tlbflush
,
1
);
}
}
kunmap_atomic
(
pt
->
v
,
KM_USER0
);
kunmap_atomic
(
pt
->
v
);
spin_unlock
(
&
pd
->
driver
->
lock
);
spin_unlock
(
&
pd
->
driver
->
lock
);
psb_mmu_free_pt
(
pt
);
psb_mmu_free_pt
(
pt
);
return
;
return
;
...
@@ -457,7 +457,7 @@ void psb_mmu_mirror_gtt(struct psb_mmu_pd *pd,
...
@@ -457,7 +457,7 @@ void psb_mmu_mirror_gtt(struct psb_mmu_pd *pd,
down_read
(
&
driver
->
sem
);
down_read
(
&
driver
->
sem
);
spin_lock
(
&
driver
->
lock
);
spin_lock
(
&
driver
->
lock
);
v
=
kmap_atomic
(
pd
->
p
,
KM_USER0
);
v
=
kmap_atomic
(
pd
->
p
);
v
+=
start
;
v
+=
start
;
while
(
gtt_pages
--
)
{
while
(
gtt_pages
--
)
{
...
@@ -467,7 +467,7 @@ void psb_mmu_mirror_gtt(struct psb_mmu_pd *pd,
...
@@ -467,7 +467,7 @@ void psb_mmu_mirror_gtt(struct psb_mmu_pd *pd,
/*ttm_tt_cache_flush(&pd->p, num_pages);*/
/*ttm_tt_cache_flush(&pd->p, num_pages);*/
psb_pages_clflush
(
pd
->
driver
,
&
pd
->
p
,
num_pages
);
psb_pages_clflush
(
pd
->
driver
,
&
pd
->
p
,
num_pages
);
kunmap_atomic
(
v
,
KM_USER0
);
kunmap_atomic
(
v
);
spin_unlock
(
&
driver
->
lock
);
spin_unlock
(
&
driver
->
lock
);
if
(
pd
->
hw_context
!=
-
1
)
if
(
pd
->
hw_context
!=
-
1
)
...
@@ -830,9 +830,9 @@ int psb_mmu_virtual_to_pfn(struct psb_mmu_pd *pd, uint32_t virtual,
...
@@ -830,9 +830,9 @@ int psb_mmu_virtual_to_pfn(struct psb_mmu_pd *pd, uint32_t virtual,
uint32_t
*
v
;
uint32_t
*
v
;
spin_lock
(
lock
);
spin_lock
(
lock
);
v
=
kmap_atomic
(
pd
->
p
,
KM_USER0
);
v
=
kmap_atomic
(
pd
->
p
);
tmp
=
v
[
psb_mmu_pd_index
(
virtual
)];
tmp
=
v
[
psb_mmu_pd_index
(
virtual
)];
kunmap_atomic
(
v
,
KM_USER0
);
kunmap_atomic
(
v
);
spin_unlock
(
lock
);
spin_unlock
(
lock
);
if
(
tmp
!=
pd
->
invalid_pde
||
!
(
tmp
&
PSB_PTE_VALID
)
||
if
(
tmp
!=
pd
->
invalid_pde
||
!
(
tmp
&
PSB_PTE_VALID
)
||
...
...
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