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
Kirill Smelkov
linux
Commits
7c242026
Commit
7c242026
authored
Mar 12, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: hash_page/flush_hash_page rewrite: reformatting
parent
a073817c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
arch/ppc64/kernel/htab.c
arch/ppc64/kernel/htab.c
+17
-14
No files found.
arch/ppc64/kernel/htab.c
View file @
7c242026
...
@@ -846,12 +846,12 @@ int hash_page(unsigned long ea, unsigned long access)
...
@@ -846,12 +846,12 @@ int hash_page(unsigned long ea, unsigned long access)
va
=
(
vsid
<<
28
)
|
(
ea
&
0x0fffffff
);
va
=
(
vsid
<<
28
)
|
(
ea
&
0x0fffffff
);
vpn
=
va
>>
PAGE_SHIFT
;
vpn
=
va
>>
PAGE_SHIFT
;
pgdir
=
mm
->
pgd
;
pgdir
=
mm
->
pgd
;
PPCDBG
(
PPCDBG_MM
,
"hash_page ea = 0x%16.16lx, va = 0x%16.16lx
\n
current = 0x%16.16lx, access = %lx
\n
"
,
ea
,
va
,
current
,
access
);
if
(
pgdir
==
NULL
)
{
if
(
pgdir
==
NULL
)
return
1
;
return
1
;
}
/*
/
* Lock the Linux page table to prevent mmap and kswapd
* Lock the Linux page table to prevent mmap and kswapd
* from modifying entries while we search and update
* from modifying entries while we search and update
*/
*/
...
@@ -1044,7 +1044,6 @@ int hash_page(unsigned long ea, unsigned long access)
...
@@ -1044,7 +1044,6 @@ int hash_page(unsigned long ea, unsigned long access)
void
flush_hash_page
(
unsigned
long
context
,
unsigned
long
ea
,
pte_t
pte
)
void
flush_hash_page
(
unsigned
long
context
,
unsigned
long
ea
,
pte_t
pte
)
{
{
unsigned
long
vsid
,
vpn
,
va
,
hash
,
secondary
,
slot
,
flags
;
unsigned
long
vsid
,
vpn
,
va
,
hash
,
secondary
,
slot
,
flags
;
/* Local copy of first doubleword of HPTE */
union
{
union
{
unsigned
long
d
;
unsigned
long
d
;
Hpte_dword0
h
;
Hpte_dword0
h
;
...
@@ -1063,17 +1062,21 @@ void flush_hash_page(unsigned long context, unsigned long ea, pte_t pte)
...
@@ -1063,17 +1062,21 @@ void flush_hash_page(unsigned long context, unsigned long ea, pte_t pte)
hash
=
~
hash
;
hash
=
~
hash
;
slot
=
(
hash
&
htab_data
.
htab_hash_mask
)
*
HPTES_PER_GROUP
;
slot
=
(
hash
&
htab_data
.
htab_hash_mask
)
*
HPTES_PER_GROUP
;
slot
+=
(
pte_val
(
pte
)
&
_PAGE_GROUP_IX
)
>>
12
;
slot
+=
(
pte_val
(
pte
)
&
_PAGE_GROUP_IX
)
>>
12
;
/* If there is an HPTE for this page it is indexed by slot */
spin_lock_irqsave
(
&
hash_table_lock
,
flags
);
spin_lock_irqsave
(
&
hash_table_lock
,
flags
);
hpte_dw0
.
d
=
ppc_md
.
hpte_getword0
(
slot
);
/*
if
(
(
hpte_dw0
.
h
.
avpn
==
(
vpn
>>
11
)
)
&&
* Id prefer to flush even if our hpte was stolen, but the new
(
hpte_dw0
.
h
.
v
)
&&
* entry could be bolted - Anton
(
hpte_dw0
.
h
.
h
==
secondary
)
){
*/
hpte_dw0
.
d
=
ppc_md
.
hpte_getword0
(
slot
);
if
((
hpte_dw0
.
h
.
avpn
==
(
vpn
>>
11
))
&&
(
hpte_dw0
.
h
.
v
)
&&
(
hpte_dw0
.
h
.
h
==
secondary
)){
/* HPTE matches */
/* HPTE matches */
ppc_md
.
hpte_invalidate
(
slot
);
ppc_md
.
hpte_invalidate
(
slot
);
}
}
spin_unlock_irqrestore
(
&
hash_table_lock
,
flags
);
spin_unlock_irqrestore
(
&
hash_table_lock
,
flags
);
}
}
int
proc_dol2crvec
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
int
proc_dol2crvec
(
ctl_table
*
table
,
int
write
,
struct
file
*
filp
,
...
...
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