Anshuman Khandual <khand...@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.ku...@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 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev