diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2005-07-13 04:11:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-13 14:25:25 -0400 |
commit | 96e2844999f99878fc5b03b81ccaa60580005b81 (patch) | |
tree | 353c1bc9a5602d556e6741f4a261010cde45e93b /arch/ppc64/mm/hugetlbpage.c | |
parent | f13487c66c75f5db004a0631047309d9e7c5aab7 (diff) |
[PATCH] ppc64: kill bitfields in ppc64 hash code
This patch removes the use of bitfield types from the ppc64 hash table
manipulation code.
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc64/mm/hugetlbpage.c')
-rw-r--r-- | arch/ppc64/mm/hugetlbpage.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c index fdcfe97c75c1..f9524602818d 100644 --- a/arch/ppc64/mm/hugetlbpage.c +++ b/arch/ppc64/mm/hugetlbpage.c | |||
@@ -583,7 +583,7 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access, | |||
583 | pte_t *ptep; | 583 | pte_t *ptep; |
584 | unsigned long va, vpn; | 584 | unsigned long va, vpn; |
585 | pte_t old_pte, new_pte; | 585 | pte_t old_pte, new_pte; |
586 | unsigned long hpteflags, prpn; | 586 | unsigned long rflags, prpn; |
587 | long slot; | 587 | long slot; |
588 | int err = 1; | 588 | int err = 1; |
589 | 589 | ||
@@ -626,9 +626,9 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access, | |||
626 | old_pte = *ptep; | 626 | old_pte = *ptep; |
627 | new_pte = old_pte; | 627 | new_pte = old_pte; |
628 | 628 | ||
629 | hpteflags = 0x2 | (! (pte_val(new_pte) & _PAGE_RW)); | 629 | rflags = 0x2 | (! (pte_val(new_pte) & _PAGE_RW)); |
630 | /* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */ | 630 | /* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */ |
631 | hpteflags |= ((pte_val(new_pte) & _PAGE_EXEC) ? 0 : HW_NO_EXEC); | 631 | rflags |= ((pte_val(new_pte) & _PAGE_EXEC) ? 0 : HW_NO_EXEC); |
632 | 632 | ||
633 | /* Check if pte already has an hpte (case 2) */ | 633 | /* Check if pte already has an hpte (case 2) */ |
634 | if (unlikely(pte_val(old_pte) & _PAGE_HASHPTE)) { | 634 | if (unlikely(pte_val(old_pte) & _PAGE_HASHPTE)) { |
@@ -641,7 +641,7 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access, | |||
641 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; | 641 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; |
642 | slot += (pte_val(old_pte) & _PAGE_GROUP_IX) >> 12; | 642 | slot += (pte_val(old_pte) & _PAGE_GROUP_IX) >> 12; |
643 | 643 | ||
644 | if (ppc_md.hpte_updatepp(slot, hpteflags, va, 1, local) == -1) | 644 | if (ppc_md.hpte_updatepp(slot, rflags, va, 1, local) == -1) |
645 | pte_val(old_pte) &= ~_PAGE_HPTEFLAGS; | 645 | pte_val(old_pte) &= ~_PAGE_HPTEFLAGS; |
646 | } | 646 | } |
647 | 647 | ||
@@ -661,10 +661,10 @@ repeat: | |||
661 | 661 | ||
662 | /* Add in WIMG bits */ | 662 | /* Add in WIMG bits */ |
663 | /* XXX We should store these in the pte */ | 663 | /* XXX We should store these in the pte */ |
664 | hpteflags |= _PAGE_COHERENT; | 664 | rflags |= _PAGE_COHERENT; |
665 | 665 | ||
666 | slot = ppc_md.hpte_insert(hpte_group, va, prpn, 0, | 666 | slot = ppc_md.hpte_insert(hpte_group, va, prpn, |
667 | hpteflags, 0, 1); | 667 | HPTE_V_LARGE, rflags); |
668 | 668 | ||
669 | /* Primary is full, try the secondary */ | 669 | /* Primary is full, try the secondary */ |
670 | if (unlikely(slot == -1)) { | 670 | if (unlikely(slot == -1)) { |
@@ -672,7 +672,7 @@ repeat: | |||
672 | hpte_group = ((~hash & htab_hash_mask) * | 672 | hpte_group = ((~hash & htab_hash_mask) * |
673 | HPTES_PER_GROUP) & ~0x7UL; | 673 | HPTES_PER_GROUP) & ~0x7UL; |
674 | slot = ppc_md.hpte_insert(hpte_group, va, prpn, | 674 | slot = ppc_md.hpte_insert(hpte_group, va, prpn, |
675 | 1, hpteflags, 0, 1); | 675 | HPTE_V_LARGE, rflags); |
676 | if (slot == -1) { | 676 | if (slot == -1) { |
677 | if (mftb() & 0x1) | 677 | if (mftb() & 0x1) |
678 | hpte_group = ((hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL; | 678 | hpte_group = ((hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL; |