diff options
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 7d9ce9a48219..7b4eccffd002 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -169,7 +169,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
169 | #ifdef CONFIG_PPC_ISERIES | 169 | #ifdef CONFIG_PPC_ISERIES |
170 | if (_machine == PLATFORM_ISERIES_LPAR) | 170 | if (_machine == PLATFORM_ISERIES_LPAR) |
171 | ret = iSeries_hpte_insert(hpteg, va, | 171 | ret = iSeries_hpte_insert(hpteg, va, |
172 | __pa(vaddr), | 172 | paddr, |
173 | tmp_mode, | 173 | tmp_mode, |
174 | HPTE_V_BOLTED, | 174 | HPTE_V_BOLTED, |
175 | psize); | 175 | psize); |
@@ -178,7 +178,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
178 | #ifdef CONFIG_PPC_PSERIES | 178 | #ifdef CONFIG_PPC_PSERIES |
179 | if (_machine & PLATFORM_LPAR) | 179 | if (_machine & PLATFORM_LPAR) |
180 | ret = pSeries_lpar_hpte_insert(hpteg, va, | 180 | ret = pSeries_lpar_hpte_insert(hpteg, va, |
181 | virt_to_abs(paddr), | 181 | paddr, |
182 | tmp_mode, | 182 | tmp_mode, |
183 | HPTE_V_BOLTED, | 183 | HPTE_V_BOLTED, |
184 | psize); | 184 | psize); |
@@ -186,7 +186,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
186 | #endif | 186 | #endif |
187 | #ifdef CONFIG_PPC_MULTIPLATFORM | 187 | #ifdef CONFIG_PPC_MULTIPLATFORM |
188 | ret = native_hpte_insert(hpteg, va, | 188 | ret = native_hpte_insert(hpteg, va, |
189 | virt_to_abs(paddr), | 189 | paddr, |
190 | tmp_mode, HPTE_V_BOLTED, | 190 | tmp_mode, HPTE_V_BOLTED, |
191 | psize); | 191 | psize); |
192 | #endif | 192 | #endif |
@@ -392,7 +392,7 @@ static unsigned long __init htab_get_table_size(void) | |||
392 | #ifdef CONFIG_MEMORY_HOTPLUG | 392 | #ifdef CONFIG_MEMORY_HOTPLUG |
393 | void create_section_mapping(unsigned long start, unsigned long end) | 393 | void create_section_mapping(unsigned long start, unsigned long end) |
394 | { | 394 | { |
395 | BUG_ON(htab_bolt_mapping(start, end, start, | 395 | BUG_ON(htab_bolt_mapping(start, end, __pa(start), |
396 | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, | 396 | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, |
397 | mmu_linear_psize)); | 397 | mmu_linear_psize)); |
398 | } | 398 | } |
@@ -473,21 +473,22 @@ void __init htab_initialize(void) | |||
473 | 473 | ||
474 | if (dart_tablebase != 0 && dart_tablebase >= base | 474 | if (dart_tablebase != 0 && dart_tablebase >= base |
475 | && dart_tablebase < (base + size)) { | 475 | && dart_tablebase < (base + size)) { |
476 | unsigned long dart_table_end = dart_tablebase + 16 * MB; | ||
476 | if (base != dart_tablebase) | 477 | if (base != dart_tablebase) |
477 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, | 478 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, |
478 | base, mode_rw, | 479 | __pa(base), mode_rw, |
479 | mmu_linear_psize)); | 480 | mmu_linear_psize)); |
480 | if ((base + size) > (dart_tablebase + 16*MB)) | 481 | if ((base + size) > dart_table_end) |
481 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, | 482 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, |
482 | base + size, | 483 | base + size, |
483 | dart_tablebase+16*MB, | 484 | __pa(dart_table_end), |
484 | mode_rw, | 485 | mode_rw, |
485 | mmu_linear_psize)); | 486 | mmu_linear_psize)); |
486 | continue; | 487 | continue; |
487 | } | 488 | } |
488 | #endif /* CONFIG_U3_DART */ | 489 | #endif /* CONFIG_U3_DART */ |
489 | BUG_ON(htab_bolt_mapping(base, base + size, base, | 490 | BUG_ON(htab_bolt_mapping(base, base + size, __pa(base), |
490 | mode_rw, mmu_linear_psize)); | 491 | mode_rw, mmu_linear_psize)); |
491 | } | 492 | } |
492 | 493 | ||
493 | /* | 494 | /* |
@@ -504,8 +505,8 @@ void __init htab_initialize(void) | |||
504 | if (base + size >= tce_alloc_start) | 505 | if (base + size >= tce_alloc_start) |
505 | tce_alloc_start = base + size + 1; | 506 | tce_alloc_start = base + size + 1; |
506 | 507 | ||
507 | BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, | 508 | BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, |
508 | tce_alloc_start, mode_rw, | 509 | __pa(tce_alloc_start), mode_rw, |
509 | mmu_linear_psize)); | 510 | mmu_linear_psize)); |
510 | } | 511 | } |
511 | 512 | ||