Thread (57 messages) flat view 57 messages, 5 authors, 2015-09-30

Re: [PATCH 24/31] powerpc/mm: Convert __hash_page_64K to C

From: Aneesh Kumar K.V <hidden>
Date: 2015-09-28 04:58:57

Anshuman Khandual [off-list ref] writes:
On 09/21/2015 12:10 PM, Aneesh Kumar K.V wrote:
quoted
Convert from asm to C

Signed-off-by: Aneesh Kumar K.V <redacted>
+		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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help