diff options
Diffstat (limited to 'arch/ppc64/kernel/iSeries_setup.c')
-rw-r--r-- | arch/ppc64/kernel/iSeries_setup.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c index 077c82fc9f3a..a649edbb23b6 100644 --- a/arch/ppc64/kernel/iSeries_setup.c +++ b/arch/ppc64/kernel/iSeries_setup.c | |||
@@ -503,7 +503,7 @@ static void __init build_iSeries_Memory_Map(void) | |||
503 | 503 | ||
504 | /* Fill in the hashed page table hash mask */ | 504 | /* Fill in the hashed page table hash mask */ |
505 | num_ptegs = hptSizePages * | 505 | num_ptegs = hptSizePages * |
506 | (PAGE_SIZE / (sizeof(HPTE) * HPTES_PER_GROUP)); | 506 | (PAGE_SIZE / (sizeof(hpte_t) * HPTES_PER_GROUP)); |
507 | htab_hash_mask = num_ptegs - 1; | 507 | htab_hash_mask = num_ptegs - 1; |
508 | 508 | ||
509 | /* | 509 | /* |
@@ -618,25 +618,23 @@ static void __init setup_iSeries_cache_sizes(void) | |||
618 | static void iSeries_make_pte(unsigned long va, unsigned long pa, | 618 | static void iSeries_make_pte(unsigned long va, unsigned long pa, |
619 | int mode) | 619 | int mode) |
620 | { | 620 | { |
621 | HPTE local_hpte, rhpte; | 621 | hpte_t local_hpte, rhpte; |
622 | unsigned long hash, vpn; | 622 | unsigned long hash, vpn; |
623 | long slot; | 623 | long slot; |
624 | 624 | ||
625 | vpn = va >> PAGE_SHIFT; | 625 | vpn = va >> PAGE_SHIFT; |
626 | hash = hpt_hash(vpn, 0); | 626 | hash = hpt_hash(vpn, 0); |
627 | 627 | ||
628 | local_hpte.dw1.dword1 = pa | mode; | 628 | local_hpte.r = pa | mode; |
629 | local_hpte.dw0.dword0 = 0; | 629 | local_hpte.v = ((va >> 23) << HPTE_V_AVPN_SHIFT) |
630 | local_hpte.dw0.dw0.avpn = va >> 23; | 630 | | HPTE_V_BOLTED | HPTE_V_VALID; |
631 | local_hpte.dw0.dw0.bolted = 1; /* bolted */ | ||
632 | local_hpte.dw0.dw0.v = 1; | ||
633 | 631 | ||
634 | slot = HvCallHpt_findValid(&rhpte, vpn); | 632 | slot = HvCallHpt_findValid(&rhpte, vpn); |
635 | if (slot < 0) { | 633 | if (slot < 0) { |
636 | /* Must find space in primary group */ | 634 | /* Must find space in primary group */ |
637 | panic("hash_page: hpte already exists\n"); | 635 | panic("hash_page: hpte already exists\n"); |
638 | } | 636 | } |
639 | HvCallHpt_addValidate(slot, 0, (HPTE *)&local_hpte ); | 637 | HvCallHpt_addValidate(slot, 0, &local_hpte); |
640 | } | 638 | } |
641 | 639 | ||
642 | /* | 640 | /* |
@@ -646,7 +644,7 @@ static void __init iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr) | |||
646 | { | 644 | { |
647 | unsigned long pa; | 645 | unsigned long pa; |
648 | unsigned long mode_rw = _PAGE_ACCESSED | _PAGE_COHERENT | PP_RWXX; | 646 | unsigned long mode_rw = _PAGE_ACCESSED | _PAGE_COHERENT | PP_RWXX; |
649 | HPTE hpte; | 647 | hpte_t hpte; |
650 | 648 | ||
651 | for (pa = saddr; pa < eaddr ;pa += PAGE_SIZE) { | 649 | for (pa = saddr; pa < eaddr ;pa += PAGE_SIZE) { |
652 | unsigned long ea = (unsigned long)__va(pa); | 650 | unsigned long ea = (unsigned long)__va(pa); |
@@ -659,7 +657,7 @@ static void __init iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr) | |||
659 | if (!in_kernel_text(ea)) | 657 | if (!in_kernel_text(ea)) |
660 | mode_rw |= HW_NO_EXEC; | 658 | mode_rw |= HW_NO_EXEC; |
661 | 659 | ||
662 | if (hpte.dw0.dw0.v) { | 660 | if (hpte.v & HPTE_V_VALID) { |
663 | /* HPTE exists, so just bolt it */ | 661 | /* HPTE exists, so just bolt it */ |
664 | HvCallHpt_setSwBits(slot, 0x10, 0); | 662 | HvCallHpt_setSwBits(slot, 0x10, 0); |
665 | /* And make sure the pp bits are correct */ | 663 | /* And make sure the pp bits are correct */ |