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
7d9fa4aa
Commit
7d9fa4aa
authored
May 12, 2012
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sparc32: Un-btfixup pgd_{none,bad,present}.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
6439d1c6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
22 deletions
+16
-22
arch/sparc/include/asm/pgtable_32.h
arch/sparc/include/asm/pgtable_32.h
+13
-6
arch/sparc/mm/srmmu.c
arch/sparc/mm/srmmu.c
+3
-16
No files found.
arch/sparc/include/asm/pgtable_32.h
View file @
7d9fa4aa
...
@@ -171,13 +171,20 @@ static inline void pmd_clear(pmd_t *pmdp)
...
@@ -171,13 +171,20 @@ static inline void pmd_clear(pmd_t *pmdp)
srmmu_set_pte
((
pte_t
*
)
&
pmdp
->
pmdv
[
i
],
__pte
(
0
));
srmmu_set_pte
((
pte_t
*
)
&
pmdp
->
pmdv
[
i
],
__pte
(
0
));
}
}
BTFIXUPDEF_CALL_CONST
(
int
,
pgd_none
,
pgd_t
)
static
inline
int
pgd_none
(
pgd_t
pgd
)
BTFIXUPDEF_CALL_CONST
(
int
,
pgd_bad
,
pgd_t
)
{
BTFIXUPDEF_CALL_CONST
(
int
,
pgd_present
,
pgd_t
)
return
!
(
pgd_val
(
pgd
)
&
0xFFFFFFF
);
}
#define pgd_none(pgd) BTFIXUP_CALL(pgd_none)(pgd)
static
inline
int
pgd_bad
(
pgd_t
pgd
)
#define pgd_bad(pgd) BTFIXUP_CALL(pgd_bad)(pgd)
{
#define pgd_present(pgd) BTFIXUP_CALL(pgd_present)(pgd)
return
(
pgd_val
(
pgd
)
&
SRMMU_ET_MASK
)
!=
SRMMU_ET_PTD
;
}
static
inline
int
pgd_present
(
pgd_t
pgd
)
{
return
((
pgd_val
(
pgd
)
&
SRMMU_ET_MASK
)
==
SRMMU_ET_PTD
);
}
static
inline
void
pgd_clear
(
pgd_t
*
pgdp
)
static
inline
void
pgd_clear
(
pgd_t
*
pgdp
)
{
{
...
...
arch/sparc/mm/srmmu.c
View file @
7d9fa4aa
...
@@ -124,15 +124,6 @@ static inline int srmmu_pmd_bad(pmd_t pmd)
...
@@ -124,15 +124,6 @@ static inline int srmmu_pmd_bad(pmd_t pmd)
static
inline
int
srmmu_pmd_present
(
pmd_t
pmd
)
static
inline
int
srmmu_pmd_present
(
pmd_t
pmd
)
{
return
((
pmd_val
(
pmd
)
&
SRMMU_ET_MASK
)
==
SRMMU_ET_PTD
);
}
{
return
((
pmd_val
(
pmd
)
&
SRMMU_ET_MASK
)
==
SRMMU_ET_PTD
);
}
static
inline
int
srmmu_pgd_none
(
pgd_t
pgd
)
{
return
!
(
pgd_val
(
pgd
)
&
0xFFFFFFF
);
}
static
inline
int
srmmu_pgd_bad
(
pgd_t
pgd
)
{
return
(
pgd_val
(
pgd
)
&
SRMMU_ET_MASK
)
!=
SRMMU_ET_PTD
;
}
static
inline
int
srmmu_pgd_present
(
pgd_t
pgd
)
{
return
((
pgd_val
(
pgd
)
&
SRMMU_ET_MASK
)
==
SRMMU_ET_PTD
);
}
static
inline
pte_t
srmmu_pte_wrprotect
(
pte_t
pte
)
static
inline
pte_t
srmmu_pte_wrprotect
(
pte_t
pte
)
{
return
__pte
(
pte_val
(
pte
)
&
~
SRMMU_WRITE
);}
{
return
__pte
(
pte_val
(
pte
)
&
~
SRMMU_WRITE
);}
...
@@ -1007,7 +998,7 @@ static void __init srmmu_early_allocate_ptable_skeleton(unsigned long start,
...
@@ -1007,7 +998,7 @@ static void __init srmmu_early_allocate_ptable_skeleton(unsigned long start,
while
(
start
<
end
)
{
while
(
start
<
end
)
{
pgdp
=
pgd_offset_k
(
start
);
pgdp
=
pgd_offset_k
(
start
);
if
(
srmmu_
pgd_none
(
*
(
pgd_t
*
)
__nocache_fix
(
pgdp
)))
{
if
(
pgd_none
(
*
(
pgd_t
*
)
__nocache_fix
(
pgdp
)))
{
pmdp
=
(
pmd_t
*
)
__srmmu_get_nocache
(
pmdp
=
(
pmd_t
*
)
__srmmu_get_nocache
(
SRMMU_PMD_TABLE_SIZE
,
SRMMU_PMD_TABLE_SIZE
);
SRMMU_PMD_TABLE_SIZE
,
SRMMU_PMD_TABLE_SIZE
);
if
(
pmdp
==
NULL
)
if
(
pmdp
==
NULL
)
...
@@ -1038,7 +1029,7 @@ static void __init srmmu_allocate_ptable_skeleton(unsigned long start,
...
@@ -1038,7 +1029,7 @@ static void __init srmmu_allocate_ptable_skeleton(unsigned long start,
while
(
start
<
end
)
{
while
(
start
<
end
)
{
pgdp
=
pgd_offset_k
(
start
);
pgdp
=
pgd_offset_k
(
start
);
if
(
srmmu_
pgd_none
(
*
pgdp
))
{
if
(
pgd_none
(
*
pgdp
))
{
pmdp
=
(
pmd_t
*
)
__srmmu_get_nocache
(
SRMMU_PMD_TABLE_SIZE
,
SRMMU_PMD_TABLE_SIZE
);
pmdp
=
(
pmd_t
*
)
__srmmu_get_nocache
(
SRMMU_PMD_TABLE_SIZE
,
SRMMU_PMD_TABLE_SIZE
);
if
(
pmdp
==
NULL
)
if
(
pmdp
==
NULL
)
early_pgtable_allocfail
(
"pmd"
);
early_pgtable_allocfail
(
"pmd"
);
...
@@ -1104,7 +1095,7 @@ static void __init srmmu_inherit_prom_mappings(unsigned long start,
...
@@ -1104,7 +1095,7 @@ static void __init srmmu_inherit_prom_mappings(unsigned long start,
start
+=
SRMMU_PGDIR_SIZE
;
start
+=
SRMMU_PGDIR_SIZE
;
continue
;
continue
;
}
}
if
(
srmmu_
pgd_none
(
*
(
pgd_t
*
)
__nocache_fix
(
pgdp
)))
{
if
(
pgd_none
(
*
(
pgd_t
*
)
__nocache_fix
(
pgdp
)))
{
pmdp
=
(
pmd_t
*
)
__srmmu_get_nocache
(
SRMMU_PMD_TABLE_SIZE
,
SRMMU_PMD_TABLE_SIZE
);
pmdp
=
(
pmd_t
*
)
__srmmu_get_nocache
(
SRMMU_PMD_TABLE_SIZE
,
SRMMU_PMD_TABLE_SIZE
);
if
(
pmdp
==
NULL
)
if
(
pmdp
==
NULL
)
early_pgtable_allocfail
(
"pmd"
);
early_pgtable_allocfail
(
"pmd"
);
...
@@ -2090,10 +2081,6 @@ void __init ld_mmu_srmmu(void)
...
@@ -2090,10 +2081,6 @@ void __init ld_mmu_srmmu(void)
BTFIXUPSET_CALL
(
pmd_bad
,
srmmu_pmd_bad
,
BTFIXUPCALL_NORM
);
BTFIXUPSET_CALL
(
pmd_bad
,
srmmu_pmd_bad
,
BTFIXUPCALL_NORM
);
BTFIXUPSET_CALL
(
pmd_present
,
srmmu_pmd_present
,
BTFIXUPCALL_NORM
);
BTFIXUPSET_CALL
(
pmd_present
,
srmmu_pmd_present
,
BTFIXUPCALL_NORM
);
BTFIXUPSET_CALL
(
pgd_none
,
srmmu_pgd_none
,
BTFIXUPCALL_NORM
);
BTFIXUPSET_CALL
(
pgd_bad
,
srmmu_pgd_bad
,
BTFIXUPCALL_NORM
);
BTFIXUPSET_CALL
(
pgd_present
,
srmmu_pgd_present
,
BTFIXUPCALL_NORM
);
BTFIXUPSET_CALL
(
mk_pte
,
srmmu_mk_pte
,
BTFIXUPCALL_NORM
);
BTFIXUPSET_CALL
(
mk_pte
,
srmmu_mk_pte
,
BTFIXUPCALL_NORM
);
BTFIXUPSET_CALL
(
mk_pte_phys
,
srmmu_mk_pte_phys
,
BTFIXUPCALL_NORM
);
BTFIXUPSET_CALL
(
mk_pte_phys
,
srmmu_mk_pte_phys
,
BTFIXUPCALL_NORM
);
BTFIXUPSET_CALL
(
mk_pte_io
,
srmmu_mk_pte_io
,
BTFIXUPCALL_NORM
);
BTFIXUPSET_CALL
(
mk_pte_io
,
srmmu_mk_pte_io
,
BTFIXUPCALL_NORM
);
...
...
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