powerpc/mm/hash: Remove the superfluous bitwise operation when find hpte group
[linux-2.6-block.git] / arch / powerpc / mm / hash64_4k.c
index d573d7d07f25f4d718043a71e199475d3df9597c..6fa6765a10eb346ebc1962077ee527f5f54a9749 100644 (file)
@@ -80,7 +80,7 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,
                hash = hpt_hash(vpn, shift, ssize);
 
 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, 0,
@@ -89,7 +89,7 @@ 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,
                                                        HPTE_V_SECONDARY,
@@ -97,8 +97,8 @@ repeat:
                                                        MMU_PAGE_4K, 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);
                                /*
                                 * FIXME!! Should be try the group from which we removed ?