aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/pgtable_64.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-11-06 22:42:09 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-06 22:42:09 -0500
commitc6135234550ed89a6fd0e8cb229633967e41d649 (patch)
tree22cef33e314839c4fb30d6fc888c0caa2a0f6602 /arch/powerpc/mm/pgtable_64.c
parent76032de898f34db55b5048349db56557828a1390 (diff)
parent0b154bb7d0cce80e9c0bcf11d4f9e71b59409d26 (diff)
Merge ../linux-2.6
Diffstat (limited to 'arch/powerpc/mm/pgtable_64.c')
-rw-r--r--arch/powerpc/mm/pgtable_64.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index d1fbd3fe684f..900842451bd3 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -100,7 +100,6 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags)
100 pud_t *pudp; 100 pud_t *pudp;
101 pmd_t *pmdp; 101 pmd_t *pmdp;
102 pte_t *ptep; 102 pte_t *ptep;
103 unsigned long vsid;
104 103
105 if (mem_init_done) { 104 if (mem_init_done) {
106 pgdp = pgd_offset_k(ea); 105 pgdp = pgd_offset_k(ea);
@@ -116,28 +115,15 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags)
116 set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, 115 set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT,
117 __pgprot(flags))); 116 __pgprot(flags)));
118 } else { 117 } else {
119 unsigned long va, vpn, hash, hpteg;
120
121 /* 118 /*
122 * If the mm subsystem is not fully up, we cannot create a 119 * If the mm subsystem is not fully up, we cannot create a
123 * linux page table entry for this mapping. Simply bolt an 120 * linux page table entry for this mapping. Simply bolt an
124 * entry in the hardware page table. 121 * entry in the hardware page table.
122 *
125 */ 123 */
126 vsid = get_kernel_vsid(ea); 124 if (htab_bolt_mapping(ea, ea + PAGE_SIZE, pa, flags,
127 va = (vsid << 28) | (ea & 0xFFFFFFF); 125 mmu_virtual_psize))
128 vpn = va >> PAGE_SHIFT; 126 panic("Can't map bolted IO mapping");
129
130 hash = hpt_hash(vpn, 0);
131
132 hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP);
133
134 /* Panic if a pte grpup is full */
135 if (ppc_md.hpte_insert(hpteg, va, pa >> PAGE_SHIFT,
136 HPTE_V_BOLTED,
137 _PAGE_NO_CACHE|_PAGE_GUARDED|PP_RWXX)
138 == -1) {
139 panic("map_io_page: could not insert mapping");
140 }
141 } 127 }
142 return 0; 128 return 0;
143} 129}