powerpc/mm/hash: Remove the superfluous bitwise operation when find hpte group
[linux-2.6-block.git] / arch / powerpc / mm / hash_utils_64.c
index 5a72e980e25a2ac222ea4595d5f73c47f283c685..743c8dbe1941508f08574a891befef2d42ef9fc2 100644 (file)
@@ -1753,8 +1753,7 @@ long hpte_insert_repeating(unsigned long hash, unsigned long vpn,
        long slot;
 
 repeat:
-       hpte_group = ((hash & htab_hash_mask) *
-                      HPTES_PER_GROUP) & ~0x7UL;
+       hpte_group = (hash & htab_hash_mask) * HPTES_PER_GROUP;
 
        /* Insert into the hash table, primary slot */
        slot = mmu_hash_ops.hpte_insert(hpte_group, vpn, pa, rflags, vflags,
@@ -1762,15 +1761,14 @@ repeat:
 
        /* Primary is full, try the secondary */
        if (unlikely(slot == -1)) {
-               hpte_group = ((~hash & htab_hash_mask) *
-                             HPTES_PER_GROUP) & ~0x7UL;
+               hpte_group = (~hash & htab_hash_mask) * HPTES_PER_GROUP;
                slot = mmu_hash_ops.hpte_insert(hpte_group, vpn, pa, rflags,
                                                vflags | HPTE_V_SECONDARY,
                                                psize, psize, ssize);
                if (slot == -1) {
                        if (mftb() & 0x1)
-                               hpte_group = ((hash & htab_hash_mask) *
-                                             HPTES_PER_GROUP)&~0x7UL;
+                               hpte_group = (hash & htab_hash_mask) *
+                                               HPTES_PER_GROUP;
 
                        mmu_hash_ops.hpte_remove(hpte_group);
                        goto repeat;