• Ram Pai's avatar
    powerpc: shifted-by-one hidx value · 7b84947c
    Ram Pai authored
    0xf is considered invalid hidx value. It indicates absence of a backing
    HPTE. A PTE is initialized to 0xf either
    a) when it is new it is newly allocated to hold 4k-backing-HPTE
    	or
    b) Any time it gets demoted to a 4k-backing-HPTE
    
    This patch shifts the representation by one-modulo-0xf; i.e hidx 0 is
    represented as 1, 1 as 2,... , and 0xf as 0. This convention lets us
    initialize the secondary-part of the PTE to all zeroes. PTEs are anyway
    zero'd when allocated. We do not have to zero them again; thus saving on
    the initialization.
    Signed-off-by: default avatarRam Pai <linuxram@us.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    7b84947c
hash-64k.h 8.22 KB