[PATCH 24/31] powerpc/mm: Convert __hash_page_64K to C
Aneesh Kumar K.V
aneesh.kumar at linux.vnet.ibm.com
Mon Sep 28 14:58:01 AEST 2015
Anshuman Khandual <khandual at linux.vnet.ibm.com> writes:
> On 09/21/2015 12:10 PM, Aneesh Kumar K.V wrote:
>> Convert from asm to C
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
>> + new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HASHPTE;
>> + new_pte |= (slot << _PAGE_F_GIX_SHIFT) & (_PAGE_F_SECOND | _PAGE_F_GIX);
>
>
> I know this is already part of the function __hash_page_huge(), but its
> just coincidence that _PAGE_F_SECOND is the left bit of _PAGE_F_GIX 3 bit
> positions, so we dont check exclusively for the fourth bit on the returned
> 'slot' value from hpte_insert() function and explicitly set _PAGE_F_SECOND
> flag for the pte. This hack does the work but makes it pretty confusing.
slot number should be looked at as a 4 bit entity, of format
[ 1 bit (secondary or not) | 3 bit hash pte slot ]
-aneesh
More information about the Linuxppc-dev
mailing list