diff options
Diffstat (limited to 'arch/powerpc/mm/hash_utils_64.c')
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index e9d589eefc14..89b35c181314 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 | } |
@@ -422,7 +422,7 @@ void __init htab_initialize(void) | |||
422 | 422 | ||
423 | htab_hash_mask = pteg_count - 1; | 423 | htab_hash_mask = pteg_count - 1; |
424 | 424 | ||
425 | if (platform_is_lpar()) { | 425 | if (firmware_has_feature(FW_FEATURE_LPAR)) { |
426 | /* Using a hypervisor which owns the htab */ | 426 | /* Using a hypervisor which owns the htab */ |
427 | htab_address = NULL; | 427 | htab_address = NULL; |
428 | _SDR1 = 0; | 428 | _SDR1 = 0; |
@@ -431,7 +431,6 @@ void __init htab_initialize(void) | |||
431 | * the absolute address space. | 431 | * the absolute address space. |
432 | */ | 432 | */ |
433 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); | 433 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); |
434 | BUG_ON(table == 0); | ||
435 | 434 | ||
436 | DBG("Hash table allocated at %lx, size: %lx\n", table, | 435 | DBG("Hash table allocated at %lx, size: %lx\n", table, |
437 | htab_size_bytes); | 436 | htab_size_bytes); |
@@ -474,21 +473,22 @@ void __init htab_initialize(void) | |||
474 | 473 | ||
475 | if (dart_tablebase != 0 && dart_tablebase >= base | 474 | if (dart_tablebase != 0 && dart_tablebase >= base |
476 | && dart_tablebase < (base + size)) { | 475 | && dart_tablebase < (base + size)) { |
476 | unsigned long dart_table_end = dart_tablebase + 16 * MB; | ||
477 | if (base != dart_tablebase) | 477 | if (base != dart_tablebase) |
478 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, | 478 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, |
479 | base, mode_rw, | 479 | __pa(base), mode_rw, |
480 | mmu_linear_psize)); | 480 | mmu_linear_psize)); |
481 | if ((base + size) > (dart_tablebase + 16*MB)) | 481 | if ((base + size) > dart_table_end) |
482 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, | 482 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, |
483 | base + size, | 483 | base + size, |
484 | dart_tablebase+16*MB, | 484 | __pa(dart_table_end), |
485 | mode_rw, | 485 | mode_rw, |
486 | mmu_linear_psize)); | 486 | mmu_linear_psize)); |
487 | continue; | 487 | continue; |
488 | } | 488 | } |
489 | #endif /* CONFIG_U3_DART */ | 489 | #endif /* CONFIG_U3_DART */ |
490 | BUG_ON(htab_bolt_mapping(base, base + size, base, | 490 | BUG_ON(htab_bolt_mapping(base, base + size, __pa(base), |
491 | mode_rw, mmu_linear_psize)); | 491 | mode_rw, mmu_linear_psize)); |
492 | } | 492 | } |
493 | 493 | ||
494 | /* | 494 | /* |
@@ -505,8 +505,8 @@ void __init htab_initialize(void) | |||
505 | if (base + size >= tce_alloc_start) | 505 | if (base + size >= tce_alloc_start) |
506 | tce_alloc_start = base + size + 1; | 506 | tce_alloc_start = base + size + 1; |
507 | 507 | ||
508 | BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, | 508 | BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, |
509 | tce_alloc_start, mode_rw, | 509 | __pa(tce_alloc_start), mode_rw, |
510 | mmu_linear_psize)); | 510 | mmu_linear_psize)); |
511 | } | 511 | } |
512 | 512 | ||
@@ -517,7 +517,7 @@ void __init htab_initialize(void) | |||
517 | 517 | ||
518 | void htab_initialize_secondary(void) | 518 | void htab_initialize_secondary(void) |
519 | { | 519 | { |
520 | if (!platform_is_lpar()) | 520 | if (!firmware_has_feature(FW_FEATURE_LPAR)) |
521 | mtspr(SPRN_SDR1, _SDR1); | 521 | mtspr(SPRN_SDR1, _SDR1); |
522 | } | 522 | } |
523 | 523 | ||