diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-12 15:33:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-12 15:33:08 -0400 |
commit | 3d8273675d4771d30e1e1c3dbae820dec55a0950 (patch) | |
tree | e0b2ebac8049f0c029e9dd5ba79e48586581f4cf /arch/sparc/mm | |
parent | a46d6056f6585b1afefde190ae78ea894d720693 (diff) |
sparc32: Un-btfixup pmd_page and pte_pfn.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r-- | arch/sparc/mm/srmmu.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 29dfabffcc5e..d852962d58d8 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -91,12 +91,6 @@ static DEFINE_SPINLOCK(srmmu_context_spinlock); | |||
91 | 91 | ||
92 | static int is_hypersparc; | 92 | static int is_hypersparc; |
93 | 93 | ||
94 | /* The very generic SRMMU page table operations. */ | ||
95 | static inline int srmmu_device_memory(unsigned long x) | ||
96 | { | ||
97 | return ((x & 0xF0000000) != 0); | ||
98 | } | ||
99 | |||
100 | static int srmmu_cache_pagetables; | 94 | static int srmmu_cache_pagetables; |
101 | 95 | ||
102 | /* these will be initialized in srmmu_nocache_calcsize() */ | 96 | /* these will be initialized in srmmu_nocache_calcsize() */ |
@@ -113,27 +107,6 @@ void *srmmu_nocache_pool; | |||
113 | void *srmmu_nocache_bitmap; | 107 | void *srmmu_nocache_bitmap; |
114 | static struct bit_map srmmu_nocache_map; | 108 | static struct bit_map srmmu_nocache_map; |
115 | 109 | ||
116 | static unsigned long srmmu_pte_pfn(pte_t pte) | ||
117 | { | ||
118 | if (srmmu_device_memory(pte_val(pte))) { | ||
119 | /* Just return something that will cause | ||
120 | * pfn_valid() to return false. This makes | ||
121 | * copy_one_pte() to just directly copy to | ||
122 | * PTE over. | ||
123 | */ | ||
124 | return ~0UL; | ||
125 | } | ||
126 | return (pte_val(pte) & SRMMU_PTE_PMASK) >> (PAGE_SHIFT-4); | ||
127 | } | ||
128 | |||
129 | static struct page *srmmu_pmd_page(pmd_t pmd) | ||
130 | { | ||
131 | |||
132 | if (srmmu_device_memory(pmd_val(pmd))) | ||
133 | BUG(); | ||
134 | return pfn_to_page((pmd_val(pmd) & SRMMU_PTD_PMASK) >> (PAGE_SHIFT-4)); | ||
135 | } | ||
136 | |||
137 | static inline unsigned long srmmu_pgd_page(pgd_t pgd) | 110 | static inline unsigned long srmmu_pgd_page(pgd_t pgd) |
138 | { return srmmu_device_memory(pgd_val(pgd))?~0:(unsigned long)__nocache_va((pgd_val(pgd) & SRMMU_PTD_PMASK) << 4); } | 111 | { return srmmu_device_memory(pgd_val(pgd))?~0:(unsigned long)__nocache_va((pgd_val(pgd) & SRMMU_PTD_PMASK) << 4); } |
139 | 112 | ||
@@ -2119,8 +2092,6 @@ void __init ld_mmu_srmmu(void) | |||
2119 | 2092 | ||
2120 | BTFIXUPSET_CALL(set_pte, srmmu_set_pte, BTFIXUPCALL_SWAPO0O1); | 2093 | BTFIXUPSET_CALL(set_pte, srmmu_set_pte, BTFIXUPCALL_SWAPO0O1); |
2121 | 2094 | ||
2122 | BTFIXUPSET_CALL(pte_pfn, srmmu_pte_pfn, BTFIXUPCALL_NORM); | ||
2123 | BTFIXUPSET_CALL(pmd_page, srmmu_pmd_page, BTFIXUPCALL_NORM); | ||
2124 | BTFIXUPSET_CALL(pgd_page_vaddr, srmmu_pgd_page, BTFIXUPCALL_NORM); | 2095 | BTFIXUPSET_CALL(pgd_page_vaddr, srmmu_pgd_page, BTFIXUPCALL_NORM); |
2125 | 2096 | ||
2126 | BTFIXUPSET_CALL(pte_present, srmmu_pte_present, BTFIXUPCALL_NORM); | 2097 | BTFIXUPSET_CALL(pte_present, srmmu_pte_present, BTFIXUPCALL_NORM); |