diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-12 16:13:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-12 16:13:16 -0400 |
commit | 7d9fa4aa3d41e82d5d52612d07211ee243df3a20 (patch) | |
tree | fea3aa9a9b74abd2bc6aebe68aca60f9428f8374 /arch/sparc/mm/srmmu.c | |
parent | 6439d1c693bae2e7552ceaf16e45a6e819d18873 (diff) |
sparc32: Un-btfixup pgd_{none,bad,present}.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm/srmmu.c')
-rw-r--r-- | arch/sparc/mm/srmmu.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index c6962715ef08..94dcd06632a2 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -124,15 +124,6 @@ static inline int srmmu_pmd_bad(pmd_t pmd) | |||
124 | static inline int srmmu_pmd_present(pmd_t pmd) | 124 | static inline int srmmu_pmd_present(pmd_t pmd) |
125 | { return ((pmd_val(pmd) & SRMMU_ET_MASK) == SRMMU_ET_PTD); } | 125 | { return ((pmd_val(pmd) & SRMMU_ET_MASK) == SRMMU_ET_PTD); } |
126 | 126 | ||
127 | static inline int srmmu_pgd_none(pgd_t pgd) | ||
128 | { return !(pgd_val(pgd) & 0xFFFFFFF); } | ||
129 | |||
130 | static inline int srmmu_pgd_bad(pgd_t pgd) | ||
131 | { return (pgd_val(pgd) & SRMMU_ET_MASK) != SRMMU_ET_PTD; } | ||
132 | |||
133 | static inline int srmmu_pgd_present(pgd_t pgd) | ||
134 | { return ((pgd_val(pgd) & SRMMU_ET_MASK) == SRMMU_ET_PTD); } | ||
135 | |||
136 | static inline pte_t srmmu_pte_wrprotect(pte_t pte) | 127 | static inline pte_t srmmu_pte_wrprotect(pte_t pte) |
137 | { return __pte(pte_val(pte) & ~SRMMU_WRITE);} | 128 | { return __pte(pte_val(pte) & ~SRMMU_WRITE);} |
138 | 129 | ||
@@ -1007,7 +998,7 @@ static void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, | |||
1007 | 998 | ||
1008 | while(start < end) { | 999 | while(start < end) { |
1009 | pgdp = pgd_offset_k(start); | 1000 | pgdp = pgd_offset_k(start); |
1010 | if(srmmu_pgd_none(*(pgd_t *)__nocache_fix(pgdp))) { | 1001 | if (pgd_none(*(pgd_t *)__nocache_fix(pgdp))) { |
1011 | pmdp = (pmd_t *) __srmmu_get_nocache( | 1002 | pmdp = (pmd_t *) __srmmu_get_nocache( |
1012 | SRMMU_PMD_TABLE_SIZE, SRMMU_PMD_TABLE_SIZE); | 1003 | SRMMU_PMD_TABLE_SIZE, SRMMU_PMD_TABLE_SIZE); |
1013 | if (pmdp == NULL) | 1004 | if (pmdp == NULL) |
@@ -1038,7 +1029,7 @@ static void __init srmmu_allocate_ptable_skeleton(unsigned long start, | |||
1038 | 1029 | ||
1039 | while(start < end) { | 1030 | while(start < end) { |
1040 | pgdp = pgd_offset_k(start); | 1031 | pgdp = pgd_offset_k(start); |
1041 | if(srmmu_pgd_none(*pgdp)) { | 1032 | if (pgd_none(*pgdp)) { |
1042 | pmdp = (pmd_t *)__srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE, SRMMU_PMD_TABLE_SIZE); | 1033 | pmdp = (pmd_t *)__srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE, SRMMU_PMD_TABLE_SIZE); |
1043 | if (pmdp == NULL) | 1034 | if (pmdp == NULL) |
1044 | early_pgtable_allocfail("pmd"); | 1035 | early_pgtable_allocfail("pmd"); |
@@ -1104,7 +1095,7 @@ static void __init srmmu_inherit_prom_mappings(unsigned long start, | |||
1104 | start += SRMMU_PGDIR_SIZE; | 1095 | start += SRMMU_PGDIR_SIZE; |
1105 | continue; | 1096 | continue; |
1106 | } | 1097 | } |
1107 | if(srmmu_pgd_none(*(pgd_t *)__nocache_fix(pgdp))) { | 1098 | if (pgd_none(*(pgd_t *)__nocache_fix(pgdp))) { |
1108 | pmdp = (pmd_t *)__srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE, SRMMU_PMD_TABLE_SIZE); | 1099 | pmdp = (pmd_t *)__srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE, SRMMU_PMD_TABLE_SIZE); |
1109 | if (pmdp == NULL) | 1100 | if (pmdp == NULL) |
1110 | early_pgtable_allocfail("pmd"); | 1101 | early_pgtable_allocfail("pmd"); |
@@ -2090,10 +2081,6 @@ void __init ld_mmu_srmmu(void) | |||
2090 | BTFIXUPSET_CALL(pmd_bad, srmmu_pmd_bad, BTFIXUPCALL_NORM); | 2081 | BTFIXUPSET_CALL(pmd_bad, srmmu_pmd_bad, BTFIXUPCALL_NORM); |
2091 | BTFIXUPSET_CALL(pmd_present, srmmu_pmd_present, BTFIXUPCALL_NORM); | 2082 | BTFIXUPSET_CALL(pmd_present, srmmu_pmd_present, BTFIXUPCALL_NORM); |
2092 | 2083 | ||
2093 | BTFIXUPSET_CALL(pgd_none, srmmu_pgd_none, BTFIXUPCALL_NORM); | ||
2094 | BTFIXUPSET_CALL(pgd_bad, srmmu_pgd_bad, BTFIXUPCALL_NORM); | ||
2095 | BTFIXUPSET_CALL(pgd_present, srmmu_pgd_present, BTFIXUPCALL_NORM); | ||
2096 | |||
2097 | BTFIXUPSET_CALL(mk_pte, srmmu_mk_pte, BTFIXUPCALL_NORM); | 2084 | BTFIXUPSET_CALL(mk_pte, srmmu_mk_pte, BTFIXUPCALL_NORM); |
2098 | BTFIXUPSET_CALL(mk_pte_phys, srmmu_mk_pte_phys, BTFIXUPCALL_NORM); | 2085 | BTFIXUPSET_CALL(mk_pte_phys, srmmu_mk_pte_phys, BTFIXUPCALL_NORM); |
2099 | BTFIXUPSET_CALL(mk_pte_io, srmmu_mk_pte_io, BTFIXUPCALL_NORM); | 2086 | BTFIXUPSET_CALL(mk_pte_io, srmmu_mk_pte_io, BTFIXUPCALL_NORM); |